aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/tcrypt.h
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/tcrypt.h')
-rw-r--r--crypto/tcrypt.h90
1 files changed, 90 insertions, 0 deletions
diff --git a/crypto/tcrypt.h b/crypto/tcrypt.h
index 887527bd5bc6..beab3f345584 100644
--- a/crypto/tcrypt.h
+++ b/crypto/tcrypt.h
@@ -3832,6 +3832,96 @@ static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
3832}; 3832};
3833 3833
3834/* 3834/*
3835 * SEED test vectors
3836 */
3837#define SEED_ENC_TEST_VECTORS 4
3838#define SEED_DEC_TEST_VECTORS 4
3839
3840static struct cipher_testvec seed_enc_tv_template[] = {
3841 {
3842 .key = { [0 ... 15] = 0x00 },
3843 .klen = 16,
3844 .input = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
3845 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
3846 .ilen = 16,
3847 .result = { 0x5e, 0xba, 0xc6, 0xe0, 0x05, 0x4e, 0x16, 0x68,
3848 0x19, 0xaf, 0xf1, 0xcc, 0x6d, 0x34, 0x6c, 0xdb },
3849 .rlen = 16,
3850 }, {
3851 .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
3852 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
3853 .klen = 16,
3854 .input = { [0 ... 15] = 0x00 },
3855 .ilen = 16,
3856 .result = { 0xc1, 0x1f, 0x22, 0xf2, 0x01, 0x40, 0x50, 0x50,
3857 0x84, 0x48, 0x35, 0x97, 0xe4, 0x37, 0x0f, 0x43 },
3858 .rlen = 16,
3859 }, {
3860 .key = { 0x47, 0x06, 0x48, 0x08, 0x51, 0xe6, 0x1b, 0xe8,
3861 0x5d, 0x74, 0xbf, 0xb3, 0xfd, 0x95, 0x61, 0x85 },
3862 .klen = 16,
3863 .input = { 0x83, 0xa2, 0xf8, 0xa2, 0x88, 0x64, 0x1f, 0xb9,
3864 0xa4, 0xe9, 0xa5, 0xcc, 0x2f, 0x13, 0x1c, 0x7d },
3865 .ilen = 16,
3866 .result = { 0xee, 0x54, 0xd1, 0x3e, 0xbc, 0xae, 0x70, 0x6d,
3867 0x22, 0x6b, 0xc3, 0x14, 0x2c, 0xd4, 0x0d, 0x4a },
3868 .rlen = 16,
3869 }, {
3870 .key = { 0x28, 0xdb, 0xc3, 0xbc, 0x49, 0xff, 0xd8, 0x7d,
3871 0xcf, 0xa5, 0x09, 0xb1, 0x1d, 0x42, 0x2b, 0xe7 },
3872 .klen = 16,
3873 .input = { 0xb4, 0x1e, 0x6b, 0xe2, 0xeb, 0xa8, 0x4a, 0x14,
3874 0x8e, 0x2e, 0xed, 0x84, 0x59, 0x3c, 0x5e, 0xc7 },
3875 .ilen = 16,
3876 .result = { 0x9b, 0x9b, 0x7b, 0xfc, 0xd1, 0x81, 0x3c, 0xb9,
3877 0x5d, 0x0b, 0x36, 0x18, 0xf4, 0x0f, 0x51, 0x22 },
3878 .rlen = 16,
3879 }
3880};
3881
3882static struct cipher_testvec seed_dec_tv_template[] = {
3883 {
3884 .key = { [0 ... 15] = 0x00 },
3885 .klen = 16,
3886 .input = { 0x5e, 0xba, 0xc6, 0xe0, 0x05, 0x4e, 0x16, 0x68,
3887 0x19, 0xaf, 0xf1, 0xcc, 0x6d, 0x34, 0x6c, 0xdb },
3888 .ilen = 16,
3889 .result = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
3890 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
3891 .rlen = 16,
3892 }, {
3893 .key = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
3894 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
3895 .klen = 16,
3896 .input = { 0xc1, 0x1f, 0x22, 0xf2, 0x01, 0x40, 0x50, 0x50,
3897 0x84, 0x48, 0x35, 0x97, 0xe4, 0x37, 0x0f, 0x43 },
3898 .ilen = 16,
3899 .result = { [0 ... 15] = 0x00 },
3900 .rlen = 16,
3901 }, {
3902 .key = { 0x47, 0x06, 0x48, 0x08, 0x51, 0xe6, 0x1b, 0xe8,
3903 0x5d, 0x74, 0xbf, 0xb3, 0xfd, 0x95, 0x61, 0x85 },
3904 .klen = 16,
3905 .input = { 0xee, 0x54, 0xd1, 0x3e, 0xbc, 0xae, 0x70, 0x6d,
3906 0x22, 0x6b, 0xc3, 0x14, 0x2c, 0xd4, 0x0d, 0x4a },
3907 .ilen = 16,
3908 .result = { 0x83, 0xa2, 0xf8, 0xa2, 0x88, 0x64, 0x1f, 0xb9,
3909 0xa4, 0xe9, 0xa5, 0xcc, 0x2f, 0x13, 0x1c, 0x7d },
3910 .rlen = 16,
3911 }, {
3912 .key = { 0x28, 0xdb, 0xc3, 0xbc, 0x49, 0xff, 0xd8, 0x7d,
3913 0xcf, 0xa5, 0x09, 0xb1, 0x1d, 0x42, 0x2b, 0xe7 },
3914 .klen = 16,
3915 .input = { 0x9b, 0x9b, 0x7b, 0xfc, 0xd1, 0x81, 0x3c, 0xb9,
3916 0x5d, 0x0b, 0x36, 0x18, 0xf4, 0x0f, 0x51, 0x22 },
3917 .ilen = 16,
3918 .result = { 0xb4, 0x1e, 0x6b, 0xe2, 0xeb, 0xa8, 0x4a, 0x14,
3919 0x8e, 0x2e, 0xed, 0x84, 0x59, 0x3c, 0x5e, 0xc7 },
3920 .rlen = 16,
3921 }
3922};
3923
3924/*
3835 * Compression stuff. 3925 * Compression stuff.
3836 */ 3926 */
3837#define COMP_BUF_SIZE 512 3927#define COMP_BUF_SIZE 512