Multiplies x by y using schoolbook multiplication. Result stored in x.
multiplication by P (only bit 1 = 1)
multiplication by P^8
raises x to the power 'pow' by squaring x <- x^pow
Shift big endian number a 1 bit to the right.
Shift big endian number a 8 bits to the right.