public static void multiplyP(int[] x) { int m = shiftRight(x) >> 8; x[0] ^= (m & E1); }
public void exponentiateX(long pow, byte[] output) { long[] y = GCMUtil.oneAsLongs(); int bit = 0; while (pow > 0) { if ((pow & 1L) != 0) { ensureAvailable(bit); GCMUtil.multiply(y, (long[])lookupPowX2.elementAt(bit)); } ++bit; pow >>>= 1; } GCMUtil.asBytes(y, output); }
public void exponentiateX(long pow, byte[] output) { int[] y = GCMUtil.oneAsInts(); int bit = 0; while (pow > 0) { if ((pow & 1L) != 0) { ensureAvailable(bit); GCMUtil.multiply(y, (int[])lookupPowX2.elementAt(bit)); } ++bit; pow >>>= 1; } GCMUtil.asBytes(y, output); }
public void init(byte[] H) { this.H = GCMUtil.asLongs(H); }
public void init(byte[] H) { this.H = GCMUtil.asInts(H); }
public static void multiplyP8(int[] x, int[] y) { int c = shiftRightN(x, 8, y); y[0] ^= LOOKUP[c >>> 24]; }
private static GCMBlockCipher createBlockCipher(boolean forEncryption, AEADParameters parameters) { GCMBlockCipher decCipher = new GCMBlockCipher(new AESEngine(), new BasicGCMMultiplier()); decCipher.init(forEncryption, parameters); return decCipher; }
public void init(byte[] x) { this.x = GCMUtil.asLongs(x); }
public static void multiplyP(int[] x, int[] z) { int m = shiftRight(x, z) >> 8; z[0] ^= (m & E1); }
public void init(byte[] x) { this.x = GCMUtil.asInts(x); }
public static void multiplyP8(int[] x) { // for (int i = 8; i != 0; --i) // { // multiplyP(x); // } int c = shiftRightN(x, 8); x[0] ^= LOOKUP[c >>> 24]; }