boringssl/crypto/cipher/test/aes_256_gcm_siv_tests.txt
Adam Langley df447ba3a9 Add generic AES-GCM-SIV support.
AES-GCM-SIV is an AEAD with nonce-misuse resistance. It can reuse
hardware support for AES-GCM and thus encrypt at ~66% the speed, and
decrypt at 100% the speed, of AES-GCM.

See https://tools.ietf.org/html/draft-irtf-cfrg-gcmsiv-02

This implementation is generic, not optimised, and reuses existing AES
and GHASH support as much as possible. It is guarded by !OPENSSL_SMALL,
at least for now.

Change-Id: Ia9f77b256ef5dfb8588bb9ecfe6ee0e827626f57
Reviewed-on: https://boringssl-review.googlesource.com/12541
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
2016-12-07 00:13:50 +00:00

227 lines
8.6 KiB
Plaintext

# Test vectors from
# https://tools.ietf.org/html/draft-irtf-cfrg-gcmsiv-02#appendix-B
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN:
AD:
CT:
TAG: eb7ccf36eeff369241379c87cc08e4f0
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 0100000000000000
AD:
CT: ab3f382a6f0fb4c3
TAG: a0a69e07b73281f5cdfd034f646cfa08
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 010000000000000000000000
AD:
CT: be8d81f033ca23b953da2197
TAG: cdf3ba70da9c7cbd45f5140ba0cca9f1
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 01000000000000000000000000000000
AD:
CT: 46e05b7116dbe27aaeffe99892194072
TAG: be19d78991c62130cf97f628c37c3eaa
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 0100000000000000000000000000000002000000000000000000000000000000
AD:
CT: 23ddbe9ef342b03003f56d6b4a2e8aff035c7d7cfd705e1ab4502904254bb67a
TAG: 16c5944034050657af7c0fec7efbc40f
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 010000000000000000000000000000000200000000000000000000000000000003000000000000000000000000000000
AD:
CT: b104c8945f280e75b52c05c45a63d1872c7f0552b1501968d9913d71207d0433f978f1a3eecdf782016b77e8c9d3ff53
TAG: abedb4841c20f3b05e61e0fd1fcaf3d0
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 01000000000000000000000000000000020000000000000000000000000000000300000000000000000000000000000004000000000000000000000000000000
AD:
CT: e3f2bd14f4c80c9cea4c90c81f0e4d7eedb87eb19a7c0cf5a5a95cd3e441a71083b1191d115e9a9ff008b93feeb5a86d012a3e0adb89de2d1e3225479022292f
TAG: 3ced67f5e03bb476a738c1343926dc19
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 0200000000000000
AD: 01
CT: 4dca2c16c3b0413c
TAG: ac9b952c76a6f8b5df315f88126daa1c
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 020000000000000000000000
AD: 01
CT: ee0ca9068b5b85dfe115a660
TAG: 756d6155927271077d790a05390ecb71
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 02000000000000000000000000000000
AD: 01
CT: 590edb785c0cb89d19f031fa7e7d4f91
TAG: ac2c8f711c86dbecc8c7b663c5fbc1ea
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 0200000000000000000000000000000003000000000000000000000000000000
AD: 01
CT: dcf2024f5f98d463b82a8673c47dd82159748cac8bcc7c76b8cfa26029cb333c
TAG: a9b406643e190e602fb104fbb842a1ac
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 020000000000000000000000000000000300000000000000000000000000000004000000000000000000000000000000
AD: 01
CT: 79216506b1ddadfe16366e4ec886d10dc9400b995259f74c0091f9b5a6add5680a612130f6c31ab833aa76d9b2be86de
TAG: 3ddfe9ad2c350980942638d3f954ac6d
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 02000000000000000000000000000000030000000000000000000000000000000400000000000000000000000000000005000000000000000000000000000000
AD: 01
CT: 9535eb67240c49f30a0de5a90670813fa615e71fcb4c522ca79d9a33459a22f8c6a56d650bf0b15eecdd706e7689cf6510a281724613fea76b5366b40574b1b9
TAG: abcb59ee31d25ee8889b70d7c36f9a41
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 02000000
AD: 010000000000000000000000
CT: 9611baa0
TAG: 53daf2bc5916f7a6750f2432068dabee
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 0300000000000000000000000000000004000000
AD: 010000000000000000000000000000000200
CT: 78e3a1b54daa6547f775f30c38a45e887aea5c87
TAG: f65187d8c28adba364d659b627b16431
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 030000000000000000000000000000000400
AD: 0100000000000000000000000000000002000000
CT: c6d3d28704bf20067d62e1a3872d40dda44b
TAG: 6ac0135a4379dbc67967ff55fd4d1f2f
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN:
AD:
CT:
TAG: eb7ccf36eeff369241379c87cc08e4f0
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 0100000000000000
AD:
CT: ab3f382a6f0fb4c3
TAG: a0a69e07b73281f5cdfd034f646cfa08
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 010000000000000000000000
AD:
CT: be8d81f033ca23b953da2197
TAG: cdf3ba70da9c7cbd45f5140ba0cca9f1
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 01000000000000000000000000000000
AD:
CT: 46e05b7116dbe27aaeffe99892194072
TAG: be19d78991c62130cf97f628c37c3eaa
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 0100000000000000000000000000000002000000000000000000000000000000
AD:
CT: 23ddbe9ef342b03003f56d6b4a2e8aff035c7d7cfd705e1ab4502904254bb67a
TAG: 16c5944034050657af7c0fec7efbc40f
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 010000000000000000000000000000000200000000000000000000000000000003000000000000000000000000000000
AD:
CT: b104c8945f280e75b52c05c45a63d1872c7f0552b1501968d9913d71207d0433f978f1a3eecdf782016b77e8c9d3ff53
TAG: abedb4841c20f3b05e61e0fd1fcaf3d0
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 01000000000000000000000000000000020000000000000000000000000000000300000000000000000000000000000004000000000000000000000000000000
AD:
CT: e3f2bd14f4c80c9cea4c90c81f0e4d7eedb87eb19a7c0cf5a5a95cd3e441a71083b1191d115e9a9ff008b93feeb5a86d012a3e0adb89de2d1e3225479022292f
TAG: 3ced67f5e03bb476a738c1343926dc19
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 0200000000000000
AD: 01
CT: 4dca2c16c3b0413c
TAG: ac9b952c76a6f8b5df315f88126daa1c
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 020000000000000000000000
AD: 01
CT: ee0ca9068b5b85dfe115a660
TAG: 756d6155927271077d790a05390ecb71
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 02000000000000000000000000000000
AD: 01
CT: 590edb785c0cb89d19f031fa7e7d4f91
TAG: ac2c8f711c86dbecc8c7b663c5fbc1ea
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 0200000000000000000000000000000003000000000000000000000000000000
AD: 01
CT: dcf2024f5f98d463b82a8673c47dd82159748cac8bcc7c76b8cfa26029cb333c
TAG: a9b406643e190e602fb104fbb842a1ac
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 020000000000000000000000000000000300000000000000000000000000000004000000000000000000000000000000
AD: 01
CT: 79216506b1ddadfe16366e4ec886d10dc9400b995259f74c0091f9b5a6add5680a612130f6c31ab833aa76d9b2be86de
TAG: 3ddfe9ad2c350980942638d3f954ac6d
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 02000000000000000000000000000000030000000000000000000000000000000400000000000000000000000000000005000000000000000000000000000000
AD: 01
CT: 9535eb67240c49f30a0de5a90670813fa615e71fcb4c522ca79d9a33459a22f8c6a56d650bf0b15eecdd706e7689cf6510a281724613fea76b5366b40574b1b9
TAG: abcb59ee31d25ee8889b70d7c36f9a41
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 02000000
AD: 010000000000000000000000
CT: 9611baa0
TAG: 53daf2bc5916f7a6750f2432068dabee
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 0300000000000000000000000000000004000000
AD: 010000000000000000000000000000000200
CT: 78e3a1b54daa6547f775f30c38a45e887aea5c87
TAG: f65187d8c28adba364d659b627b16431
KEY: 0100000000000000000000000000000000000000000000000000000000000000
NONCE: 03000000000000000000000000000000
IN: 030000000000000000000000000000000400
AD: 0100000000000000000000000000000002000000
CT: c6d3d28704bf20067d62e1a3872d40dda44b
TAG: 6ac0135a4379dbc67967ff55fd4d1f2f