tcrypt.h (5a84d159061d914c8dd4aa372ac6e9529c2be453) | tcrypt.h (e2ee95b8c69e542d6afef3f6f38ea598cc146ba7) |
---|---|
1/* 2 * Quick & dirty crypto testing module. 3 * 4 * This will only exist until we have a better testing mechanism 5 * (e.g. a char device). 6 * 7 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au> 8 * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org> --- 3818 unchanged lines hidden (view full) --- 3827 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 3828 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 3829 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }, 3830 .rlen = 32, 3831 }, 3832}; 3833 3834/* | 1/* 2 * Quick & dirty crypto testing module. 3 * 4 * This will only exist until we have a better testing mechanism 5 * (e.g. a char device). 6 * 7 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au> 8 * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org> --- 3818 unchanged lines hidden (view full) --- 3827 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 3828 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 3829 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f }, 3830 .rlen = 32, 3831 }, 3832}; 3833 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. 3836 */ 3837#define COMP_BUF_SIZE 512 3838 3839struct comp_testvec { 3840 int inlen, outlen; 3841 char input[COMP_BUF_SIZE]; 3842 char output[COMP_BUF_SIZE]; --- 466 unchanged lines hidden --- | 3925 * Compression stuff. 3926 */ 3927#define COMP_BUF_SIZE 512 3928 3929struct comp_testvec { 3930 int inlen, outlen; 3931 char input[COMP_BUF_SIZE]; 3932 char output[COMP_BUF_SIZE]; --- 466 unchanged lines hidden --- |