Block multiplication enhancement variants used for GHASH calculation.
Which in turn used for calculation of authentication tag.
https://luca-giuzzi.unibs.it/corsi/Support/papers-cryptography/gcm-spec.pdf
None - regular multiplication. Requires just 16B (aes cipher key) per session, i.e. cca 67M sessions per 1GB of memory
worst throughput
M0TableAndRTable - cca 3.7 times faster then regular multiplication.
Needs 4096Bytes per key, i.e. cca 262K key per 1GB of memory.
M4BitTables - cca 6.9 times faster then regular multiplication.
Needs 8192Bytes per key, i.e. cca 131K keys per 1GB of memory.
MTables - cca 9 times faster then regular multiplication.
Needs 65535Bytes per key, i.e. cca 16,4K keys per 1GB of memory.
Decrypts cipher_text to plain text by XOR’ing with AES-encrypted “Counter block”.
“Counter block” is initialized by “Initialization Vector” and incremented for each input block
i.e. each 16 bytes of plain text.
Cipher text then gets concatenated with “additional authenticated data” to produce GHASH which in turn XOR’ed
with first AES-encrypted counter block to produce “Authentication tag”
Encrypts plain_text to cipher text by XOR’ing with AES-encrypted “Counter block”.
“Counter block” is initialized by “Initialization Vector” and incremented for each input block
i.e. each 16 bytes of plain text.
Cipher text then gets concatenated with “additional authenticated data” to produce GHASH which in turn XOR’ed
with first AES-encrypted counter block to produce “Authentication tag”