xmlsec1/tests/nist-aesgcm
rtlhq 9f0d89f398 Import Upstream version 1.2.33 2022-11-29 19:07:29 +08:00
..
aes128 Import Upstream version 1.2.33 2022-11-29 19:07:29 +08:00
aes192 Import Upstream version 1.2.33 2022-11-29 19:07:29 +08:00
aes256 Import Upstream version 1.2.33 2022-11-29 19:07:29 +08:00
README.txt Import Upstream version 1.2.33 2022-11-29 19:07:29 +08:00
create-enc-test.xslt Import Upstream version 1.2.33 2022-11-29 19:07:29 +08:00
keys-aes128-gcm.xml Import Upstream version 1.2.33 2022-11-29 19:07:29 +08:00
keys-aes192-gcm.xml Import Upstream version 1.2.33 2022-11-29 19:07:29 +08:00
keys-aes256-gcm.xml Import Upstream version 1.2.33 2022-11-29 19:07:29 +08:00

README.txt

The files in decrypt are generated from the NIST aesgcm test vectors available at:

https://csrc.nist.gov/Projects/Cryptographic-Algorithm-Validation-Program/CAVP-TESTING-BLOCK-CIPHER-MODES

All have been generated by taking the test vectors with IV length 96 bits, Tag length 128 bits and no AAD.

The test vectors have been split into separate folders based on key length.

The encrypted data is a concatenation of the IV, ciphertext and tag which is then base64 encoded.

Keys are base64 encoded directly from the NIST files

The corresponding plain text test vectors have been base64 encoded and can be found in the corresponding *.data files.

The NIST tests vectors are a mix of pass/fail tests. A missing corresponding *.data file indicates a test that must fail.

Files are named based on the lengths of the key, IV, plaintext, AAD and tag as follows:

tests/nist-aesgcm/aes<key length in bits>/aes<key length in bits>-gcm-<IV length in bits>-<plaintext length in bits>-<AAD length in bits>-<tag length in bits>-<test vector number>.xml

There are 15 test vectors for each plaintext length (104, 128, 256 and 408 bits)

As mentioned above, only files with IV length=96, AAD length=0 and tag length=128 are included.

The encryption tests were created with the XSLT transform:

xsltproc -o <base filename>.tmpl create-enc-test.xslt <base-filename>.xml