test: add single byte IV AES GCM tests

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16064)
This commit is contained in:
Pauli 2021-07-13 18:55:36 +10:00 committed by Tomas Mraz
parent c55c7d0292
commit e77be2e201

View File

@ -893,6 +893,109 @@ Plaintext = 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f2021
Ciphertext = 6268c6fa2a80b2d137467f092f657ac04d89be2beaa623d61b5a868c8f03ff95d3dcee23ad2f1ab3a6c80eaf4b140eb05de3457f0fbc111a6b43d0763aa422a3013cf1dc37fe417d1fbfc449b75d4cc5
NextIV = dbcca32ebf9b804617c3aa9e
# Single byte IV test cases from
# https://csrc.nist.gov/Projects/Cryptographic-Algorithm-Validation-Program/CAVP-TESTING-BLOCK-CIPHER-MODES#GCMVS
Title = AES GCM single byte IV tests
Cipher = aes-128-gcm
Key = 1672c3537afa82004c6b8a46f6f0d026
IV = 05
Tag = 8e2ad721f9455f74d8b53d3141f27e8e
Plaintext =
Ciphertext =
Cipher = aes-128-gcm
Key = 6471e11b5a559f84d196160c64ced95a
IV = 1a
AAD = 147c70bd944ae51289717bdbdac86511fa3a43a2
Tag = b7b80d314024261bafd7d218
Plaintext =
Ciphertext =
Cipher = aes-128-gcm
Key = f0d44d3c8c8ff4d2aab5c315e77a5cff
IV = 3e
Tag = fe0c50de4c5443e4c9380a7df0
Plaintext = ecb7e9263c3080cb8861ffc5afdf3fe8
Ciphertext = b5cfd9141ea43d5c16e28666c3840805
Cipher = aes-128-gcm
Key = c422ac0266dc9b5ddc391d9cdb72257e
IV = c7
Tag = 95c1e410d4ea59dda50d84162b49
Plaintext = 6149277175c02a462dab219b80d15641a4c033dfa4c9a81de1765f0276008fa2
AAD = aa56b160c5d51a4aa400e798c825aaa27d6693de
Ciphertext = 39d9f9b2348214270f1ca18b521f7485c5390c8e993eb7ff79a5be99c7d523f1
Cipher = aes-128-gcm
Key = 72c5683d1e0173afcd92002c26ae3ea5
IV = 4c
Plaintext = f69623243c6bb924a5502dd270f730baf3fd4a0c10b889fb42a12b086d427786
AAD = f6cecdc9118777b875ef256cf92a3dc0cf208149
Ciphertext = 188e68729648fa9b4a202ed2313be860c593600ac8419c75c55859faa585bc0e
Tag = bb4e889b58b9716f6556c676bd59
Cipher = aes-192-gcm
Key = d49dfb35287db0b4bce518412c4e84229a9bf8461e11e8a9
IV = 0b
Tag = b1ecd3e6f27346c47e7fff898a418a0f
Plaintext =
Ciphertext =
Cipher = aes-192-gcm
Key = 842c899c5d7c3598676081e9e25fdd030d3e4490a3268fd0
IV = 9e
AAD = ed1162a2d95e0c248ebf9197cb03ad2d
Tag = c81a9ff65112b75911b22523926bf39f
Plaintext =
Ciphertext =
Cipher = aes-192-gcm
Key = d273319d24f356bf77cb6a56450bd0d464f476a18863840a
IV = 13
Tag = 729b5b765d008e982d9e5fae7c998e
Plaintext = c07e127ceb93a3d8d166d1e3fa2565e4
Ciphertext = 0c44c7b5fb1520bdb493bec38e7846e6
Cipher = aes-192-gcm
Key = 1120b14c39f4240e2cc63285d8b7d59d44c993fddc77d456
IV = 66
AAD = c25f9b36d06547a64442e534b1fe3bb120a55292060a3c8611b75313fb5475333eeedac642ee2eed1dd110643ce8aff8
Tag = ebf90469dae01e4be5b0ce86
Plaintext = 8eb78ac034ce4f182fb9ee68d71ed3f7
Ciphertext = ec13d51a2c37ea48beb32f766e1e42a1
Cipher = aes-256-gcm
Key = a70f2f3c96b952b2d177fce5d5edac7c939259ebd3ff7354df3d86100f0be5ac
IV = 69
Tag = 2d484f834a313bf3f9a25f0a7604a869
Plaintext =
Ciphertext =
Cipher = aes-256-gcm
Key = c639f716597a86afd12319199e21a62b1fc0277a70e3ca120bd3ff745be88604
IV = 29
AAD = 20fda1db6911d160121dc3c48e5f19b2
Tag = 221a3398f20d0d9fe913f33a6cd413d3
Plaintext =
Ciphertext =
Cipher = aes-256-gcm
Key = 9473c28f6e978eb15e1967b888282aa6b078d320034fe5f40f8bb68674f1ecda
IV = 0a
Tag = 03337df7e1e68d77706abef9edaf5e07
Plaintext = 2d2e2798c10bcfcce742e92d3c390fef
Ciphertext = c4e5ab2c6a4316e57c6c37d2c2acb42c
Cipher = aes-256-gcm
Key = bb4635d766dd0e4a7019d1724c736e1f2c016af9e29e7d3aa2c0de23e780af26
IV = ab
AAD = 0f85c7dbeb674b7a70c35125d3619350
Tag = 6bd54e5184eb300934b392c32b7c1a6e
Plaintext = d05ce878d94662d1520b184b4bef3c45
Ciphertext = 51baa26a6a719c1600645ff3bfdfa53b
Title = AES XTS test vectors from IEEE Std 1619-2007
# Using the same key twice for encryption is always banned.