/* Multiply an integer by the 'A24' constant (121665). Partial reduction is performed (down to less than twice the modulus).  */
static void f255_mul_a24(uint32_t *d, const uint32_t *a)
/* Multiply an integer by the 'A24' constant (121665). Partial reduction is performed (down to less than twice the modulus).  */
static void f255_mul_a24(uint32_t *d, const uint32_t *a)
{
	int i;
	uint32_t cc, w;
	cc = 0;
	for (i = 0; i < 20; i ++) {
		w = MUL15(a[i], 121665) + cc;
		d[i] = w & 0x1FFF;
		cc = w >> 13;
	}
	cc = MUL15(w >> 8, 19);
	d[19] &= 0xFF;
	for (i = 0; i < 20; i ++) {
		w = d[i] + cc;
		d[i] = w & 0x1FFF;
		cc = w >> 13;
	}
}