Add AES-GCM-SIV tests for counter wrapping.

AES-GCM-SIV specifies that the counter is a 32-bit, unsigned number.
These test vectors are crafted to trigger a wrap-around and ensure that
corner of the spec is implemented correctly.

Change-Id: I911482ca0b6465a7623ee1b74a6cb1d5e54ddbea
Reviewed-on: https://boringssl-review.googlesource.com/16324
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
This commit is contained in:
Adam Langley 2017-05-14 10:11:09 -07:00 committed by CQ bot account: commit-bot@chromium.org
parent 2f238d981a
commit 39655ef01a

View File

@ -562,3 +562,18 @@ IN: e46035c45b6ebf14c5088c5f15f552a4d233de7d3750d7736838a5cd4a7b41df1b71e6c5e6a7
AD: 8eb26d00d61388ca0f06d45cd697e36f11e25f618eaee0562dbba21d10abfd0bbfe232e6efca4947adfa7fc59de529652d11847d3cca84ad147f8905bfd0743be43cd21a9ece92d2d7397f74b1632ec2b1e398565e3f37039f1e147c061b51d59eb31bd16bf830b7824d1ec5e79441e5c5e5131062171467a037c350fd16f58854e3dfd9c1224d26fd600b006d4bcae123a7a9d4e98c47b9e9e3fdbc22abce09b3c24a5a060e371ee70110227c9a8b6049f194dc4f74cc97d01247d76b460774acf7c5d4a8fb4f01888e29ffc517839c234836cf513951435f226e635ff8b02b18225402b026566e951449023fcf7f6bc2285dac1b7dd83028697dac70927db01c22921f6a7a6304052e58c8e87819bbb75de9cbe6239cb1ae8fd4849eb4f48759aed59d5a0ec3108b3131b0b74a4f860e37d02e04b9501e5e3c306cb25820abc50cdfbb05f8e5e2d2b94c58190c5d950f804786fb2ef97eb013f6f049b38fc57561b9cdfce5ae30516050d13d0ad8c1d750b51a552520785a9dd03c68203d91e72e3bab17cd67989bd103532071676718e889b94ee12856547a6d0a6c88c236d7fc7b0d8f222592d00aad4e813f8c738bc10c0b1fbf23bdb2baa56b1047348ed172a15dffd0bab088e2b406f040ef81d3362d0f86d129fde70ffaf87ef3c4554fa43850d1816407b4d5b0459bc622414a2d9cf2809e60e467fde6ecb7f4d9
CT: 98763c2423882eb5a1e9075920b2245f2243341f6dd2dceae7780aa738fab65c7d86f41dd4a64283752db5e86cecaed0ac1afe966171e94f2c30d63a93ff11343ce15ff3bf464d88a6912fbba42c08e6225cfaa63c6da17a6354a34362fda3d993920050dfb99c84a235726aa4cbd66260b0e5675bfe89078e33e76ef537d2071d5801758c6cf07557c0e8bfe0a49aa6e212d69617d1a22ff15a26ae28f4d724d6b537ed34af62672cc9d48836f284cbc7eaae8cd15b46b8e233c94bf3036713f2679e23e0bd829dde5b3a5d7a2d65193f55a45def3d52830cfb1ce3f8208c1425d8171a053ab076c2377f7c26b37970bc3c937db75181a47467b9735be331a0f30a7f3ae135a533153ecd0a5e0cc1568e303a6ba6065c0dca8162a33df7c5b69542938c88e2141e2aa697c48e72ec0573065e9d9a9945cfd070d45218f646e5cf0c0ba145ed1fc7b7cf96c64e3a4671eb6b51ac8eb79bf0b4abd56fffa2ad8a93c001e2baf0b65e257782d7b7e3a837cbae16d40183a8b629467f77f2c7f8640da57904ab75a642e99fe4b45ba7ee488f889b07ce7a4e74540c3e0e0e67f88d473509295a66e27d4ebda1d4d3313add2555477aebf7fb84edbfdba18afc6f04c4af6a90730518a8ce28c12ab90921c413bb822e63cae113e5254039cdcad2dbfecfd97c183679c6c4691c99ba771b1389384259b966f358f871343b4bc5f9a92d8f27588202ae1269658ed91bae33deec6a6a35b9fbc523cc11cbc15024f4dd386b8f41c3fc7097d717099e722e6243a13bc475d5f2b1b2569f14cae6710c8650bfd78520caeceb035f58adae811c0fe9857c8cec59a01123e5eb2774190943c2cc7d535af77ea1f79cdce94e23de21004c73fb8469c230e25fe245c8a5a6314736166a7fe4e1bb0f91ee8d60daa0e576b9b7c6b5957d4bd8d8b928d36aa46fbdf742dd602f9cda2ed1608255d6dc962cc6d3f270d6a42f5185b38e6f0085f39dd17260f0580b62d49cdb668e3e5f76d47dd1deaba0db5b315ed6deb62e6e4388a74ff21903d7bed3c3e87585675a608668bc031aa83e7546cee77bacf9d3f5cbcf00ca71d6f6c86751a5db0d7f7065324d33458b7fe66e2b63bf9d8b514006d14da70f0d64f171a7bc11b2fa5955b85090701260a13cb52b930681e10e9daf89bdffacb9c13b9b60319e3be0ed29f7b7d4723ac5af888375c9e23bc97d3b189ec778eaefb3e4649d1b1ea96979c8f004064abefdfb3479e924dd974ff6478beb1034124b1cf27fc739872bd24bf257df2068475f0b144e61411481a48739e2691e535b64066acce2e0fee9c239c4015014dd38570b01646bbe97a389a3604312f06bcf7ae288790b73434288ba0c90d7015bc1bbcd5a0fe84564cd6a692df04d53716bb96d769074d758bf1199f716cfe5c4c542f9852435fc9675a80b4d
TAG: 9f62d794a54433e79c71a5a5cc8d282e
# Counter wrapping tests
KEY: 0000000000000000000000000000000000000000000000000000000000000000
NONCE: 000000000000000000000000
IN: 000000000000000000000000000000004db923dc793ee6497c76dcc03a98e108
AD:
CT: f3f80f2cf0cb2dd9c5984fcda908456cc537703b5ba70324a6793a7bf218d3ea
TAG: ffffffff000000000000000000000000
KEY: 0000000000000000000000000000000000000000000000000000000000000000
NONCE: 000000000000000000000000
IN: eb3640277c7ffd1303c7a542d02d3e4c0000000000000000
AD:
CT: 18ce4f0b8cb4d0cac65fea8f79257b20888e53e72299e56d
TAG: ffffffff000000000000000000000000