diff options
Diffstat (limited to 'crypto/tcrypt.h')
-rw-r--r-- | crypto/tcrypt.h | 130 |
1 files changed, 57 insertions, 73 deletions
diff --git a/crypto/tcrypt.h b/crypto/tcrypt.h index 05aba22ce6db..439e290f3bce 100644 --- a/crypto/tcrypt.h +++ b/crypto/tcrypt.h | |||
@@ -60,7 +60,6 @@ struct aead_testvec { | |||
60 | char input[512]; | 60 | char input[512]; |
61 | char assoc[512]; | 61 | char assoc[512]; |
62 | char result[512]; | 62 | char result[512]; |
63 | char tag[128]; | ||
64 | unsigned char tap[MAX_TAP]; | 63 | unsigned char tap[MAX_TAP]; |
65 | unsigned char atap[MAX_TAP]; | 64 | unsigned char atap[MAX_TAP]; |
66 | int np; | 65 | int np; |
@@ -71,7 +70,6 @@ struct aead_testvec { | |||
71 | unsigned short ilen; | 70 | unsigned short ilen; |
72 | unsigned short alen; | 71 | unsigned short alen; |
73 | unsigned short rlen; | 72 | unsigned short rlen; |
74 | unsigned short tlen; | ||
75 | }; | 73 | }; |
76 | 74 | ||
77 | struct cipher_speed { | 75 | struct cipher_speed { |
@@ -4682,18 +4680,17 @@ static struct cipher_testvec aes_ctr_dec_tv_template[] = { | |||
4682 | static struct aead_testvec aes_gcm_enc_tv_template[] = { | 4680 | static struct aead_testvec aes_gcm_enc_tv_template[] = { |
4683 | { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */ | 4681 | { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */ |
4684 | .klen = 16, | 4682 | .klen = 16, |
4685 | .tag = { 0x58, 0xe2, 0xfc, 0xce, 0xfa, 0x7e, 0x30, 0x61, | 4683 | .result = { 0x58, 0xe2, 0xfc, 0xce, 0xfa, 0x7e, 0x30, 0x61, |
4686 | 0x36, 0x7f, 0x1d, 0x57, 0xa4, 0xe7, 0x45, 0x5a }, | 4684 | 0x36, 0x7f, 0x1d, 0x57, 0xa4, 0xe7, 0x45, 0x5a }, |
4687 | .tlen = 16 | 4685 | .rlen = 16, |
4688 | }, { | 4686 | }, { |
4689 | .klen = 16, | 4687 | .klen = 16, |
4690 | .ilen = 16, | 4688 | .ilen = 16, |
4691 | .result = { 0x03, 0x88, 0xda, 0xce, 0x60, 0xb6, 0xa3, 0x92, | 4689 | .result = { 0x03, 0x88, 0xda, 0xce, 0x60, 0xb6, 0xa3, 0x92, |
4692 | 0xf3, 0x28, 0xc2, 0xb9, 0x71, 0xb2, 0xfe, 0x78 }, | 4690 | 0xf3, 0x28, 0xc2, 0xb9, 0x71, 0xb2, 0xfe, 0x78, |
4693 | .rlen = 16, | 4691 | 0xab, 0x6e, 0x47, 0xd4, 0x2c, 0xec, 0x13, 0xbd, |
4694 | .tag = { 0xab, 0x6e, 0x47, 0xd4, 0x2c, 0xec, 0x13, 0xbd, | ||
4695 | 0xf5, 0x3a, 0x67, 0xb2, 0x12, 0x57, 0xbd, 0xdf }, | 4692 | 0xf5, 0x3a, 0x67, 0xb2, 0x12, 0x57, 0xbd, 0xdf }, |
4696 | .tlen = 16 | 4693 | .rlen = 32, |
4697 | }, { | 4694 | }, { |
4698 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, | 4695 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, |
4699 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08 }, | 4696 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08 }, |
@@ -4716,11 +4713,10 @@ static struct aead_testvec aes_gcm_enc_tv_template[] = { | |||
4716 | 0x21, 0xd5, 0x14, 0xb2, 0x54, 0x66, 0x93, 0x1c, | 4713 | 0x21, 0xd5, 0x14, 0xb2, 0x54, 0x66, 0x93, 0x1c, |
4717 | 0x7d, 0x8f, 0x6a, 0x5a, 0xac, 0x84, 0xaa, 0x05, | 4714 | 0x7d, 0x8f, 0x6a, 0x5a, 0xac, 0x84, 0xaa, 0x05, |
4718 | 0x1b, 0xa3, 0x0b, 0x39, 0x6a, 0x0a, 0xac, 0x97, | 4715 | 0x1b, 0xa3, 0x0b, 0x39, 0x6a, 0x0a, 0xac, 0x97, |
4719 | 0x3d, 0x58, 0xe0, 0x91, 0x47, 0x3f, 0x59, 0x85 }, | 4716 | 0x3d, 0x58, 0xe0, 0x91, 0x47, 0x3f, 0x59, 0x85, |
4720 | .rlen = 64, | 4717 | 0x4d, 0x5c, 0x2a, 0xf3, 0x27, 0xcd, 0x64, 0xa6, |
4721 | .tag = { 0x4d, 0x5c, 0x2a, 0xf3, 0x27, 0xcd, 0x64, 0xa6, | ||
4722 | 0x2c, 0xf3, 0x5a, 0xbd, 0x2b, 0xa6, 0xfa, 0xb4 }, | 4718 | 0x2c, 0xf3, 0x5a, 0xbd, 0x2b, 0xa6, 0xfa, 0xb4 }, |
4723 | .tlen = 16 | 4719 | .rlen = 80, |
4724 | }, { | 4720 | }, { |
4725 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, | 4721 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, |
4726 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08 }, | 4722 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08 }, |
@@ -4747,25 +4743,23 @@ static struct aead_testvec aes_gcm_enc_tv_template[] = { | |||
4747 | 0x21, 0xd5, 0x14, 0xb2, 0x54, 0x66, 0x93, 0x1c, | 4743 | 0x21, 0xd5, 0x14, 0xb2, 0x54, 0x66, 0x93, 0x1c, |
4748 | 0x7d, 0x8f, 0x6a, 0x5a, 0xac, 0x84, 0xaa, 0x05, | 4744 | 0x7d, 0x8f, 0x6a, 0x5a, 0xac, 0x84, 0xaa, 0x05, |
4749 | 0x1b, 0xa3, 0x0b, 0x39, 0x6a, 0x0a, 0xac, 0x97, | 4745 | 0x1b, 0xa3, 0x0b, 0x39, 0x6a, 0x0a, 0xac, 0x97, |
4750 | 0x3d, 0x58, 0xe0, 0x91 }, | 4746 | 0x3d, 0x58, 0xe0, 0x91, |
4751 | .rlen = 60, | 4747 | 0x5b, 0xc9, 0x4f, 0xbc, 0x32, 0x21, 0xa5, 0xdb, |
4752 | .tag = { 0x5b, 0xc9, 0x4f, 0xbc, 0x32, 0x21, 0xa5, 0xdb, | ||
4753 | 0x94, 0xfa, 0xe9, 0x5a, 0xe7, 0x12, 0x1a, 0x47 }, | 4748 | 0x94, 0xfa, 0xe9, 0x5a, 0xe7, 0x12, 0x1a, 0x47 }, |
4754 | .tlen = 16 | 4749 | .rlen = 76, |
4755 | }, { | 4750 | }, { |
4756 | .klen = 24, | 4751 | .klen = 24, |
4757 | .tag = { 0xcd, 0x33, 0xb2, 0x8a, 0xc7, 0x73, 0xf7, 0x4b, | 4752 | .result = { 0xcd, 0x33, 0xb2, 0x8a, 0xc7, 0x73, 0xf7, 0x4b, |
4758 | 0xa0, 0x0e, 0xd1, 0xf3, 0x12, 0x57, 0x24, 0x35 }, | 4753 | 0xa0, 0x0e, 0xd1, 0xf3, 0x12, 0x57, 0x24, 0x35 }, |
4759 | .tlen = 16 | 4754 | .rlen = 16, |
4760 | }, { | 4755 | }, { |
4761 | .klen = 24, | 4756 | .klen = 24, |
4762 | .ilen = 16, | 4757 | .ilen = 16, |
4763 | .result = { 0x98, 0xe7, 0x24, 0x7c, 0x07, 0xf0, 0xfe, 0x41, | 4758 | .result = { 0x98, 0xe7, 0x24, 0x7c, 0x07, 0xf0, 0xfe, 0x41, |
4764 | 0x1c, 0x26, 0x7e, 0x43, 0x84, 0xb0, 0xf6, 0x00 }, | 4759 | 0x1c, 0x26, 0x7e, 0x43, 0x84, 0xb0, 0xf6, 0x00, |
4765 | .rlen = 16, | 4760 | 0x2f, 0xf5, 0x8d, 0x80, 0x03, 0x39, 0x27, 0xab, |
4766 | .tag = { 0x2f, 0xf5, 0x8d, 0x80, 0x03, 0x39, 0x27, 0xab, | ||
4767 | 0x8e, 0xf4, 0xd4, 0x58, 0x75, 0x14, 0xf0, 0xfb }, | 4761 | 0x8e, 0xf4, 0xd4, 0x58, 0x75, 0x14, 0xf0, 0xfb }, |
4768 | .tlen = 16 | 4762 | .rlen = 32, |
4769 | }, { | 4763 | }, { |
4770 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, | 4764 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, |
4771 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, | 4765 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, |
@@ -4789,11 +4783,10 @@ static struct aead_testvec aes_gcm_enc_tv_template[] = { | |||
4789 | 0x7d, 0x77, 0x3d, 0x00, 0xc1, 0x44, 0xc5, 0x25, | 4783 | 0x7d, 0x77, 0x3d, 0x00, 0xc1, 0x44, 0xc5, 0x25, |
4790 | 0xac, 0x61, 0x9d, 0x18, 0xc8, 0x4a, 0x3f, 0x47, | 4784 | 0xac, 0x61, 0x9d, 0x18, 0xc8, 0x4a, 0x3f, 0x47, |
4791 | 0x18, 0xe2, 0x44, 0x8b, 0x2f, 0xe3, 0x24, 0xd9, | 4785 | 0x18, 0xe2, 0x44, 0x8b, 0x2f, 0xe3, 0x24, 0xd9, |
4792 | 0xcc, 0xda, 0x27, 0x10, 0xac, 0xad, 0xe2, 0x56 }, | 4786 | 0xcc, 0xda, 0x27, 0x10, 0xac, 0xad, 0xe2, 0x56, |
4793 | .rlen = 64, | 4787 | 0x99, 0x24, 0xa7, 0xc8, 0x58, 0x73, 0x36, 0xbf, |
4794 | .tag = { 0x99, 0x24, 0xa7, 0xc8, 0x58, 0x73, 0x36, 0xbf, | ||
4795 | 0xb1, 0x18, 0x02, 0x4d, 0xb8, 0x67, 0x4a, 0x14 }, | 4788 | 0xb1, 0x18, 0x02, 0x4d, 0xb8, 0x67, 0x4a, 0x14 }, |
4796 | .tlen = 16 | 4789 | .rlen = 80, |
4797 | }, { | 4790 | }, { |
4798 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, | 4791 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, |
4799 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, | 4792 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, |
@@ -4821,20 +4814,19 @@ static struct aead_testvec aes_gcm_enc_tv_template[] = { | |||
4821 | 0x7d, 0x77, 0x3d, 0x00, 0xc1, 0x44, 0xc5, 0x25, | 4814 | 0x7d, 0x77, 0x3d, 0x00, 0xc1, 0x44, 0xc5, 0x25, |
4822 | 0xac, 0x61, 0x9d, 0x18, 0xc8, 0x4a, 0x3f, 0x47, | 4815 | 0xac, 0x61, 0x9d, 0x18, 0xc8, 0x4a, 0x3f, 0x47, |
4823 | 0x18, 0xe2, 0x44, 0x8b, 0x2f, 0xe3, 0x24, 0xd9, | 4816 | 0x18, 0xe2, 0x44, 0x8b, 0x2f, 0xe3, 0x24, 0xd9, |
4824 | 0xcc, 0xda, 0x27, 0x10 }, | 4817 | 0xcc, 0xda, 0x27, 0x10, |
4825 | .rlen = 60, | 4818 | 0x25, 0x19, 0x49, 0x8e, 0x80, 0xf1, 0x47, 0x8f, |
4826 | .tag = { 0x25, 0x19, 0x49, 0x8e, 0x80, 0xf1, 0x47, 0x8f, | ||
4827 | 0x37, 0xba, 0x55, 0xbd, 0x6d, 0x27, 0x61, 0x8c }, | 4819 | 0x37, 0xba, 0x55, 0xbd, 0x6d, 0x27, 0x61, 0x8c }, |
4828 | .tlen = 16, | 4820 | .rlen = 76, |
4829 | .np = 2, | 4821 | .np = 2, |
4830 | .tap = { 32, 28 }, | 4822 | .tap = { 32, 28 }, |
4831 | .anp = 2, | 4823 | .anp = 2, |
4832 | .atap = { 8, 12 } | 4824 | .atap = { 8, 12 } |
4833 | }, { | 4825 | }, { |
4834 | .klen = 32, | 4826 | .klen = 32, |
4835 | .tag = { 0x53, 0x0f, 0x8a, 0xfb, 0xc7, 0x45, 0x36, 0xb9, | 4827 | .result = { 0x53, 0x0f, 0x8a, 0xfb, 0xc7, 0x45, 0x36, 0xb9, |
4836 | 0xa9, 0x63, 0xb4, 0xf1, 0xc4, 0xcb, 0x73, 0x8b }, | 4828 | 0xa9, 0x63, 0xb4, 0xf1, 0xc4, 0xcb, 0x73, 0x8b }, |
4837 | .tlen = 16 | 4829 | .rlen = 16, |
4838 | } | 4830 | } |
4839 | }; | 4831 | }; |
4840 | 4832 | ||
@@ -4842,12 +4834,11 @@ static struct aead_testvec aes_gcm_dec_tv_template[] = { | |||
4842 | { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */ | 4834 | { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */ |
4843 | .klen = 32, | 4835 | .klen = 32, |
4844 | .input = { 0xce, 0xa7, 0x40, 0x3d, 0x4d, 0x60, 0x6b, 0x6e, | 4836 | .input = { 0xce, 0xa7, 0x40, 0x3d, 0x4d, 0x60, 0x6b, 0x6e, |
4845 | 0x07, 0x4e, 0xc5, 0xd3, 0xba, 0xf3, 0x9d, 0x18 }, | 4837 | 0x07, 0x4e, 0xc5, 0xd3, 0xba, 0xf3, 0x9d, 0x18, |
4846 | .ilen = 16, | 4838 | 0xd0, 0xd1, 0xc8, 0xa7, 0x99, 0x99, 0x6b, 0xf0, |
4847 | .rlen = 16, | ||
4848 | .tag = { 0xd0, 0xd1, 0xc8, 0xa7, 0x99, 0x99, 0x6b, 0xf0, | ||
4849 | 0x26, 0x5b, 0x98, 0xb5, 0xd4, 0x8a, 0xb9, 0x19 }, | 4839 | 0x26, 0x5b, 0x98, 0xb5, 0xd4, 0x8a, 0xb9, 0x19 }, |
4850 | .tlen = 16 | 4840 | .ilen = 32, |
4841 | .rlen = 16, | ||
4851 | }, { | 4842 | }, { |
4852 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, | 4843 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, |
4853 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, | 4844 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, |
@@ -4863,8 +4854,10 @@ static struct aead_testvec aes_gcm_dec_tv_template[] = { | |||
4863 | 0x8c, 0xb0, 0x8e, 0x48, 0x59, 0x0d, 0xbb, 0x3d, | 4854 | 0x8c, 0xb0, 0x8e, 0x48, 0x59, 0x0d, 0xbb, 0x3d, |
4864 | 0xa7, 0xb0, 0x8b, 0x10, 0x56, 0x82, 0x88, 0x38, | 4855 | 0xa7, 0xb0, 0x8b, 0x10, 0x56, 0x82, 0x88, 0x38, |
4865 | 0xc5, 0xf6, 0x1e, 0x63, 0x93, 0xba, 0x7a, 0x0a, | 4856 | 0xc5, 0xf6, 0x1e, 0x63, 0x93, 0xba, 0x7a, 0x0a, |
4866 | 0xbc, 0xc9, 0xf6, 0x62, 0x89, 0x80, 0x15, 0xad }, | 4857 | 0xbc, 0xc9, 0xf6, 0x62, 0x89, 0x80, 0x15, 0xad, |
4867 | .ilen = 64, | 4858 | 0xb0, 0x94, 0xda, 0xc5, 0xd9, 0x34, 0x71, 0xbd, |
4859 | 0xec, 0x1a, 0x50, 0x22, 0x70, 0xe3, 0xcc, 0x6c }, | ||
4860 | .ilen = 80, | ||
4868 | .result = { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, | 4861 | .result = { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, |
4869 | 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, | 4862 | 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, |
4870 | 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, | 4863 | 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, |
@@ -4874,9 +4867,6 @@ static struct aead_testvec aes_gcm_dec_tv_template[] = { | |||
4874 | 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, | 4867 | 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, |
4875 | 0xba, 0x63, 0x7b, 0x39, 0x1a, 0xaf, 0xd2, 0x55 }, | 4868 | 0xba, 0x63, 0x7b, 0x39, 0x1a, 0xaf, 0xd2, 0x55 }, |
4876 | .rlen = 64, | 4869 | .rlen = 64, |
4877 | .tag = { 0xb0, 0x94, 0xda, 0xc5, 0xd9, 0x34, 0x71, 0xbd, | ||
4878 | 0xec, 0x1a, 0x50, 0x22, 0x70, 0xe3, 0xcc, 0x6c }, | ||
4879 | .tlen = 16 | ||
4880 | }, { | 4870 | }, { |
4881 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, | 4871 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, |
4882 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, | 4872 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, |
@@ -4892,8 +4882,10 @@ static struct aead_testvec aes_gcm_dec_tv_template[] = { | |||
4892 | 0x8c, 0xb0, 0x8e, 0x48, 0x59, 0x0d, 0xbb, 0x3d, | 4882 | 0x8c, 0xb0, 0x8e, 0x48, 0x59, 0x0d, 0xbb, 0x3d, |
4893 | 0xa7, 0xb0, 0x8b, 0x10, 0x56, 0x82, 0x88, 0x38, | 4883 | 0xa7, 0xb0, 0x8b, 0x10, 0x56, 0x82, 0x88, 0x38, |
4894 | 0xc5, 0xf6, 0x1e, 0x63, 0x93, 0xba, 0x7a, 0x0a, | 4884 | 0xc5, 0xf6, 0x1e, 0x63, 0x93, 0xba, 0x7a, 0x0a, |
4895 | 0xbc, 0xc9, 0xf6, 0x62 }, | 4885 | 0xbc, 0xc9, 0xf6, 0x62, |
4896 | .ilen = 60, | 4886 | 0x76, 0xfc, 0x6e, 0xce, 0x0f, 0x4e, 0x17, 0x68, |
4887 | 0xcd, 0xdf, 0x88, 0x53, 0xbb, 0x2d, 0x55, 0x1b }, | ||
4888 | .ilen = 76, | ||
4897 | .assoc = { 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, | 4889 | .assoc = { 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, |
4898 | 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, | 4890 | 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, |
4899 | 0xab, 0xad, 0xda, 0xd2 }, | 4891 | 0xab, 0xad, 0xda, 0xd2 }, |
@@ -4907,11 +4899,8 @@ static struct aead_testvec aes_gcm_dec_tv_template[] = { | |||
4907 | 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, | 4899 | 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, |
4908 | 0xba, 0x63, 0x7b, 0x39 }, | 4900 | 0xba, 0x63, 0x7b, 0x39 }, |
4909 | .rlen = 60, | 4901 | .rlen = 60, |
4910 | .tag = { 0x76, 0xfc, 0x6e, 0xce, 0x0f, 0x4e, 0x17, 0x68, | ||
4911 | 0xcd, 0xdf, 0x88, 0x53, 0xbb, 0x2d, 0x55, 0x1b }, | ||
4912 | .tlen = 16, | ||
4913 | .np = 2, | 4902 | .np = 2, |
4914 | .tap = { 48, 12 }, | 4903 | .tap = { 48, 28 }, |
4915 | .anp = 3, | 4904 | .anp = 3, |
4916 | .atap = { 8, 8, 4 } | 4905 | .atap = { 8, 8, 4 } |
4917 | }, { | 4906 | }, { |
@@ -4927,8 +4916,10 @@ static struct aead_testvec aes_gcm_dec_tv_template[] = { | |||
4927 | 0x21, 0xd5, 0x14, 0xb2, 0x54, 0x66, 0x93, 0x1c, | 4916 | 0x21, 0xd5, 0x14, 0xb2, 0x54, 0x66, 0x93, 0x1c, |
4928 | 0x7d, 0x8f, 0x6a, 0x5a, 0xac, 0x84, 0xaa, 0x05, | 4917 | 0x7d, 0x8f, 0x6a, 0x5a, 0xac, 0x84, 0xaa, 0x05, |
4929 | 0x1b, 0xa3, 0x0b, 0x39, 0x6a, 0x0a, 0xac, 0x97, | 4918 | 0x1b, 0xa3, 0x0b, 0x39, 0x6a, 0x0a, 0xac, 0x97, |
4930 | 0x3d, 0x58, 0xe0, 0x91, 0x47, 0x3f, 0x59, 0x85 }, | 4919 | 0x3d, 0x58, 0xe0, 0x91, 0x47, 0x3f, 0x59, 0x85, |
4931 | .ilen = 64, | 4920 | 0x4d, 0x5c, 0x2a, 0xf3, 0x27, 0xcd, 0x64, 0xa6, |
4921 | 0x2c, 0xf3, 0x5a, 0xbd, 0x2b, 0xa6, 0xfa, 0xb4 }, | ||
4922 | .ilen = 80, | ||
4932 | .result = { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, | 4923 | .result = { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, |
4933 | 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, | 4924 | 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, |
4934 | 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, | 4925 | 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, |
@@ -4938,9 +4929,6 @@ static struct aead_testvec aes_gcm_dec_tv_template[] = { | |||
4938 | 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, | 4929 | 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, |
4939 | 0xba, 0x63, 0x7b, 0x39, 0x1a, 0xaf, 0xd2, 0x55 }, | 4930 | 0xba, 0x63, 0x7b, 0x39, 0x1a, 0xaf, 0xd2, 0x55 }, |
4940 | .rlen = 64, | 4931 | .rlen = 64, |
4941 | .tag = { 0x4d, 0x5c, 0x2a, 0xf3, 0x27, 0xcd, 0x64, 0xa6, | ||
4942 | 0x2c, 0xf3, 0x5a, 0xbd, 0x2b, 0xa6, 0xfa, 0xb4 }, | ||
4943 | .tlen = 16 | ||
4944 | }, { | 4932 | }, { |
4945 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, | 4933 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, |
4946 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08 }, | 4934 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08 }, |
@@ -4954,8 +4942,10 @@ static struct aead_testvec aes_gcm_dec_tv_template[] = { | |||
4954 | 0x21, 0xd5, 0x14, 0xb2, 0x54, 0x66, 0x93, 0x1c, | 4942 | 0x21, 0xd5, 0x14, 0xb2, 0x54, 0x66, 0x93, 0x1c, |
4955 | 0x7d, 0x8f, 0x6a, 0x5a, 0xac, 0x84, 0xaa, 0x05, | 4943 | 0x7d, 0x8f, 0x6a, 0x5a, 0xac, 0x84, 0xaa, 0x05, |
4956 | 0x1b, 0xa3, 0x0b, 0x39, 0x6a, 0x0a, 0xac, 0x97, | 4944 | 0x1b, 0xa3, 0x0b, 0x39, 0x6a, 0x0a, 0xac, 0x97, |
4957 | 0x3d, 0x58, 0xe0, 0x91 }, | 4945 | 0x3d, 0x58, 0xe0, 0x91, |
4958 | .ilen = 60, | 4946 | 0x5b, 0xc9, 0x4f, 0xbc, 0x32, 0x21, 0xa5, 0xdb, |
4947 | 0x94, 0xfa, 0xe9, 0x5a, 0xe7, 0x12, 0x1a, 0x47 }, | ||
4948 | .ilen = 76, | ||
4959 | .assoc = { 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, | 4949 | .assoc = { 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, |
4960 | 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, | 4950 | 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, |
4961 | 0xab, 0xad, 0xda, 0xd2 }, | 4951 | 0xab, 0xad, 0xda, 0xd2 }, |
@@ -4969,18 +4959,14 @@ static struct aead_testvec aes_gcm_dec_tv_template[] = { | |||
4969 | 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, | 4959 | 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, |
4970 | 0xba, 0x63, 0x7b, 0x39 }, | 4960 | 0xba, 0x63, 0x7b, 0x39 }, |
4971 | .rlen = 60, | 4961 | .rlen = 60, |
4972 | .tag = { 0x5b, 0xc9, 0x4f, 0xbc, 0x32, 0x21, 0xa5, 0xdb, | ||
4973 | 0x94, 0xfa, 0xe9, 0x5a, 0xe7, 0x12, 0x1a, 0x47 }, | ||
4974 | .tlen = 16 | ||
4975 | }, { | 4962 | }, { |
4976 | .klen = 24, | 4963 | .klen = 24, |
4977 | .input = { 0x98, 0xe7, 0x24, 0x7c, 0x07, 0xf0, 0xfe, 0x41, | 4964 | .input = { 0x98, 0xe7, 0x24, 0x7c, 0x07, 0xf0, 0xfe, 0x41, |
4978 | 0x1c, 0x26, 0x7e, 0x43, 0x84, 0xb0, 0xf6, 0x00 }, | 4965 | 0x1c, 0x26, 0x7e, 0x43, 0x84, 0xb0, 0xf6, 0x00, |
4979 | .ilen = 16, | 4966 | 0x2f, 0xf5, 0x8d, 0x80, 0x03, 0x39, 0x27, 0xab, |
4980 | .rlen = 16, | ||
4981 | .tag = { 0x2f, 0xf5, 0x8d, 0x80, 0x03, 0x39, 0x27, 0xab, | ||
4982 | 0x8e, 0xf4, 0xd4, 0x58, 0x75, 0x14, 0xf0, 0xfb }, | 4967 | 0x8e, 0xf4, 0xd4, 0x58, 0x75, 0x14, 0xf0, 0xfb }, |
4983 | .tlen = 16 | 4968 | .ilen = 32, |
4969 | .rlen = 16, | ||
4984 | }, { | 4970 | }, { |
4985 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, | 4971 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, |
4986 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, | 4972 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, |
@@ -4995,8 +4981,10 @@ static struct aead_testvec aes_gcm_dec_tv_template[] = { | |||
4995 | 0x7d, 0x77, 0x3d, 0x00, 0xc1, 0x44, 0xc5, 0x25, | 4981 | 0x7d, 0x77, 0x3d, 0x00, 0xc1, 0x44, 0xc5, 0x25, |
4996 | 0xac, 0x61, 0x9d, 0x18, 0xc8, 0x4a, 0x3f, 0x47, | 4982 | 0xac, 0x61, 0x9d, 0x18, 0xc8, 0x4a, 0x3f, 0x47, |
4997 | 0x18, 0xe2, 0x44, 0x8b, 0x2f, 0xe3, 0x24, 0xd9, | 4983 | 0x18, 0xe2, 0x44, 0x8b, 0x2f, 0xe3, 0x24, 0xd9, |
4998 | 0xcc, 0xda, 0x27, 0x10, 0xac, 0xad, 0xe2, 0x56 }, | 4984 | 0xcc, 0xda, 0x27, 0x10, 0xac, 0xad, 0xe2, 0x56, |
4999 | .ilen = 64, | 4985 | 0x99, 0x24, 0xa7, 0xc8, 0x58, 0x73, 0x36, 0xbf, |
4986 | 0xb1, 0x18, 0x02, 0x4d, 0xb8, 0x67, 0x4a, 0x14 }, | ||
4987 | .ilen = 80, | ||
5000 | .result = { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, | 4988 | .result = { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, |
5001 | 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, | 4989 | 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, |
5002 | 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, | 4990 | 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, |
@@ -5006,9 +4994,6 @@ static struct aead_testvec aes_gcm_dec_tv_template[] = { | |||
5006 | 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, | 4994 | 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, |
5007 | 0xba, 0x63, 0x7b, 0x39, 0x1a, 0xaf, 0xd2, 0x55 }, | 4995 | 0xba, 0x63, 0x7b, 0x39, 0x1a, 0xaf, 0xd2, 0x55 }, |
5008 | .rlen = 64, | 4996 | .rlen = 64, |
5009 | .tag = { 0x99, 0x24, 0xa7, 0xc8, 0x58, 0x73, 0x36, 0xbf, | ||
5010 | 0xb1, 0x18, 0x02, 0x4d, 0xb8, 0x67, 0x4a, 0x14 }, | ||
5011 | .tlen = 16 | ||
5012 | }, { | 4997 | }, { |
5013 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, | 4998 | .key = { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, |
5014 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, | 4999 | 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, |
@@ -5023,8 +5008,10 @@ static struct aead_testvec aes_gcm_dec_tv_template[] = { | |||
5023 | 0x7d, 0x77, 0x3d, 0x00, 0xc1, 0x44, 0xc5, 0x25, | 5008 | 0x7d, 0x77, 0x3d, 0x00, 0xc1, 0x44, 0xc5, 0x25, |
5024 | 0xac, 0x61, 0x9d, 0x18, 0xc8, 0x4a, 0x3f, 0x47, | 5009 | 0xac, 0x61, 0x9d, 0x18, 0xc8, 0x4a, 0x3f, 0x47, |
5025 | 0x18, 0xe2, 0x44, 0x8b, 0x2f, 0xe3, 0x24, 0xd9, | 5010 | 0x18, 0xe2, 0x44, 0x8b, 0x2f, 0xe3, 0x24, 0xd9, |
5026 | 0xcc, 0xda, 0x27, 0x10 }, | 5011 | 0xcc, 0xda, 0x27, 0x10, |
5027 | .ilen = 60, | 5012 | 0x25, 0x19, 0x49, 0x8e, 0x80, 0xf1, 0x47, 0x8f, |
5013 | 0x37, 0xba, 0x55, 0xbd, 0x6d, 0x27, 0x61, 0x8c }, | ||
5014 | .ilen = 76, | ||
5028 | .assoc = { 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, | 5015 | .assoc = { 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, |
5029 | 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, | 5016 | 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, |
5030 | 0xab, 0xad, 0xda, 0xd2 }, | 5017 | 0xab, 0xad, 0xda, 0xd2 }, |
@@ -5038,9 +5025,6 @@ static struct aead_testvec aes_gcm_dec_tv_template[] = { | |||
5038 | 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, | 5025 | 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, |
5039 | 0xba, 0x63, 0x7b, 0x39 }, | 5026 | 0xba, 0x63, 0x7b, 0x39 }, |
5040 | .rlen = 60, | 5027 | .rlen = 60, |
5041 | .tag = { 0x25, 0x19, 0x49, 0x8e, 0x80, 0xf1, 0x47, 0x8f, | ||
5042 | 0x37, 0xba, 0x55, 0xbd, 0x6d, 0x27, 0x61, 0x8c }, | ||
5043 | .tlen = 16 | ||
5044 | } | 5028 | } |
5045 | }; | 5029 | }; |
5046 | 5030 | ||