internal static void Multiply(byte[] x, byte[] y) { uint[] t1 = GcmUtilities.AsUints(x); uint[] t2 = GcmUtilities.AsUints(y); GcmUtilities.Multiply(t1, t2); GcmUtilities.AsBytes(t1, x); }
internal static void Multiply(byte[] x, byte[] y) { uint[] x2 = GcmUtilities.AsUints(x); uint[] y2 = GcmUtilities.AsUints(y); GcmUtilities.Multiply(x2, y2); GcmUtilities.AsBytes(x2, x); }
public void ExponentiateX(long pow, byte[] output) { uint[] x = GcmUtilities.OneAsUints(); int bit = 0; while (pow > 0L) { if ((pow & 1L) != 0L) { this.EnsureAvailable(bit); GcmUtilities.Multiply(x, (uint[])this.lookupPowX2[bit]); } bit++; pow = pow >> 1; } GcmUtilities.AsBytes(x, output); }
public void ExponentiateX(long pow, byte[] output) { uint[] x = GcmUtilities.OneAsUints(); int num = 0; while (pow > 0) { if ((pow & 1) != 0L) { EnsureAvailable(num); GcmUtilities.Multiply(x, (uint[])lookupPowX2[num]); } num++; pow >>= 1; } GcmUtilities.AsBytes(x, output); }
public void ExponentiateX(long pow, byte[] output) { uint[] y = GcmUtilities.OneAsUints(); int bit = 0; while (pow > 0) { if ((pow & 1L) != 0) { EnsureAvailable(bit); GcmUtilities.Multiply(y, (uint[])lookupPowX2[bit]); } ++bit; pow >>= 1; } GcmUtilities.AsBytes(y, output); }
public void ExponentiateX(long pow, byte[] output) { uint[] array = GcmUtilities.OneAsUints(); if (pow > 0L) { uint[] y = Arrays.Clone(this.x); do { if ((pow & 1L) != 0L) { GcmUtilities.Multiply(array, y); } GcmUtilities.Multiply(y, y); pow >>= 1; }while (pow > 0L); } GcmUtilities.AsBytes(array, output); }
public void ExponentiateX(long pow, byte[] output) { // Initial value is little-endian 1 uint[] y = GcmUtilities.OneAsUints(); if (pow > 0) { uint[] powX = Arrays.Clone(x); do { if ((pow & 1L) != 0) { GcmUtilities.Multiply(y, powX); } GcmUtilities.Multiply(powX, powX); pow >>= 1; }while (pow > 0); } GcmUtilities.AsBytes(y, output); }
public void MultiplyH(byte[] x) { uint[] x2 = GcmUtilities.AsUints(x); GcmUtilities.Multiply(x2, this.H); GcmUtilities.AsBytes(x2, x); }
public void MultiplyH(byte[] x) { uint[] t = GcmUtilities.AsUints(x); GcmUtilities.Multiply(t, H); GcmUtilities.AsBytes(t, x); }
public void MultiplyH(byte[] x) { ulong[] t = GcmUtilities.AsUlongs(x); GcmUtilities.Multiply(t, H); GcmUtilities.AsBytes(t, x); }