Arduino Cryptography Library
|
Operations in the Galois field GF(2^128). More...
#include <GF128.h>
Static Public Member Functions | |
static void | mulInit (uint32_t H[4], const void *key) |
Initialize multiplication in the GF(2^128) field. More... | |
static void | mul (uint32_t Y[4], const uint32_t H[4]) |
Perform a multiplication in the GF(2^128) field. More... | |
static void | dbl (uint32_t V[4]) |
Doubles a value in the GF(2^128) field. More... | |
static void | dblEAX (uint32_t V[4]) |
Doubles a value in the GF(2^128) field using EAX conventions. More... | |
static void | dblXTS (uint32_t V[4]) |
Doubles a value in the GF(2^128) field using XTS conventions. More... | |
Operations in the Galois field GF(2^128).
This class contains helper functions for performing operations in the Galois field GF(2^128) which is used as the basis of GCM and GHASH. These functions are provided for use by other cryptographic protocols that make use of GF(2^128).
Most of the functions in this class use the field, polynomial, and byte ordering conventions described in NIST SP 800-38D (GCM). The one exception is dblEAX() which uses the conventions of EAX mode instead.
References: NIST SP 800-38D
|
static |
Doubles a value in the GF(2^128) field.
V | The value to double, and the result. This array is assumed to be in big-endian order on entry and exit. |
Block cipher modes such as XEX are similar to CTR mode but instead of incrementing the nonce every block, the modes multiply the nonce by 2 in the GF(2^128) field every block. This function is provided to help with implementing such modes.
|
static |
Doubles a value in the GF(2^128) field using EAX conventions.
V | The value to double, and the result. This array is assumed to be in big-endian order on entry and exit. |
This function differs from dbl() that it uses the conventions of EAX mode instead of those of NIST SP 800-38D (GCM). The two operations have equivalent security but the bits are ordered differently with the value shifted left instead of right.
References: https://en.wikipedia.org/wiki/EAX_mode, http://web.cs.ucdavis.edu/~rogaway/papers/eax.html
|
static |
Doubles a value in the GF(2^128) field using XTS conventions.
V | The value to double, and the result. This array is assumed to be in littlen-endian order on entry and exit. |
This function differs from dbl() that it uses the conventions of XTS mode instead of those of NIST SP 800-38D (GCM). The two operations have equivalent security but the bits are ordered differently with the value shifted left instead of right.
References: IEEE Std. 1619-2007, XTS-AES
|
static |
Perform a multiplication in the GF(2^128) field.
Y | The first value to multiply, and the result. This array is assumed to be in big-endian order on entry and exit. |
H | The second value to multiply, which must have been initialized by the mulInit() function. |
This function and the companion mulInit() are intended for use by other classes that need access to the raw GF(2^128) field multiplication of GHASH without the overhead of GHASH itself.
|
static |
Initialize multiplication in the GF(2^128) field.
H | The hash state to be initialized. |
key | Points to the 16 byte authentication key which is assumed to be in big-endian byte order. |
This function and the companion mul() are intended for use by other classes that need access to the raw GF(2^128) field multiplication of GHASH without the overhead of GHASH itself.