diff options
Diffstat (limited to 'crypto/testmgr.h')
-rw-r--r-- | crypto/testmgr.h | 196 |
1 files changed, 195 insertions, 1 deletions
diff --git a/crypto/testmgr.h b/crypto/testmgr.h index da0a8fd765f4..ba6530d8ba58 100644 --- a/crypto/testmgr.h +++ b/crypto/testmgr.h | |||
@@ -14139,6 +14139,8 @@ static struct cipher_testvec cast6_xts_dec_tv_template[] = { | |||
14139 | #define AES_DEC_TEST_VECTORS 4 | 14139 | #define AES_DEC_TEST_VECTORS 4 |
14140 | #define AES_CBC_ENC_TEST_VECTORS 5 | 14140 | #define AES_CBC_ENC_TEST_VECTORS 5 |
14141 | #define AES_CBC_DEC_TEST_VECTORS 5 | 14141 | #define AES_CBC_DEC_TEST_VECTORS 5 |
14142 | #define AES_HEH_ENC_TEST_VECTORS 4 | ||
14143 | #define AES_HEH_DEC_TEST_VECTORS 4 | ||
14142 | #define HMAC_MD5_ECB_CIPHER_NULL_ENC_TEST_VECTORS 2 | 14144 | #define HMAC_MD5_ECB_CIPHER_NULL_ENC_TEST_VECTORS 2 |
14143 | #define HMAC_MD5_ECB_CIPHER_NULL_DEC_TEST_VECTORS 2 | 14145 | #define HMAC_MD5_ECB_CIPHER_NULL_DEC_TEST_VECTORS 2 |
14144 | #define HMAC_SHA1_ECB_CIPHER_NULL_ENC_TEST_VEC 2 | 14146 | #define HMAC_SHA1_ECB_CIPHER_NULL_ENC_TEST_VEC 2 |
@@ -14511,6 +14513,198 @@ static struct cipher_testvec aes_dec_tv_template[] = { | |||
14511 | }, | 14513 | }, |
14512 | }; | 14514 | }; |
14513 | 14515 | ||
14516 | static struct cipher_testvec aes_heh_enc_tv_template[] = { | ||
14517 | { | ||
14518 | .key = "\x00\x01\x02\x03\x04\x05\x06\x07" | ||
14519 | "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F", | ||
14520 | .klen = 16, | ||
14521 | .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14522 | "\x00\x00\x00\x00\x00\x00\x00\x00", | ||
14523 | .input = "\x00\x01\x02\x03\x04\x05\x06\x07" | ||
14524 | "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F", | ||
14525 | .ilen = 16, | ||
14526 | .result = "\xd8\xbd\x40\xbf\xca\xe5\xee\x81" | ||
14527 | "\x0f\x3d\x1f\x1f\xae\x89\x07\x55", | ||
14528 | .rlen = 16, | ||
14529 | .also_non_np = 1, | ||
14530 | .np = 2, | ||
14531 | .tap = { 8, 8 }, | ||
14532 | }, { | ||
14533 | .key = "\xa8\xda\x24\x9b\x5e\xfa\x13\xc2" | ||
14534 | "\xc1\x94\xbf\x32\xba\x38\xa3\x77", | ||
14535 | .klen = 16, | ||
14536 | .iv = "\x4d\x47\x61\x37\x2b\x47\x86\xf0" | ||
14537 | "\xd6\x47\xb5\xc2\xe8\xcf\x85\x27", | ||
14538 | .input = "\xb8\xee\x29\xe4\xa5\xd1\xe7\x55" | ||
14539 | "\xd0\xfd\xe7\x22\x63\x76\x36\xe2" | ||
14540 | "\xf8\x0c\xf8\xfe\x65\x76\xe7\xca" | ||
14541 | "\xc1\x42\xf5\xca\x5a\xa8\xac\x2a", | ||
14542 | .ilen = 32, | ||
14543 | .result = "\x59\xf2\x78\x4e\x10\x94\xf9\x5c" | ||
14544 | "\x22\x23\x78\x2a\x30\x48\x11\x97" | ||
14545 | "\xb1\xfe\x70\xc4\xef\xdf\x04\xef" | ||
14546 | "\x16\x39\x04\xcf\xc0\x95\x9a\x98", | ||
14547 | .rlen = 32, | ||
14548 | .also_non_np = 1, | ||
14549 | .np = 3, | ||
14550 | .tap = { 16, 13, 3 }, | ||
14551 | }, { | ||
14552 | .key = "\x00\x01\x02\x03\x04\x05\x06\x07" | ||
14553 | "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F", | ||
14554 | .klen = 16, | ||
14555 | .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14556 | "\x00\x00\x00\x00\x00\x00\x00\x00", | ||
14557 | .input = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14558 | "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14559 | "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14560 | "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14561 | "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14562 | "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14563 | "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14564 | "\x00\x00\x00\x00\x00\x00\x00", | ||
14565 | .ilen = 63, | ||
14566 | .result = "\xe0\x40\xeb\xe9\x52\xbe\x65\x60" | ||
14567 | "\xe4\x68\x68\xa3\x73\x75\xb8\x52" | ||
14568 | "\xef\x38\x6a\x87\x25\x25\xf6\x04" | ||
14569 | "\xe5\x8e\xbe\x14\x8b\x02\x14\x1f" | ||
14570 | "\xa9\x73\xb7\xad\x15\xbe\x9c\xa0" | ||
14571 | "\xd2\x8a\x2c\xdc\xd4\xe3\x05\x55" | ||
14572 | "\x0a\xf5\xf8\x51\xee\xe5\x62\xa5" | ||
14573 | "\x71\xa7\x7c\x15\x5d\x7a\x9e", | ||
14574 | .rlen = 63, | ||
14575 | .also_non_np = 1, | ||
14576 | .np = 8, | ||
14577 | .tap = { 20, 20, 10, 8, 2, 1, 1, 1 }, | ||
14578 | }, { | ||
14579 | .key = "\x00\x01\x02\x03\x04\x05\x06\x07" | ||
14580 | "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F" | ||
14581 | "\x00\x01\x02\x03\x04\x05\x06\x07" | ||
14582 | "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F" | ||
14583 | "\x00\x01\x02\x03\x04\x05\x06\x07" | ||
14584 | "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F", | ||
14585 | .klen = 16, | ||
14586 | .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14587 | "\x00\x00\x00\x00\x00\x00\x00\x00", | ||
14588 | .input = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14589 | "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14590 | "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14591 | "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14592 | "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14593 | "\x00\x00\x00\x00\x00\x00\x00\x01" | ||
14594 | "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14595 | "\x00\x00\x00\x00\x00\x00\x00", | ||
14596 | .ilen = 63, | ||
14597 | .result = "\x4b\x1a\x15\xa0\xaf\x08\x6d\x70" | ||
14598 | "\xf0\xa7\x97\xb5\x31\x4b\x8c\xc3" | ||
14599 | "\x4d\xf2\x7a\x9d\xdd\xd4\x15\x99" | ||
14600 | "\x57\xad\xc6\xb1\x35\x69\xf5\x6a" | ||
14601 | "\x2d\x70\xe4\x97\x49\xb2\x9f\x71" | ||
14602 | "\xde\x22\xb5\x70\x8c\x69\x24\xd3" | ||
14603 | "\xad\x80\x58\x48\x90\xe4\xed\xba" | ||
14604 | "\x76\x3d\x71\x7c\x57\x25\x87", | ||
14605 | .rlen = 63, | ||
14606 | .also_non_np = 1, | ||
14607 | .np = 8, | ||
14608 | .tap = { 20, 20, 10, 8, 2, 1, 1, 1 }, | ||
14609 | } | ||
14610 | }; | ||
14611 | |||
14612 | static struct cipher_testvec aes_heh_dec_tv_template[] = { | ||
14613 | { | ||
14614 | .key = "\x00\x01\x02\x03\x04\x05\x06\x07" | ||
14615 | "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F", | ||
14616 | .klen = 16, | ||
14617 | .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14618 | "\x00\x00\x00\x00\x00\x00\x00\x00", | ||
14619 | .input = "\xd8\xbd\x40\xbf\xca\xe5\xee\x81" | ||
14620 | "\x0f\x3d\x1f\x1f\xae\x89\x07\x55", | ||
14621 | .ilen = 16, | ||
14622 | .result = "\x00\x01\x02\x03\x04\x05\x06\x07" | ||
14623 | "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F", | ||
14624 | .rlen = 16, | ||
14625 | .also_non_np = 1, | ||
14626 | .np = 2, | ||
14627 | .tap = { 8, 8 }, | ||
14628 | }, { | ||
14629 | .key = "\xa8\xda\x24\x9b\x5e\xfa\x13\xc2" | ||
14630 | "\xc1\x94\xbf\x32\xba\x38\xa3\x77", | ||
14631 | .klen = 16, | ||
14632 | .iv = "\x4d\x47\x61\x37\x2b\x47\x86\xf0" | ||
14633 | "\xd6\x47\xb5\xc2\xe8\xcf\x85\x27", | ||
14634 | .input = "\x59\xf2\x78\x4e\x10\x94\xf9\x5c" | ||
14635 | "\x22\x23\x78\x2a\x30\x48\x11\x97" | ||
14636 | "\xb1\xfe\x70\xc4\xef\xdf\x04\xef" | ||
14637 | "\x16\x39\x04\xcf\xc0\x95\x9a\x98", | ||
14638 | .ilen = 32, | ||
14639 | .result = "\xb8\xee\x29\xe4\xa5\xd1\xe7\x55" | ||
14640 | "\xd0\xfd\xe7\x22\x63\x76\x36\xe2" | ||
14641 | "\xf8\x0c\xf8\xfe\x65\x76\xe7\xca" | ||
14642 | "\xc1\x42\xf5\xca\x5a\xa8\xac\x2a", | ||
14643 | .rlen = 32, | ||
14644 | .also_non_np = 1, | ||
14645 | .np = 3, | ||
14646 | .tap = { 16, 13, 3 }, | ||
14647 | }, { | ||
14648 | .key = "\x00\x01\x02\x03\x04\x05\x06\x07" | ||
14649 | "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F", | ||
14650 | .klen = 16, | ||
14651 | .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14652 | "\x00\x00\x00\x00\x00\x00\x00\x00", | ||
14653 | .input = "\xe0\x40\xeb\xe9\x52\xbe\x65\x60" | ||
14654 | "\xe4\x68\x68\xa3\x73\x75\xb8\x52" | ||
14655 | "\xef\x38\x6a\x87\x25\x25\xf6\x04" | ||
14656 | "\xe5\x8e\xbe\x14\x8b\x02\x14\x1f" | ||
14657 | "\xa9\x73\xb7\xad\x15\xbe\x9c\xa0" | ||
14658 | "\xd2\x8a\x2c\xdc\xd4\xe3\x05\x55" | ||
14659 | "\x0a\xf5\xf8\x51\xee\xe5\x62\xa5" | ||
14660 | "\x71\xa7\x7c\x15\x5d\x7a\x9e", | ||
14661 | .ilen = 63, | ||
14662 | .result = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14663 | "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14664 | "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14665 | "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14666 | "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14667 | "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14668 | "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14669 | "\x00\x00\x00\x00\x00\x00\x00", | ||
14670 | .rlen = 63, | ||
14671 | .also_non_np = 1, | ||
14672 | .np = 8, | ||
14673 | .tap = { 20, 20, 10, 8, 2, 1, 1, 1 }, | ||
14674 | }, { | ||
14675 | .key = "\x00\x01\x02\x03\x04\x05\x06\x07" | ||
14676 | "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F" | ||
14677 | "\x00\x01\x02\x03\x04\x05\x06\x07" | ||
14678 | "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F" | ||
14679 | "\x00\x01\x02\x03\x04\x05\x06\x07" | ||
14680 | "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F", | ||
14681 | .klen = 16, | ||
14682 | .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14683 | "\x00\x00\x00\x00\x00\x00\x00\x00", | ||
14684 | .input = "\x4b\x1a\x15\xa0\xaf\x08\x6d\x70" | ||
14685 | "\xf0\xa7\x97\xb5\x31\x4b\x8c\xc3" | ||
14686 | "\x4d\xf2\x7a\x9d\xdd\xd4\x15\x99" | ||
14687 | "\x57\xad\xc6\xb1\x35\x69\xf5\x6a" | ||
14688 | "\x2d\x70\xe4\x97\x49\xb2\x9f\x71" | ||
14689 | "\xde\x22\xb5\x70\x8c\x69\x24\xd3" | ||
14690 | "\xad\x80\x58\x48\x90\xe4\xed\xba" | ||
14691 | "\x76\x3d\x71\x7c\x57\x25\x87", | ||
14692 | .ilen = 63, | ||
14693 | .result = "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14694 | "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14695 | "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14696 | "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14697 | "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14698 | "\x00\x00\x00\x00\x00\x00\x00\x01" | ||
14699 | "\x00\x00\x00\x00\x00\x00\x00\x00" | ||
14700 | "\x00\x00\x00\x00\x00\x00\x00", | ||
14701 | .rlen = 63, | ||
14702 | .also_non_np = 1, | ||
14703 | .np = 8, | ||
14704 | .tap = { 20, 20, 10, 8, 2, 1, 1, 1 }, | ||
14705 | } | ||
14706 | }; | ||
14707 | |||
14514 | static struct cipher_testvec aes_cbc_enc_tv_template[] = { | 14708 | static struct cipher_testvec aes_cbc_enc_tv_template[] = { |
14515 | { /* From RFC 3602 */ | 14709 | { /* From RFC 3602 */ |
14516 | .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b" | 14710 | .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b" |
@@ -21778,7 +21972,7 @@ static struct aead_testvec aes_ccm_enc_tv_template[] = { | |||
21778 | "\x09\x75\x9a\x9b\x3c\x9b\x27\x39", | 21972 | "\x09\x75\x9a\x9b\x3c\x9b\x27\x39", |
21779 | .klen = 32, | 21973 | .klen = 32, |
21780 | .iv = "\x03\xf9\xd9\x4e\x63\xb5\x3d\x9d" | 21974 | .iv = "\x03\xf9\xd9\x4e\x63\xb5\x3d\x9d" |
21781 | "\x43\xf6\x1e\x50", | 21975 | "\x43\xf6\x1e\x50\0\0\0\0", |
21782 | .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b" | 21976 | .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b" |
21783 | "\x13\x02\x01\x0c\x83\x4c\x96\x35" | 21977 | "\x13\x02\x01\x0c\x83\x4c\x96\x35" |
21784 | "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94" | 21978 | "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94" |