/* Double a value in finite field GF(2^128), defined with modulus X^128+X^7+X^2+X+1.  */
static void double_gf128(unsigned char *dst, const unsigned char *src)
/* Double a value in finite field GF(2^128), defined with modulus X^128+X^7+X^2+X+1.  */
static void double_gf128(unsigned char *dst, const unsigned char *src)
{
	unsigned cc;
	int i;
	cc = 0x87 & -((unsigned)src[0] >> 7);
	for (i = 15; i >= 0; i --) {
		unsigned z;
		z = (src[i] << 1) ^ cc;
		cc = z >> 8;
		dst[i] = (unsigned char)z;
	}
}