You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
458 B
22 lines
458 B
using System;
|
|
|
|
namespace Org.BouncyCastle.Crypto.Modes.Gcm
|
|
{
|
|
public class BasicGcmMultiplier
|
|
: IGcmMultiplier
|
|
{
|
|
private ulong[] H;
|
|
|
|
public void Init(byte[] H)
|
|
{
|
|
this.H = GcmUtilities.AsUlongs(H);
|
|
}
|
|
|
|
public void MultiplyH(byte[] x)
|
|
{
|
|
ulong[] t = GcmUtilities.AsUlongs(x);
|
|
GcmUtilities.Multiply(t, H);
|
|
GcmUtilities.AsBytes(t, x);
|
|
}
|
|
}
|
|
}
|
|
|