Here you can find the source of multiplyP(int[] x)
static void multiplyP(int[] x)
//package com.java2s; //License from project: Apache License public class Main { static void multiplyP(int[] x) { boolean lsb = (x[3] & 1) != 0; shiftRight(x);//w w w. j a v a2 s .co m if (lsb) { // R = new int[]{ 0xe1000000, 0, 0, 0 }; // xor(v, R); x[0] ^= 0xe1000000; } } static void shiftRight(byte[] block) { int i = 0; int bit = 0; for (;;) { int b = block[i] & 0xff; block[i] = (byte) ((b >>> 1) | bit); if (++i == 16) { break; } bit = (b & 1) << 7; } } static void shiftRight(int[] block) { int i = 0; int bit = 0; for (;;) { int b = block[i]; block[i] = (b >>> 1) | bit; if (++i == 4) { break; } bit = b << 31; } } }