Poly1305KeyGeneratorClamp(Byte) Method
Modifies an existing 32 byte key value to comply with the requirements of the Poly1305 key by
clearing required bits in the
(second 16 bytes) portion of the key.
Specifically:
- r[3], r[7], r[11], r[15] have top four bits clear (i.e., are {0, 1, . . . , 15})
- r[4], r[8], r[12] have bottom two bits clear (i.e., are in {0, 4, 8, . . . , 252})
Namespace: Org.BouncyCastle.Crypto.GeneratorsAssembly: BouncyCastle.Cryptography (in BouncyCastle.Cryptography.dll) Version: 2.3.0-beta.187+d6da5648ae
public static void Clamp(
byte[] key
)
Public Shared Sub Clamp (
key As Byte()
)
Org.BouncyCastle.Crypto.Generators.Poly1305KeyGenerator.Clamp = function(key);
Parameters
- key Byte
- a 32 byte key value
k[0] ... k[15], r[0] ... r[15]