Commit 4d3a8b6d authored by Niels Möller's avatar Niels Möller
Browse files

(test_main): Added the rest of the testcases from the spec.

Rev: nettle/testsuite/gcm-test.c:1.5
parent f3530b1c
...@@ -210,35 +210,110 @@ test_main(void) ...@@ -210,35 +210,110 @@ test_main(void)
"e93a19a58e8b473fa0f062f7"), "e93a19a58e8b473fa0f062f7"),
HL("cafebabefacedbad"), HL("cafebabefacedbad"),
H("65dcc57fcf623a24094fcca40d3533f8")); H("65dcc57fcf623a24094fcca40d3533f8"));
#if 0
/* Test case 12 */ /* Test case 12 */
test_gcm_aes( test_gcm_aes(HL("feffe9928665731c6d6a8f9467308308"
); "feffe9928665731c"),
HL("feedfacedeadbeeffeedfacedeadbeef"
"abaddad2"),
HL("d9313225f88406e5a55909c5aff5269a"
"86a7a9531534f7da2e4c303d8a318a72"
"1c3c0c95956809532fcf0e2449a6b525"
"b16aedf5aa0de657ba637b39"),
H("d27e88681ce3243c4830165a8fdcf9ff"
"1de9a1d8e6b447ef6ef7b79828666e45"
"81e79012af34ddd9e2f037589b292db3"
"e67c036745fa22e7e9b7373b"),
HL("9313225df88406e555909c5aff5269aa"
"6a7a9538534f7da1e4c303d2a318a728"
"c3c0c95156809539fcf0e2429a6b5254"
"16aedbf5a0de6a57a637b39b"),
H("dcf566ff291c25bbb8568fc3d376a6d9"));
/* Test case 13 */ /* Test case 13 */
test_gcm_aes( test_gcm_aes(HL("00000000000000000000000000000000"
); "00000000000000000000000000000000"),
HL(""),
HL(""),
H(""),
HL("000000000000000000000000"),
H("530f8afbc74536b9a963b4f1c4cb738b"));
/* Test case 14 */ /* Test case 14 */
test_gcm_aes( test_gcm_aes(HL("00000000000000000000000000000000"
); "00000000000000000000000000000000"),
HL(""),
HL("00000000000000000000000000000000"),
H("cea7403d4d606b6e074ec5d3baf39d18"),
HL("000000000000000000000000"),
H("d0d1c8a799996bf0265b98b5d48ab919"));
/* Test case 15 */ /* Test case 15 */
test_gcm_aes( test_gcm_aes(HL("feffe9928665731c6d6a8f9467308308"
); "feffe9928665731c6d6a8f9467308308"),
HL(""),
HL("d9313225f88406e5a55909c5aff5269a"
"86a7a9531534f7da2e4c303d8a318a72"
"1c3c0c95956809532fcf0e2449a6b525"
"b16aedf5aa0de657ba637b391aafd255"),
H("522dc1f099567d07f47f37a32a84427d"
"643a8cdcbfe5c0c97598a2bd2555d1aa"
"8cb08e48590dbb3da7b08b1056828838"
"c5f61e6393ba7a0abcc9f662898015ad"),
HL("cafebabefacedbaddecaf888"),
H("b094dac5d93471bdec1a502270e3cc6c"));
/* Test case 16 */ /* Test case 16 */
test_gcm_aes( test_gcm_aes(HL("feffe9928665731c6d6a8f9467308308"
); "feffe9928665731c6d6a8f9467308308"),
HL("feedfacedeadbeeffeedfacedeadbeef"
"abaddad2"),
HL("d9313225f88406e5a55909c5aff5269a"
"86a7a9531534f7da2e4c303d8a318a72"
"1c3c0c95956809532fcf0e2449a6b525"
"b16aedf5aa0de657ba637b39"),
H("522dc1f099567d07f47f37a32a84427d"
"643a8cdcbfe5c0c97598a2bd2555d1aa"
"8cb08e48590dbb3da7b08b1056828838"
"c5f61e6393ba7a0abcc9f662"),
HL("cafebabefacedbaddecaf888"),
H("76fc6ece0f4e1768cddf8853bb2d551b"));
/* Test case 17 */ /* Test case 17 */
test_gcm_aes( test_gcm_aes(HL("feffe9928665731c6d6a8f9467308308"
); "feffe9928665731c6d6a8f9467308308"),
HL("feedfacedeadbeeffeedfacedeadbeef"
"abaddad2"),
HL("d9313225f88406e5a55909c5aff5269a"
"86a7a9531534f7da2e4c303d8a318a72"
"1c3c0c95956809532fcf0e2449a6b525"
"b16aedf5aa0de657ba637b39"),
H("c3762df1ca787d32ae47c13bf19844cb"
"af1ae14d0b976afac52ff7d79bba9de0"
"feb582d33934a4f0954cc2363bc73f78"
"62ac430e64abe499f47c9b1f"),
HL("cafebabefacedbad"),
H("3a337dbf46a792c45e454913fe2ea8f2"));
/* Test case 18 */ /* Test case 18 */
test_gcm_aes( test_gcm_aes(HL("feffe9928665731c6d6a8f9467308308"
); "feffe9928665731c6d6a8f9467308308"),
#endif HL("feedfacedeadbeeffeedfacedeadbeef"
"abaddad2"),
HL("d9313225f88406e5a55909c5aff5269a"
"86a7a9531534f7da2e4c303d8a318a72"
"1c3c0c95956809532fcf0e2449a6b525"
"b16aedf5aa0de657ba637b39"),
H("5a8def2f0c9e53f1f75d7853659e2a20"
"eeb2b22aafde6419a058ab4f6f746bf4"
"0fc0c3b780f244452da3ebf1c5d82cde"
"a2418997200ef82e44ae7e3f"),
HL("9313225df88406e555909c5aff5269aa"
"6a7a9538534f7da1e4c303d2a318a728"
"c3c0c95156809539fcf0e2429a6b5254"
"16aedbf5a0de6a57a637b39b"),
H("a44a8266ee1c8eb0c8b5d4cf5ae9f19a"));
SUCCESS(); SUCCESS();
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment