Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: testmgr - add SM4 cts-cbc/xts/xcbc test vectors

This patch newly adds the test vectors of CTS-CBC/XTS/XCBC modes of
the SM4 algorithm, and also added some test vectors for SM4 GCM/CCM.

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Tianjia Zhang and committed by
Herbert Xu
c24ee936 62508017

+996
+19
crypto/testmgr.c
··· 4713 4713 .test = alg_test_null, 4714 4714 .fips_allowed = 1, 4715 4715 }, { 4716 + .alg = "cts(cbc(sm4))", 4717 + .test = alg_test_skcipher, 4718 + .suite = { 4719 + .cipher = __VECS(sm4_cts_tv_template) 4720 + } 4721 + }, { 4716 4722 .alg = "curve25519", 4717 4723 .test = alg_test_kpp, 4718 4724 .suite = { ··· 5593 5587 .hash = __VECS(aes_xcbc128_tv_template) 5594 5588 } 5595 5589 }, { 5590 + .alg = "xcbc(sm4)", 5591 + .test = alg_test_hash, 5592 + .suite = { 5593 + .hash = __VECS(sm4_xcbc128_tv_template) 5594 + } 5595 + }, { 5596 5596 .alg = "xchacha12", 5597 5597 .test = alg_test_skcipher, 5598 5598 .suite = { ··· 5651 5639 .test = alg_test_skcipher, 5652 5640 .suite = { 5653 5641 .cipher = __VECS(serpent_xts_tv_template) 5642 + } 5643 + }, { 5644 + .alg = "xts(sm4)", 5645 + .generic_driver = "xts(ecb(sm4-generic))", 5646 + .test = alg_test_skcipher, 5647 + .suite = { 5648 + .cipher = __VECS(sm4_xts_tv_template) 5654 5649 } 5655 5650 }, { 5656 5651 .alg = "xts(twofish)",
+977
crypto/testmgr.h
··· 14882 14882 } 14883 14883 }; 14884 14884 14885 + static const struct cipher_testvec sm4_cts_tv_template[] = { 14886 + /* Generated from AES-CTS test vectors */ 14887 + { 14888 + .klen = 16, 14889 + .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20" 14890 + "\x74\x65\x72\x69\x79\x61\x6b\x69", 14891 + .ptext = "\x49\x20\x77\x6f\x75\x6c\x64\x20" 14892 + "\x6c\x69\x6b\x65\x20\x74\x68\x65" 14893 + "\x20", 14894 + .len = 17, 14895 + .ctext = "\x05\xfe\x23\xee\x17\xa2\x89\x98" 14896 + "\xbc\x97\x0a\x0b\x54\x67\xca\xd7" 14897 + "\xd6", 14898 + }, { 14899 + .klen = 16, 14900 + .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20" 14901 + "\x74\x65\x72\x69\x79\x61\x6b\x69", 14902 + .ptext = "\x49\x20\x77\x6f\x75\x6c\x64\x20" 14903 + "\x6c\x69\x6b\x65\x20\x74\x68\x65" 14904 + "\x20\x47\x65\x6e\x65\x72\x61\x6c" 14905 + "\x20\x47\x61\x75\x27\x73\x20", 14906 + .len = 31, 14907 + .ctext = "\x15\x46\xe4\x95\xa4\xec\xf0\xb8" 14908 + "\x49\xd6\x6a\x9d\x89\xc7\xfd\x70" 14909 + "\xd6\x71\xc8\xc0\x4d\x52\x7c\x66" 14910 + "\x93\xf7\x70\xbb\xa8\x3f\xa3", 14911 + }, { 14912 + .klen = 16, 14913 + .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20" 14914 + "\x74\x65\x72\x69\x79\x61\x6b\x69", 14915 + .ptext = "\x49\x20\x77\x6f\x75\x6c\x64\x20" 14916 + "\x6c\x69\x6b\x65\x20\x74\x68\x65" 14917 + "\x20\x47\x65\x6e\x65\x72\x61\x6c" 14918 + "\x20\x47\x61\x75\x27\x73\x20\x43", 14919 + .len = 32, 14920 + .ctext = "\x89\xc7\x99\x3f\x87\x69\x5c\xd3" 14921 + "\x01\x6a\xbf\xd4\x3f\x79\x02\xa3" 14922 + "\xd6\x71\xc8\xc0\x4d\x52\x7c\x66" 14923 + "\x93\xf7\x70\xbb\xa8\x3f\xa3\xcf", 14924 + }, { 14925 + .klen = 16, 14926 + .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20" 14927 + "\x74\x65\x72\x69\x79\x61\x6b\x69", 14928 + .ptext = "\x49\x20\x77\x6f\x75\x6c\x64\x20" 14929 + "\x6c\x69\x6b\x65\x20\x74\x68\x65" 14930 + "\x20\x47\x65\x6e\x65\x72\x61\x6c" 14931 + "\x20\x47\x61\x75\x27\x73\x20\x43" 14932 + "\x68\x69\x63\x6b\x65\x6e\x2c\x20" 14933 + "\x70\x6c\x65\x61\x73\x65\x2c", 14934 + .len = 47, 14935 + .ctext = "\xd6\x71\xc8\xc0\x4d\x52\x7c\x66" 14936 + "\x93\xf7\x70\xbb\xa8\x3f\xa3\xcf" 14937 + "\xd3\xe1\xdc\xeb\xfa\x04\x11\x99" 14938 + "\xde\xcf\x6f\x4d\x7b\x09\x92\x7f" 14939 + "\x89\xc7\x99\x3f\x87\x69\x5c\xd3" 14940 + "\x01\x6a\xbf\xd4\x3f\x79\x02", 14941 + }, { 14942 + .klen = 16, 14943 + .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20" 14944 + "\x74\x65\x72\x69\x79\x61\x6b\x69", 14945 + .ptext = "\x49\x20\x77\x6f\x75\x6c\x64\x20" 14946 + "\x6c\x69\x6b\x65\x20\x74\x68\x65" 14947 + "\x20\x47\x65\x6e\x65\x72\x61\x6c" 14948 + "\x20\x47\x61\x75\x27\x73\x20\x43" 14949 + "\x68\x69\x63\x6b\x65\x6e\x2c\x20" 14950 + "\x70\x6c\x65\x61\x73\x65\x2c\x20", 14951 + .len = 48, 14952 + .ctext = "\xd6\x71\xc8\xc0\x4d\x52\x7c\x66" 14953 + "\x93\xf7\x70\xbb\xa8\x3f\xa3\xcf" 14954 + "\x9a\xbd\x7b\xfe\x82\xab\xcc\x7f" 14955 + "\xbd\x99\x21\x0c\x5e\x4d\xed\x20" 14956 + "\x89\xc7\x99\x3f\x87\x69\x5c\xd3" 14957 + "\x01\x6a\xbf\xd4\x3f\x79\x02\xa3", 14958 + }, { 14959 + .klen = 16, 14960 + .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20" 14961 + "\x74\x65\x72\x69\x79\x61\x6b\x69", 14962 + .ptext = "\x49\x20\x77\x6f\x75\x6c\x64\x20" 14963 + "\x6c\x69\x6b\x65\x20\x74\x68\x65" 14964 + "\x20\x47\x65\x6e\x65\x72\x61\x6c" 14965 + "\x20\x47\x61\x75\x27\x73\x20\x43" 14966 + "\x68\x69\x63\x6b\x65\x6e\x2c\x20" 14967 + "\x70\x6c\x65\x61\x73\x65\x2c\x20" 14968 + "\x61\x6e\x64\x20\x77\x6f\x6e\x74" 14969 + "\x6f\x6e\x20\x73\x6f\x75\x70\x2e", 14970 + .len = 64, 14971 + .ctext = "\xd6\x71\xc8\xc0\x4d\x52\x7c\x66" 14972 + "\x93\xf7\x70\xbb\xa8\x3f\xa3\xcf" 14973 + "\x89\xc7\x99\x3f\x87\x69\x5c\xd3" 14974 + "\x01\x6a\xbf\xd4\x3f\x79\x02\xa3" 14975 + "\x58\x19\xa4\x8f\xa9\x68\x5e\x6b" 14976 + "\x2c\x0f\x81\x60\x15\x98\x27\x4f" 14977 + "\x9a\xbd\x7b\xfe\x82\xab\xcc\x7f" 14978 + "\xbd\x99\x21\x0c\x5e\x4d\xed\x20", 14979 + } 14980 + }; 14981 + 14982 + static const struct cipher_testvec sm4_xts_tv_template[] = { 14983 + /* Generated from AES-XTS test vectors */ 14984 + { 14985 + .key = "\x00\x00\x00\x00\x00\x00\x00\x00" 14986 + "\x00\x00\x00\x00\x00\x00\x00\x00" 14987 + "\x00\x00\x00\x00\x00\x00\x00\x00" 14988 + "\x00\x00\x00\x00\x00\x00\x00\x00", 14989 + .klen = 32, 14990 + .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" 14991 + "\x00\x00\x00\x00\x00\x00\x00\x00", 14992 + .ptext = "\x00\x00\x00\x00\x00\x00\x00\x00" 14993 + "\x00\x00\x00\x00\x00\x00\x00\x00" 14994 + "\x00\x00\x00\x00\x00\x00\x00\x00" 14995 + "\x00\x00\x00\x00\x00\x00\x00\x00", 14996 + .ctext = "\xd9\xb4\x21\xf7\x31\xc8\x94\xfd" 14997 + "\xc3\x5b\x77\x29\x1f\xe4\xe3\xb0" 14998 + "\x2a\x1f\xb7\x66\x98\xd5\x9f\x0e" 14999 + "\x51\x37\x6c\x4a\xda\x5b\xc7\x5d", 15000 + .len = 32, 15001 + }, { 15002 + .key = "\x11\x11\x11\x11\x11\x11\x11\x11" 15003 + "\x11\x11\x11\x11\x11\x11\x11\x11" 15004 + "\x22\x22\x22\x22\x22\x22\x22\x22" 15005 + "\x22\x22\x22\x22\x22\x22\x22\x22", 15006 + .klen = 32, 15007 + .iv = "\x33\x33\x33\x33\x33\x00\x00\x00" 15008 + "\x00\x00\x00\x00\x00\x00\x00\x00", 15009 + .ptext = "\x44\x44\x44\x44\x44\x44\x44\x44" 15010 + "\x44\x44\x44\x44\x44\x44\x44\x44" 15011 + "\x44\x44\x44\x44\x44\x44\x44\x44" 15012 + "\x44\x44\x44\x44\x44\x44\x44\x44", 15013 + .ctext = "\xa7\x4d\x72\x6c\x11\x19\x6a\x32" 15014 + "\xbe\x04\xe0\x01\xff\x29\xd0\xc7" 15015 + "\x93\x2f\x9f\x3e\xc2\x9b\xfc\xb6" 15016 + "\x4d\xd1\x7f\x63\xcb\xd3\xea\x31", 15017 + .len = 32, 15018 + }, { 15019 + .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8" 15020 + "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0" 15021 + "\x22\x22\x22\x22\x22\x22\x22\x22" 15022 + "\x22\x22\x22\x22\x22\x22\x22\x22", 15023 + .klen = 32, 15024 + .iv = "\x33\x33\x33\x33\x33\x00\x00\x00" 15025 + "\x00\x00\x00\x00\x00\x00\x00\x00", 15026 + .ptext = "\x44\x44\x44\x44\x44\x44\x44\x44" 15027 + "\x44\x44\x44\x44\x44\x44\x44\x44" 15028 + "\x44\x44\x44\x44\x44\x44\x44\x44" 15029 + "\x44\x44\x44\x44\x44\x44\x44\x44", 15030 + .ctext = "\x7f\x76\x08\x8e\xff\xad\xf7\x0c" 15031 + "\x02\xea\x9f\x95\xda\x06\x28\xd3" 15032 + "\x51\xbf\xcb\x9e\xac\x05\x63\xbc" 15033 + "\xf1\x7b\x71\x0d\xab\x0a\x98\x26", 15034 + .len = 32, 15035 + }, { 15036 + .key = "\x27\x18\x28\x18\x28\x45\x90\x45" 15037 + "\x23\x53\x60\x28\x74\x71\x35\x26" 15038 + "\x31\x41\x59\x26\x53\x58\x97\x93" 15039 + "\x23\x84\x62\x64\x33\x83\x27\x95", 15040 + .klen = 32, 15041 + .iv = "\x00\x00\x00\x00\x00\x00\x00\x00" 15042 + "\x00\x00\x00\x00\x00\x00\x00\x00", 15043 + .ptext = "\x00\x01\x02\x03\x04\x05\x06\x07" 15044 + "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" 15045 + "\x10\x11\x12\x13\x14\x15\x16\x17" 15046 + "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" 15047 + "\x20\x21\x22\x23\x24\x25\x26\x27" 15048 + "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f" 15049 + "\x30\x31\x32\x33\x34\x35\x36\x37" 15050 + "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f" 15051 + "\x40\x41\x42\x43\x44\x45\x46\x47" 15052 + "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f" 15053 + "\x50\x51\x52\x53\x54\x55\x56\x57" 15054 + "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f" 15055 + "\x60\x61\x62\x63\x64\x65\x66\x67" 15056 + "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f" 15057 + "\x70\x71\x72\x73\x74\x75\x76\x77" 15058 + "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f" 15059 + "\x80\x81\x82\x83\x84\x85\x86\x87" 15060 + "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f" 15061 + "\x90\x91\x92\x93\x94\x95\x96\x97" 15062 + "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f" 15063 + "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7" 15064 + "\xa8\xa9\xaa\xab\xac\xad\xae\xaf" 15065 + "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7" 15066 + "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf" 15067 + "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7" 15068 + "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf" 15069 + "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7" 15070 + "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" 15071 + "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7" 15072 + "\xe8\xe9\xea\xeb\xec\xed\xee\xef" 15073 + "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7" 15074 + "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff" 15075 + "\x00\x01\x02\x03\x04\x05\x06\x07" 15076 + "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" 15077 + "\x10\x11\x12\x13\x14\x15\x16\x17" 15078 + "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" 15079 + "\x20\x21\x22\x23\x24\x25\x26\x27" 15080 + "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f" 15081 + "\x30\x31\x32\x33\x34\x35\x36\x37" 15082 + "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f" 15083 + "\x40\x41\x42\x43\x44\x45\x46\x47" 15084 + "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f" 15085 + "\x50\x51\x52\x53\x54\x55\x56\x57" 15086 + "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f" 15087 + "\x60\x61\x62\x63\x64\x65\x66\x67" 15088 + "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f" 15089 + "\x70\x71\x72\x73\x74\x75\x76\x77" 15090 + "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f" 15091 + "\x80\x81\x82\x83\x84\x85\x86\x87" 15092 + "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f" 15093 + "\x90\x91\x92\x93\x94\x95\x96\x97" 15094 + "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f" 15095 + "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7" 15096 + "\xa8\xa9\xaa\xab\xac\xad\xae\xaf" 15097 + "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7" 15098 + "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf" 15099 + "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7" 15100 + "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf" 15101 + "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7" 15102 + "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf" 15103 + "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7" 15104 + "\xe8\xe9\xea\xeb\xec\xed\xee\xef" 15105 + "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7" 15106 + "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff", 15107 + .ctext = "\x54\xdd\x65\xb6\x32\x6f\xae\xa8" 15108 + "\xfa\xd1\xa8\x3c\x63\x61\x4a\xf3" 15109 + "\x9f\x72\x1d\x8d\xfe\x17\x7a\x30" 15110 + "\xb6\x6a\xbf\x6a\x44\x99\x80\xe1" 15111 + "\xcd\xbe\x06\xaf\xb7\x33\x36\xf3" 15112 + "\x7a\x4d\x39\xde\x96\x4a\x30\xd7" 15113 + "\xd0\x4a\x37\x99\x16\x9c\x60\x25" 15114 + "\x8f\x6b\x74\x8a\x61\x86\x1a\xa5" 15115 + "\xec\x92\xa2\xc1\x5b\x2b\x7c\x61" 15116 + "\x5a\x42\xab\xa4\x99\xbb\xd6\xb7" 15117 + "\x1d\xb9\xc7\x89\xb2\x18\x20\x89" 15118 + "\xa2\x5d\xd3\xdf\x80\x0e\xd1\x86" 15119 + "\x4d\x19\xf7\xed\x45\xfd\x17\xa9" 15120 + "\x48\x0b\x0f\xb8\x2d\x9b\x7f\xc3" 15121 + "\xed\x57\xe9\xa1\x14\x0e\xaa\x77" 15122 + "\x8d\xd2\xdd\x67\x9e\x3e\xdc\x3d" 15123 + "\xc4\xd5\x5c\x95\x0e\xbc\x53\x1d" 15124 + "\x95\x92\xf7\xc4\x63\x82\x56\xd5" 15125 + "\x65\x18\x29\x2a\x20\xaf\x98\xfd" 15126 + "\xd3\xa6\x36\x00\x35\x0a\x70\xab" 15127 + "\x5a\x40\xf4\xc2\x85\x03\x7c\xa0" 15128 + "\x1f\x25\x1f\x19\xec\xae\x03\x29" 15129 + "\xff\x77\xad\x88\xcd\x5a\x4c\xde" 15130 + "\xa2\xae\xab\xc2\x21\x48\xff\xbd" 15131 + "\x23\x9b\xd1\x05\x15\xbd\xe1\x13" 15132 + "\x1d\xec\x84\x04\xe4\x43\xdc\x76" 15133 + "\x31\x40\xd5\xf2\x2b\xf3\x3e\x0c" 15134 + "\x68\x72\xd6\xb8\x1d\x63\x0f\x6f" 15135 + "\x00\xcd\xd0\x58\xfe\x80\xf9\xcb" 15136 + "\xfb\x77\x70\x7f\x93\xce\xe2\xca" 15137 + "\x92\xb9\x15\xb8\x30\x40\x27\xc1" 15138 + "\x90\xa8\x4e\x2d\x65\xe0\x18\xcc" 15139 + "\x6a\x38\x7d\x37\x66\xac\xdb\x28" 15140 + "\x25\x32\x84\xe8\xdb\x9a\xcf\x8f" 15141 + "\x52\x28\x0d\xdc\x6d\x00\x33\xd2" 15142 + "\xcc\xaa\xa4\xf9\xae\xff\x12\x36" 15143 + "\x69\xbc\x02\x4f\xd6\x76\x8e\xdf" 15144 + "\x8b\xc1\xf8\xd6\x22\xc1\x9c\x60" 15145 + "\x9e\xf9\x7f\x60\x91\x90\xcd\x11" 15146 + "\x02\x41\xe7\xfb\x08\x4e\xd8\x94" 15147 + "\x2d\xa1\xf9\xb9\xcf\x1b\x51\x4b" 15148 + "\x61\xa3\x88\xb3\x0e\xa6\x1a\x4a" 15149 + "\x74\x5b\x38\x1e\xe7\xad\x6c\x4d" 15150 + "\xb1\x27\x54\x53\xb8\x41\x3f\x98" 15151 + "\xdf\x6e\x4a\x40\x98\x6e\xe4\xb5" 15152 + "\x9a\xf5\xdf\xae\xcd\x30\x12\x65" 15153 + "\x17\x90\x67\xa0\x0d\x7c\xa3\x5a" 15154 + "\xb9\x5a\xbd\x61\x7a\xde\xa2\x8e" 15155 + "\xc1\xc2\x6a\x97\xde\x28\xb8\xbf" 15156 + "\xe3\x01\x20\xd6\xae\xfb\xd2\x58" 15157 + "\xc5\x9e\x42\xd1\x61\xe8\x06\x5a" 15158 + "\x78\x10\x6b\xdc\xa5\xcd\x90\xfb" 15159 + "\x3a\xac\x4e\x93\x86\x6c\x8a\x7f" 15160 + "\x96\x76\x86\x0a\x79\x14\x5b\xd9" 15161 + "\x2e\x02\xe8\x19\xa9\x0b\xe0\xb9" 15162 + "\x7c\xc5\x22\xb3\x21\x06\x85\x6f" 15163 + "\xdf\x0e\x54\xd8\x8e\x46\x24\x15" 15164 + "\x5a\x2f\x1c\x14\xea\xea\xa1\x63" 15165 + "\xf8\x58\xe9\x9a\x80\x6e\x79\x1a" 15166 + "\xcd\x82\xf1\xb0\xe2\x9f\x00\x28" 15167 + "\xa4\xc3\x8e\x97\x6f\x57\x1a\x93" 15168 + "\xf4\xfd\x57\xd7\x87\xc2\x4d\xb0" 15169 + "\xe0\x1c\xa3\x04\xe5\xa5\xc4\xdd" 15170 + "\x50\xcf\x8b\xdb\xf4\x91\xe5\x7c", 15171 + .len = 512, 15172 + }, { 15173 + .key = "\x62\x49\x77\x57\x24\x70\x93\x69" 15174 + "\x99\x59\x57\x49\x66\x96\x76\x27" 15175 + "\x02\x88\x41\x97\x16\x93\x99\x37" 15176 + "\x51\x05\x82\x09\x74\x94\x45\x92", 15177 + .klen = 32, 15178 + .iv = "\xff\x00\x00\x00\x00\x00\x00\x00" 15179 + "\x00\x00\x00\x00\x00\x00\x00\x00", 15180 + .ptext = "\x00\x01\x02\x03\x04\x05\x06\x07" 15181 + "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" 15182 + "\x10\x11\x12\x13\x14\x15\x16\x17" 15183 + "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" 15184 + "\x20\x21\x22\x23\x24\x25\x26\x27" 15185 + "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f" 15186 + "\x30\x31\x32\x33\x34\x35\x36\x37" 15187 + "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f" 15188 + "\x40\x41\x42\x43\x44\x45\x46\x47" 15189 + "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f" 15190 + "\x50\x51\x52\x53\x54\x55\x56\x57" 15191 + "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f" 15192 + "\x60\x61\x62\x63\x64\x65\x66\x67" 15193 + "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f" 15194 + "\x70\x71\x72\x73\x74\x75\x76\x77" 15195 + "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f" 15196 + "\x80\x81\x82\x83\x84\x85\x86\x87" 15197 + "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f" 15198 + "\x90\x91\x92\x93\x94\x95\x96\x97" 15199 + "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f" 15200 + "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7" 15201 + "\xa8\xa9\xaa\xab\xac\xad\xae\xaf" 15202 + "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7" 15203 + "\xf8\xf9\xfa\xfb\xfc", 15204 + .ctext = "\xa2\x9f\x9e\x4e\x71\xdb\x28\x3c" 15205 + "\x80\x0e\xf6\xb7\x8e\x57\x1c\xba" 15206 + "\x90\xda\x3b\x6c\x22\x00\x68\x30" 15207 + "\x1d\x63\x0d\x9e\x6a\xad\x37\x55" 15208 + "\xbc\x77\x1e\xc9\xad\x83\x30\xd5" 15209 + "\x27\xb2\x66\x77\x18\x3c\xa6\x39" 15210 + "\x9c\x0a\xaa\x1f\x02\xe1\xd5\x65" 15211 + "\x9b\x8d\xc5\x97\x3d\xc5\x04\x53" 15212 + "\x78\x00\xe3\xb0\x1a\x43\x4e\xb7" 15213 + "\xc4\x9f\x38\xc5\x7b\xa4\x70\x64" 15214 + "\x78\xe6\x32\xd9\x65\x44\xc5\x64" 15215 + "\xb8\x42\x35\x99\xff\x66\x75\xb0" 15216 + "\x22\xd3\x9b\x6e\x8d\xcf\x6a\x24" 15217 + "\xfd\x92\xb7\x1b\x04\x28\x2a\x61" 15218 + "\xdc\x96\x2a\x20\x7a\x2c\xf1\xf9" 15219 + "\x12\x15\xf0\x4d\xcf\x2b\xde\x33" 15220 + "\x41\xbc\xe7\x85\x87\x22\xb7\x16" 15221 + "\x02\x1c\xd8\xa2\x0f\x1f\xa3\xe9" 15222 + "\xd8\x45\x48\xe7\xbe\x08\x4e\x4e" 15223 + "\x23\x79\x84\xdb\x40\x76\xf5\x13" 15224 + "\x78\x92\x4a\x2f\xf9\x1b\xf2\x80" 15225 + "\x25\x74\x51\x45\x9a\x77\x78\x97" 15226 + "\xd3\xe0\xc7\xc4\x35\x67\x2a\xe6" 15227 + "\xb3\x0d\x62\x9f\x8b", 15228 + .len = 189, 15229 + }, 15230 + }; 15231 + 14885 15232 static const struct aead_testvec sm4_gcm_tv_template[] = { 14886 15233 { /* From https://datatracker.ietf.org/doc/html/rfc8998#appendix-A.1 */ 14887 15234 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF" ··· 15260 14913 "\x83\xDE\x35\x41\xE4\xC2\xB5\x81" 15261 14914 "\x77\xE0\x65\xA9\xBF\x7B\x62\xEC", 15262 14915 .clen = 80, 14916 + }, { /* Generated from AES-GCM test vectors */ 14917 + .key = zeroed_string, 14918 + .klen = 16, 14919 + .ctext = "\x23\x2f\x0c\xfe\x30\x8b\x49\xea" 14920 + "\x6f\xc8\x82\x29\xb5\xdc\x85\x8d", 14921 + .clen = 16, 14922 + }, { 14923 + .key = zeroed_string, 14924 + .klen = 16, 14925 + .ptext = zeroed_string, 14926 + .plen = 16, 14927 + .ctext = "\x7d\xe2\xaa\x7f\x11\x10\x18\x82" 14928 + "\x18\x06\x3b\xe1\xbf\xeb\x6d\x89" 14929 + "\xb8\x51\xb5\xf3\x94\x93\x75\x2b" 14930 + "\xe5\x08\xf1\xbb\x44\x82\xc5\x57", 14931 + .clen = 32, 14932 + }, { 14933 + .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c" 14934 + "\x6d\x6a\x8f\x94\x67\x30\x83\x08", 14935 + .klen = 16, 14936 + .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad" 14937 + "\xde\xca\xf8\x88", 14938 + .ptext = "\xd9\x31\x32\x25\xf8\x84\x06\xe5" 14939 + "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a" 14940 + "\x86\xa7\xa9\x53\x15\x34\xf7\xda" 14941 + "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72" 14942 + "\x1c\x3c\x0c\x95\x95\x68\x09\x53" 14943 + "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25" 14944 + "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57" 14945 + "\xba\x63\x7b\x39\x1a\xaf\xd2\x55", 14946 + .plen = 64, 14947 + .ctext = "\xe4\x11\x0f\xf1\xc1\x41\x97\xe6" 14948 + "\x76\x21\x6a\x33\x83\x10\x41\xeb" 14949 + "\x09\x58\x00\x11\x7b\xdc\x3f\x75" 14950 + "\x1a\x49\x6e\xfc\xf2\xbb\xdf\xdb" 14951 + "\x3a\x2e\x13\xfd\xc5\xc1\x9d\x07" 14952 + "\x1a\xe5\x48\x3f\xed\xde\x98\x5d" 14953 + "\x3f\x2d\x5b\x4e\xee\x0b\xb6\xdf" 14954 + "\xe3\x63\x36\x83\x23\xf7\x5b\x80" 14955 + "\x7d\xfe\x77\xef\x71\xb1\x5e\xc9" 14956 + "\x52\x6b\x09\xab\x84\x28\x4b\x8a", 14957 + .clen = 80, 14958 + }, { 14959 + .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c" 14960 + "\x6d\x6a\x8f\x94\x67\x30\x83\x08", 14961 + .klen = 16, 14962 + .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad" 14963 + "\xde\xca\xf8\x88", 14964 + .ptext = "\xd9\x31\x32\x25\xf8\x84\x06\xe5" 14965 + "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a" 14966 + "\x86\xa7\xa9\x53\x15\x34\xf7\xda" 14967 + "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72" 14968 + "\x1c\x3c\x0c\x95\x95\x68\x09\x53" 14969 + "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25" 14970 + "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57" 14971 + "\xba\x63\x7b\x39", 14972 + .plen = 60, 14973 + .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef" 14974 + "\xfe\xed\xfa\xce\xde\xad\xbe\xef" 14975 + "\xab\xad\xda\xd2", 14976 + .alen = 20, 14977 + .ctext = "\xe4\x11\x0f\xf1\xc1\x41\x97\xe6" 14978 + "\x76\x21\x6a\x33\x83\x10\x41\xeb" 14979 + "\x09\x58\x00\x11\x7b\xdc\x3f\x75" 14980 + "\x1a\x49\x6e\xfc\xf2\xbb\xdf\xdb" 14981 + "\x3a\x2e\x13\xfd\xc5\xc1\x9d\x07" 14982 + "\x1a\xe5\x48\x3f\xed\xde\x98\x5d" 14983 + "\x3f\x2d\x5b\x4e\xee\x0b\xb6\xdf" 14984 + "\xe3\x63\x36\x83" 14985 + "\x89\xf6\xba\x35\xb8\x18\xd3\xcc" 14986 + "\x38\x6c\x05\xb3\x8a\xcb\xc9\xde", 14987 + .clen = 76, 14988 + }, { 14989 + .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c" 14990 + "\xfe\xff\xe9\x92\x86\x65\x73\x1c", 14991 + .klen = 16, 14992 + .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad" 14993 + "\xde\xca\xf8\x88", 14994 + .ptext = "\xd9\x31\x32\x25\xf8\x84\x06\xe5" 14995 + "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a" 14996 + "\x86\xa7\xa9\x53\x15\x34\xf7\xda" 14997 + "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72" 14998 + "\x1c\x3c\x0c\x95\x95\x68\x09\x53" 14999 + "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25" 15000 + "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57" 15001 + "\xba\x63\x7b\x39", 15002 + .plen = 60, 15003 + .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef" 15004 + "\xfe\xed\xfa\xce\xde\xad\xbe\xef" 15005 + "\xab\xad\xda\xd2", 15006 + .alen = 20, 15007 + .ctext = "\xc1\x11\x44\x51\xd9\x25\x87\x5b" 15008 + "\x0f\xd9\x06\xf3\x33\x44\xbb\x87" 15009 + "\x8b\xa3\x77\xd2\x0c\x60\xfa\xcc" 15010 + "\x85\x50\x6f\x96\x0c\x54\x54\xc1" 15011 + "\x58\x04\x88\x6e\xf4\x26\x35\x7e" 15012 + "\x94\x80\x48\x6c\xf2\xf4\x88\x1f" 15013 + "\x19\x63\xea\xae\xba\x81\x1a\x5d" 15014 + "\x0e\x6f\x59\x08" 15015 + "\x33\xac\x5b\xa8\x19\x60\xdb\x1d" 15016 + "\xdd\x2e\x22\x2e\xe0\x87\x51\x5d", 15017 + .clen = 76, 15018 + }, { 15019 + .key = "\x8b\x32\xcf\xe7\x44\xed\x13\x59" 15020 + "\x04\x38\x77\xb0\xb9\xad\xb4\x38", 15021 + .klen = 16, 15022 + .iv = "\x00\xff\xff\xff\xff\x00\x00\xff" 15023 + "\xff\xff\x00\xff", 15024 + .ptext = "\x42\xc1\xcc\x08\x48\x6f\x41\x3f" 15025 + "\x2f\x11\x66\x8b\x2a\x16\xf0\xe0" 15026 + "\x58\x83\xf0\xc3\x70\x14\xc0\x5b" 15027 + "\x3f\xec\x1d\x25\x3c\x51\xd2\x03" 15028 + "\xcf\x59\x74\x1f\xb2\x85\xb4\x07" 15029 + "\xc6\x6a\x63\x39\x8a\x5b\xde\xcb" 15030 + "\xaf\x08\x44\xbd\x6f\x91\x15\xe1" 15031 + "\xf5\x7a\x6e\x18\xbd\xdd\x61\x50" 15032 + "\x59\xa9\x97\xab\xbb\x0e\x74\x5c" 15033 + "\x00\xa4\x43\x54\x04\x54\x9b\x3b" 15034 + "\x77\xec\xfd\x5c\xa6\xe8\x7b\x08" 15035 + "\xae\xe6\x10\x3f\x32\x65\xd1\xfc" 15036 + "\xa4\x1d\x2c\x31\xfb\x33\x7a\xb3" 15037 + "\x35\x23\xf4\x20\x41\xd4\xad\x82" 15038 + "\x8b\xa4\xad\x96\x1c\x20\x53\xbe" 15039 + "\x0e\xa6\xf4\xdc\x78\x49\x3e\x72" 15040 + "\xb1\xa9\xb5\x83\xcb\x08\x54\xb7" 15041 + "\xad\x49\x3a\xae\x98\xce\xa6\x66" 15042 + "\x10\x30\x90\x8c\x55\x83\xd7\x7c" 15043 + "\x8b\xe6\x53\xde\xd2\x6e\x18\x21" 15044 + "\x01\x52\xd1\x9f\x9d\xbb\x9c\x73" 15045 + "\x57\xcc\x89\x09\x75\x9b\x78\x70" 15046 + "\xed\x26\x97\x4d\xb4\xe4\x0c\xa5" 15047 + "\xfa\x70\x04\x70\xc6\x96\x1c\x7d" 15048 + "\x54\x41\x77\xa8\xe3\xb0\x7e\x96" 15049 + "\x82\xd9\xec\xa2\x87\x68\x55\xf9" 15050 + "\x8f\x9e\x73\x43\x47\x6a\x08\x36" 15051 + "\x93\x67\xa8\x2d\xde\xac\x41\xa9" 15052 + "\x5c\x4d\x73\x97\x0f\x70\x68\xfa" 15053 + "\x56\x4d\x00\xc2\x3b\x1f\xc8\xb9" 15054 + "\x78\x1f\x51\x07\xe3\x9a\x13\x4e" 15055 + "\xed\x2b\x2e\xa3\xf7\x44\xb2\xe7" 15056 + "\xab\x19\x37\xd9\xba\x76\x5e\xd2" 15057 + "\xf2\x53\x15\x17\x4c\x6b\x16\x9f" 15058 + "\x02\x66\x49\xca\x7c\x91\x05\xf2" 15059 + "\x45\x36\x1e\xf5\x77\xad\x1f\x46" 15060 + "\xa8\x13\xfb\x63\xb6\x08\x99\x63" 15061 + "\x82\xa2\xed\xb3\xac\xdf\x43\x19" 15062 + "\x45\xea\x78\x73\xd9\xb7\x39\x11" 15063 + "\xa3\x13\x7c\xf8\x3f\xf7\xad\x81" 15064 + "\x48\x2f\xa9\x5c\x5f\xa0\xf0\x79" 15065 + "\xa4\x47\x7d\x80\x20\x26\xfd\x63" 15066 + "\x0a\xc7\x7e\x6d\x75\x47\xff\x76" 15067 + "\x66\x2e\x8a\x6c\x81\x35\xaf\x0b" 15068 + "\x2e\x6a\x49\x60\xc1\x10\xe1\xe1" 15069 + "\x54\x03\xa4\x09\x0c\x37\x7a\x15" 15070 + "\x23\x27\x5b\x8b\x4b\xa5\x64\x97" 15071 + "\xae\x4a\x50\x73\x1f\x66\x1c\x5c" 15072 + "\x03\x25\x3c\x8d\x48\x58\x71\x34" 15073 + "\x0e\xec\x4e\x55\x1a\x03\x6a\xe5" 15074 + "\xb6\x19\x2b\x84\x2a\x20\xd1\xea" 15075 + "\x80\x6f\x96\x0e\x05\x62\xc7\x78" 15076 + "\x87\x79\x60\x38\x46\xb4\x25\x57" 15077 + "\x6e\x16\x63\xf8\xad\x6e\xd7\x42" 15078 + "\x69\xe1\x88\xef\x6e\xd5\xb4\x9a" 15079 + "\x3c\x78\x6c\x3b\xe5\xa0\x1d\x22" 15080 + "\x86\x5c\x74\x3a\xeb\x24\x26\xc7" 15081 + "\x09\xfc\x91\x96\x47\x87\x4f\x1a" 15082 + "\xd6\x6b\x2c\x18\x47\xc0\xb8\x24" 15083 + "\xa8\x5a\x4a\x9e\xcb\x03\xe7\x2a" 15084 + "\x09\xe6\x4d\x9c\x6d\x86\x60\xf5" 15085 + "\x2f\x48\x69\x37\x9f\xf2\xd2\xcb" 15086 + "\x0e\x5a\xdd\x6e\x8a\xfb\x6a\xfe" 15087 + "\x0b\x63\xde\x87\x42\x79\x8a\x68" 15088 + "\x51\x28\x9b\x7a\xeb\xaf\xb8\x2f" 15089 + "\x9d\xd1\xc7\x45\x90\x08\xc9\x83" 15090 + "\xe9\x83\x84\xcb\x28\x69\x09\x69" 15091 + "\xce\x99\x46\x00\x54\xcb\xd8\x38" 15092 + "\xf9\x53\x4a\xbf\x31\xce\x57\x15" 15093 + "\x33\xfa\x96\x04\x33\x42\xe3\xc0" 15094 + "\xb7\x54\x4a\x65\x7a\x7c\x02\xe6" 15095 + "\x19\x95\xd0\x0e\x82\x07\x63\xf9" 15096 + "\xe1\x2b\x2a\xfc\x55\x92\x52\xc9" 15097 + "\xb5\x9f\x23\x28\x60\xe7\x20\x51" 15098 + "\x10\xd3\xed\x6d\x9b\xab\xb8\xe2" 15099 + "\x5d\x9a\x34\xb3\xbe\x9c\x64\xcb" 15100 + "\x78\xc6\x91\x22\x40\x91\x80\xbe" 15101 + "\xd7\x78\x5c\x0e\x0a\xdc\x08\xe9" 15102 + "\x67\x10\xa4\x83\x98\x79\x23\xe7" 15103 + "\x92\xda\xa9\x22\x16\xb1\xe7\x78" 15104 + "\xa3\x1c\x6c\x8f\x35\x7c\x4d\x37" 15105 + "\x2f\x6e\x0b\x50\x5c\x34\xb9\xf9" 15106 + "\xe6\x3d\x91\x0d\x32\x95\xaa\x3d" 15107 + "\x48\x11\x06\xbb\x2d\xf2\x63\x88" 15108 + "\x3f\x73\x09\xe2\x45\x56\x31\x51" 15109 + "\xfa\x5e\x4e\x62\xf7\x90\xf9\xa9" 15110 + "\x7d\x7b\x1b\xb1\xc8\x26\x6e\x66" 15111 + "\xf6\x90\x9a\x7f\xf2\x57\xcc\x23" 15112 + "\x59\xfa\xfa\xaa\x44\x04\x01\xa7" 15113 + "\xa4\x78\xdb\x74\x3d\x8b\xb5", 15114 + .plen = 719, 15115 + .ctext = "\xdc\xb1\x0f\x2a\xe8\x2d\x1c\x57" 15116 + "\xc4\x82\xfa\xd6\x87\xe6\x2f\x50" 15117 + "\xbd\x9e\x0a\x42\x31\xf2\xc7\xbb" 15118 + "\x21\x63\xa7\x05\x43\x33\xef\x33" 15119 + "\x5c\xd3\x47\x55\xce\x5c\xe4\xd4" 15120 + "\xe5\x07\x62\x22\xac\x01\xa8\x35" 15121 + "\x9c\x59\x34\x30\x8e\xff\x9f\xb4" 15122 + "\xd2\x4e\x74\x90\x64\xf2\x78\x5e" 15123 + "\x63\xb7\xc5\x08\x1b\x37\xa5\x9e" 15124 + "\xc0\xde\xff\xa9\x7f\x0b\xd3\x02" 15125 + "\x83\x6e\x33\xfa\x43\x11\xd3\xda" 15126 + "\x02\xcf\xcd\x4a\xc0\x78\x1f\x39" 15127 + "\x62\xcb\xa3\x95\x7e\x13\x92\x28" 15128 + "\xb2\xc4\x7a\xba\xd1\xc6\xf6\x1f" 15129 + "\xda\x0b\xf1\xd1\x99\x54\xd8\x3b" 15130 + "\x16\xf8\xe6\x97\x1e\xa7\xcf\x49" 15131 + "\x69\x84\x01\x4c\xdc\x7a\x34\xff" 15132 + "\x01\x08\xa3\x0b\x39\xac\x21\x37" 15133 + "\xd8\xb4\x04\x19\x8b\x7a\x7d\x17" 15134 + "\x44\xd1\x18\xaf\x1f\xa9\x29\xfe" 15135 + "\xfa\x77\xe0\x40\x42\x0c\x79\xb7" 15136 + "\xc3\x15\x1b\xd9\x0c\x82\xfc\x16" 15137 + "\x70\xd6\x2a\xe9\x94\x72\xc5\xa5" 15138 + "\x8a\x58\xbc\xfa\xe0\x88\x39\x4a" 15139 + "\x80\xe8\xec\xaf\x60\xac\xe7\xf8" 15140 + "\x9c\xf0\xfc\x61\x39\x07\x98\x6b" 15141 + "\x88\xe3\x98\x22\x28\x18\x4a\x2d" 15142 + "\x25\xef\x10\xe3\x83\x66\x3f\xfd" 15143 + "\xc7\x0b\xa3\xfd\x97\xa9\xf4\xbd" 15144 + "\xd8\x2a\xee\x4a\x50\xad\xcc\xb5" 15145 + "\xc7\xab\xb8\x79\x9c\xd1\xf1\x27" 15146 + "\x08\xf5\xf5\xe8\x1b\x66\xce\x41" 15147 + "\x56\x60\x94\x86\xf0\x78\xc2\xfa" 15148 + "\x5b\x63\x40\xb1\xd1\x1a\x38\x69" 15149 + "\x0b\x8c\xb2\xf5\xa2\xbe\x90\x9d" 15150 + "\x46\x23\x79\x8b\x3b\x4a\xf4\xbb" 15151 + "\x55\xf7\x58\x9d\xaf\x59\xff\x74" 15152 + "\xf3\xb9\xc4\x26\xb1\xf8\xe1\x28" 15153 + "\x8b\x5e\x8f\x6d\x64\xe7\xe8\x63" 15154 + "\xd2\x9e\xcb\xee\xae\x19\x04\x1d" 15155 + "\x05\xf0\x9d\x99\x7b\x33\x33\xae" 15156 + "\x6e\xe5\x09\xdd\x67\x51\xc4\xc8" 15157 + "\x6a\xc7\x36\x35\xc9\x93\x76\xa1" 15158 + "\xa8\x1c\xfa\x75\x92\x34\x0e\x7d" 15159 + "\x3d\x1d\xef\x00\xfd\xa5\x25\x12" 15160 + "\x7c\x91\x21\x41\xcc\x50\x47\xa9" 15161 + "\x22\x50\x24\x96\x34\x79\x3d\xe8" 15162 + "\x3f\xa0\x56\xaf\x98\x53\x55\xc3" 15163 + "\x46\x1b\x17\x54\xb8\xb0\xb7\xe0" 15164 + "\xe0\xab\x47\x6f\x06\xda\xcc\x75" 15165 + "\xa7\x96\xb7\x92\xf3\xa0\x5f\xe6" 15166 + "\xba\x97\xe3\x2f\x97\x05\xb2\x99" 15167 + "\xa0\x09\x10\x98\x9c\xd3\x2e\xd1" 15168 + "\x7e\x2a\x30\x54\x3c\xb9\x33\xe3" 15169 + "\xf2\xaf\xd3\xa5\xee\xd0\x0b\x8a" 15170 + "\x19\x54\x0f\x02\x51\x1f\x91\xdf" 15171 + "\x71\x9c\xad\x77\x35\x28\x55\x6d" 15172 + "\xcd\x7a\xd9\xa3\x41\x98\x6b\x37" 15173 + "\x19\x0f\xbe\xae\x69\xb2\x25\x01" 15174 + "\xee\x0e\x51\x4b\x53\xea\x0f\x5f" 15175 + "\x85\x74\x79\x36\x32\x0a\x2a\x40" 15176 + "\xad\x6b\x78\x41\x54\x99\xe9\xc1" 15177 + "\x2b\x6c\x9b\x42\x21\xef\xe2\x50" 15178 + "\x56\x8d\x78\xdf\x58\xbe\x0a\x0f" 15179 + "\xfc\xfc\x0d\x2e\xd0\xcb\xa6\x0a" 15180 + "\xa8\xd9\x1e\xa9\xd4\x7c\x99\x88" 15181 + "\xcf\x11\xad\x1c\xd3\x04\x63\x55" 15182 + "\xef\x85\x0b\x69\xa1\x40\xf1\x75" 15183 + "\x24\xf4\xe5\x2c\xd4\x7a\x24\x50" 15184 + "\x8f\xa2\x71\xc9\x92\x20\xcd\xcf" 15185 + "\xda\x40\xbe\xf6\xfe\x1a\xca\xc7" 15186 + "\x4a\x80\x45\x55\xcb\xdd\xb7\x01" 15187 + "\xb0\x8d\xcb\xd2\xae\xbd\xa4\xd0" 15188 + "\x5c\x10\x05\x66\x7b\xd4\xff\xd9" 15189 + "\xc4\x23\x9d\x8d\x6b\x24\xf8\x3f" 15190 + "\x73\x4d\x5c\x2b\x33\x4c\x5e\x63" 15191 + "\x74\x6d\x03\xa1\x7a\x35\x65\x17" 15192 + "\x38\x7f\x3b\xc1\x69\xcf\x61\x34" 15193 + "\x30\x21\xaf\x97\x47\x12\x3f\xa1" 15194 + "\xa7\x50\xc5\x87\xfb\x3f\x70\x32" 15195 + "\x86\x17\x5f\x25\xe4\x74\xc6\xd0" 15196 + "\x9b\x39\xe6\xe1\x5a\xec\x8f\x40" 15197 + "\xce\xcc\x37\x3b\xd8\x72\x1c\x31" 15198 + "\x75\xa4\xa6\x89\x8c\xdd\xd6\xd2" 15199 + "\x32\x3d\xe8\xc3\x54\xab\x1f\x35" 15200 + "\x52\xb4\x94\x81\xb0\x37\x3a\x03" 15201 + "\xbb\xb1\x99\x30\xa5\xf8\x21\xcd" 15202 + "\x93\x5d\xa7\x13\xed\xc7\x49\x09" 15203 + "\x70\xda\x08\x39\xaa\x15\x9e\x45" 15204 + "\x35\x2b\x0f\x5c\x8c\x8b\xc9" 15205 + "\xa8\xb8\x9f\xfd\x37\x36\x31\x7e" 15206 + "\x34\x4f\xc1\xc0\xca\x8a\x22\xfd", 15207 + .clen = 735, 15263 15208 } 15264 15209 }; 15265 15210 ··· 15586 14947 "\x16\x84\x2D\x4F\xA1\x86\xF5\x6A" 15587 14948 "\xB3\x32\x56\x97\x1F\xA1\x10\xF4", 15588 14949 .clen = 80, 14950 + }, { /* Generated from AES-CCM test vectors */ 14951 + .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7" 14952 + "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf", 14953 + .klen = 16, 14954 + .iv = "\x01\x00\x00\x00\x03\x02\x01\x00" 14955 + "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00", 14956 + .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07", 14957 + .alen = 8, 14958 + .ptext = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" 14959 + "\x10\x11\x12\x13\x14\x15\x16\x17" 14960 + "\x18\x19\x1a\x1b\x1c\x1d\x1e", 14961 + .plen = 23, 14962 + .ctext = "\x7b\xff\x4a\x15\xf5\x73\xce\x82" 14963 + "\x6e\xc2\x31\x1d\xe2\x53\x02\xac" 14964 + "\xa4\x48\xf9\xe4\xf5\x1f\x81\x70" 14965 + "\x18\xbc\xb6\x84\x01\xb8\xae", 14966 + .clen = 31, 14967 + }, { 14968 + .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1" 14969 + "\x53\x14\x73\x66\x8d\x88\xf6\x80", 14970 + .klen = 16, 14971 + .iv = "\x03\xa0\x20\x35\x26\xf2\x21\x8d" 14972 + "\x50\x20\xda\xe2\x00\x00\x00\x00", 14973 + .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1" 14974 + "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47" 14975 + "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d" 14976 + "\xd8\x9e\x2b\x56\x10\x23\x56\xe7", 14977 + .alen = 32, 14978 + .ctext = "\x23\x58\xce\xdc\x40\xb1\xcd\x92" 14979 + "\x47\x96\x59\xfc\x8a\x26\x4f\xcf", 14980 + .clen = 16, 14981 + }, { 14982 + .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1" 14983 + "\xff\x80\x2e\x48\x7d\x82\xf8\xb9", 14984 + .klen = 16, 14985 + .iv = "\x03\xaf\x94\x87\x78\x35\x82\x81" 14986 + "\x7f\x88\x94\x68\x00\x00\x00\x00", 14987 + .alen = 0, 14988 + .ptext = "\x00", 14989 + .plen = 0, 14990 + .ctext = "\x72\x7e\xf5\xd6\x39\x7a\x2b\x43", 14991 + .clen = 8, 14992 + }, { 14993 + .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73" 14994 + "\xa4\x48\x93\x39\x26\x71\x4a\xc6", 14995 + .klen = 16, 14996 + .iv = "\x03\xee\x49\x83\xe9\xa9\xff\xe9" 14997 + "\x57\xba\xfd\x9e\x00\x00\x00\x00", 14998 + .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1" 14999 + "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64" 15000 + "\xa4\xf0\x13\x05\xd1\x77\x99\x67" 15001 + "\x11\xc4\xc6\xdb\x00\x56\x36\x61", 15002 + .alen = 32, 15003 + .ptext = "\x00", 15004 + .plen = 0, 15005 + .ctext = "\xb0\x9d\xc6\xfb\x7d\xb5\xa1\x0e", 15006 + .clen = 8, 15007 + }, { 15008 + .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7" 15009 + "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b", 15010 + .klen = 16, 15011 + .iv = "\x03\xcf\x76\x3f\xd9\x95\x75\x8f" 15012 + "\x44\x89\x40\x7b\x00\x00\x00\x00", 15013 + .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88" 15014 + "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b" 15015 + "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b" 15016 + "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe", 15017 + .alen = 32, 15018 + .ptext = "\xc2\x54\xc8\xde\x78\x87\x77\x40" 15019 + "\x49\x71\xe4\xb7\xe7\xcb\x76\x61" 15020 + "\x0a\x41\xb9\xe9\xc0\x76\x54\xab" 15021 + "\x04\x49\x3b\x19\x93\x57\x25\x5d", 15022 + .plen = 32, 15023 + .ctext = "\xc9\xae\xef\x1d\xf3\x2c\xd3\x38" 15024 + "\xc9\x7f\x7e\x28\xe8\xaa\xb3\x60" 15025 + "\x49\xdc\x66\xca\x7b\x3d\xe0\x3c" 15026 + "\xcb\x45\x9c\x1b\xb2\xbe\x07\x90" 15027 + "\x87\xa6\x6b\x89\x0d\x0f\x90\xaa" 15028 + "\x7d\xf6\x5a\x9a\x68\x2b\x81\x92", 15029 + .clen = 48, 15030 + }, { 15031 + .key = "\x8b\x32\xcf\xe7\x44\xed\x13\x59" 15032 + "\x04\x38\x77\xb0\xb9\xad\xb4\x38", 15033 + .klen = 16, 15034 + .iv = "\x02\xff\xff\xff\xff\x00\x00\xff" 15035 + "\xff\xff\x00\xff\xff\x00\x00\x00", 15036 + .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88" 15037 + "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b" 15038 + "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b" 15039 + "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe" 15040 + "\xc8\xf3\x5c\x52\x10\x63", 15041 + .alen = 38, 15042 + .ptext = "\x42\xc1\xcc\x08\x48\x6f\x41\x3f" 15043 + "\x2f\x11\x66\x8b\x2a\x16\xf0\xe0" 15044 + "\x58\x83\xf0\xc3\x70\x14\xc0\x5b" 15045 + "\x3f\xec\x1d\x25\x3c\x51\xd2\x03" 15046 + "\xcf\x59\x74\x1f\xb2\x85\xb4\x07" 15047 + "\xc6\x6a\x63\x39\x8a\x5b\xde\xcb" 15048 + "\xaf\x08\x44\xbd\x6f\x91\x15\xe1" 15049 + "\xf5\x7a\x6e\x18\xbd\xdd\x61\x50" 15050 + "\x59\xa9\x97\xab\xbb\x0e\x74\x5c" 15051 + "\x00\xa4\x43\x54\x04\x54\x9b\x3b" 15052 + "\x77\xec\xfd\x5c\xa6\xe8\x7b\x08" 15053 + "\xae\xe6\x10\x3f\x32\x65\xd1\xfc" 15054 + "\xa4\x1d\x2c\x31\xfb\x33\x7a\xb3" 15055 + "\x35\x23\xf4\x20\x41\xd4\xad\x82" 15056 + "\x8b\xa4\xad\x96\x1c\x20\x53\xbe" 15057 + "\x0e\xa6\xf4\xdc\x78\x49\x3e\x72" 15058 + "\xb1\xa9\xb5\x83\xcb\x08\x54\xb7" 15059 + "\xad\x49\x3a\xae\x98\xce\xa6\x66" 15060 + "\x10\x30\x90\x8c\x55\x83\xd7\x7c" 15061 + "\x8b\xe6\x53\xde\xd2\x6e\x18\x21" 15062 + "\x01\x52\xd1\x9f\x9d\xbb\x9c\x73" 15063 + "\x57\xcc\x89\x09\x75\x9b\x78\x70" 15064 + "\xed\x26\x97\x4d\xb4\xe4\x0c\xa5" 15065 + "\xfa\x70\x04\x70\xc6\x96\x1c\x7d" 15066 + "\x54\x41\x77\xa8\xe3\xb0\x7e\x96" 15067 + "\x82\xd9\xec\xa2\x87\x68\x55\xf9" 15068 + "\x8f\x9e\x73\x43\x47\x6a\x08\x36" 15069 + "\x93\x67\xa8\x2d\xde\xac\x41\xa9" 15070 + "\x5c\x4d\x73\x97\x0f\x70\x68\xfa" 15071 + "\x56\x4d\x00\xc2\x3b\x1f\xc8\xb9" 15072 + "\x78\x1f\x51\x07\xe3\x9a\x13\x4e" 15073 + "\xed\x2b\x2e\xa3\xf7\x44\xb2\xe7" 15074 + "\xab\x19\x37\xd9\xba\x76\x5e\xd2" 15075 + "\xf2\x53\x15\x17\x4c\x6b\x16\x9f" 15076 + "\x02\x66\x49\xca\x7c\x91\x05\xf2" 15077 + "\x45\x36\x1e\xf5\x77\xad\x1f\x46" 15078 + "\xa8\x13\xfb\x63\xb6\x08\x99\x63" 15079 + "\x82\xa2\xed\xb3\xac\xdf\x43\x19" 15080 + "\x45\xea\x78\x73\xd9\xb7\x39\x11" 15081 + "\xa3\x13\x7c\xf8\x3f\xf7\xad\x81" 15082 + "\x48\x2f\xa9\x5c\x5f\xa0\xf0\x79" 15083 + "\xa4\x47\x7d\x80\x20\x26\xfd\x63" 15084 + "\x0a\xc7\x7e\x6d\x75\x47\xff\x76" 15085 + "\x66\x2e\x8a\x6c\x81\x35\xaf\x0b" 15086 + "\x2e\x6a\x49\x60\xc1\x10\xe1\xe1" 15087 + "\x54\x03\xa4\x09\x0c\x37\x7a\x15" 15088 + "\x23\x27\x5b\x8b\x4b\xa5\x64\x97" 15089 + "\xae\x4a\x50\x73\x1f\x66\x1c\x5c" 15090 + "\x03\x25\x3c\x8d\x48\x58\x71\x34" 15091 + "\x0e\xec\x4e\x55\x1a\x03\x6a\xe5" 15092 + "\xb6\x19\x2b\x84\x2a\x20\xd1\xea" 15093 + "\x80\x6f\x96\x0e\x05\x62\xc7\x78" 15094 + "\x87\x79\x60\x38\x46\xb4\x25\x57" 15095 + "\x6e\x16\x63\xf8\xad\x6e\xd7\x42" 15096 + "\x69\xe1\x88\xef\x6e\xd5\xb4\x9a" 15097 + "\x3c\x78\x6c\x3b\xe5\xa0\x1d\x22" 15098 + "\x86\x5c\x74\x3a\xeb\x24\x26\xc7" 15099 + "\x09\xfc\x91\x96\x47\x87\x4f\x1a" 15100 + "\xd6\x6b\x2c\x18\x47\xc0\xb8\x24" 15101 + "\xa8\x5a\x4a\x9e\xcb\x03\xe7\x2a" 15102 + "\x09\xe6\x4d\x9c\x6d\x86\x60\xf5" 15103 + "\x2f\x48\x69\x37\x9f\xf2\xd2\xcb" 15104 + "\x0e\x5a\xdd\x6e\x8a\xfb\x6a\xfe" 15105 + "\x0b\x63\xde\x87\x42\x79\x8a\x68" 15106 + "\x51\x28\x9b\x7a\xeb\xaf\xb8\x2f" 15107 + "\x9d\xd1\xc7\x45\x90\x08\xc9\x83" 15108 + "\xe9\x83\x84\xcb\x28\x69\x09\x69" 15109 + "\xce\x99\x46\x00\x54\xcb\xd8\x38" 15110 + "\xf9\x53\x4a\xbf\x31\xce\x57\x15" 15111 + "\x33\xfa\x96\x04\x33\x42\xe3\xc0" 15112 + "\xb7\x54\x4a\x65\x7a\x7c\x02\xe6" 15113 + "\x19\x95\xd0\x0e\x82\x07\x63\xf9" 15114 + "\xe1\x2b\x2a\xfc\x55\x92\x52\xc9" 15115 + "\xb5\x9f\x23\x28\x60\xe7\x20\x51" 15116 + "\x10\xd3\xed\x6d\x9b\xab\xb8\xe2" 15117 + "\x5d\x9a\x34\xb3\xbe\x9c\x64\xcb" 15118 + "\x78\xc6\x91\x22\x40\x91\x80\xbe" 15119 + "\xd7\x78\x5c\x0e\x0a\xdc\x08\xe9" 15120 + "\x67\x10\xa4\x83\x98\x79\x23\xe7" 15121 + "\x92\xda\xa9\x22\x16\xb1\xe7\x78" 15122 + "\xa3\x1c\x6c\x8f\x35\x7c\x4d\x37" 15123 + "\x2f\x6e\x0b\x50\x5c\x34\xb9\xf9" 15124 + "\xe6\x3d\x91\x0d\x32\x95\xaa\x3d" 15125 + "\x48\x11\x06\xbb\x2d\xf2\x63\x88" 15126 + "\x3f\x73\x09\xe2\x45\x56\x31\x51" 15127 + "\xfa\x5e\x4e\x62\xf7\x90\xf9\xa9" 15128 + "\x7d\x7b\x1b\xb1\xc8\x26\x6e\x66" 15129 + "\xf6\x90\x9a\x7f\xf2\x57\xcc\x23" 15130 + "\x59\xfa\xfa\xaa\x44\x04\x01\xa7" 15131 + "\xa4\x78\xdb\x74\x3d\x8b\xb5", 15132 + .plen = 719, 15133 + .ctext = "\xc5\x50\x85\x02\x72\xa8\xb3\x62" 15134 + "\xf9\xcd\x77\x7b\x43\xa5\x04\x70" 15135 + "\x68\x40\x57\x21\x1c\xfe\xef\x05" 15136 + "\x4d\xb8\x44\xba\x59\xea\x62\x32" 15137 + "\xcb\x6b\x6a\x39\x9b\xf3\xe5\xa4" 15138 + "\x36\x38\xde\x7d\xcf\xb6\xcd\xe3" 15139 + "\x89\xbf\x37\xc9\x96\x3c\x70\x10" 15140 + "\x92\x47\xcc\xac\x6f\xf8\x55\x9a" 15141 + "\x26\x43\x34\xb4\x92\x7d\x68\xfc" 15142 + "\x60\x37\x74\x2a\x55\xba\xc7\xd7" 15143 + "\x98\x69\xb7\xcf\x42\xfd\xb2\x10" 15144 + "\xa0\x59\xe1\x2c\x73\x66\x12\x97" 15145 + "\x85\x8b\x28\xcc\x29\x02\x15\x89" 15146 + "\x23\xd3\x32\x92\x87\x57\x09\x13" 15147 + "\x04\x7e\x8b\x6c\x3a\xc1\x4e\x6c" 15148 + "\xe1\x9f\xc8\xcc\x47\x9c\xd8\x10" 15149 + "\xf4\xb7\x5c\x30\x7a\x8b\x0f\x01" 15150 + "\x52\x38\x02\x92\x99\xac\x03\x90" 15151 + "\x18\x32\x2d\x21\x6a\x0a\x2a\xe7" 15152 + "\xc2\xcc\x15\x84\x4e\x2b\x0b\x3a" 15153 + "\x4c\xdc\xb0\x6b\x10\xd1\x27\x10" 15154 + "\xf0\x4a\x5c\x43\xa0\x34\x34\x59" 15155 + "\x47\x43\x48\xcb\x69\xa7\xff\x52" 15156 + "\xb8\xca\x23\x09\x07\xd7\xc5\xe4" 15157 + "\x2a\x4f\x99\xd5\x83\x36\x2a\x2d" 15158 + "\x59\xd0\xca\xb0\xfa\x40\x8c\xab" 15159 + "\xdf\x69\x08\xd9\x79\x1d\xde\xa8" 15160 + "\x0b\x34\x74\x4d\xf5\xa0\x4c\x81" 15161 + "\x7f\x93\x06\x40\x24\xfe\x7d\xcd" 15162 + "\xe4\xfe\xf8\xf8\x30\xce\xd0\x5d" 15163 + "\x70\xfd\x0d\x5a\x78\x85\x74\x2d" 15164 + "\xe4\xb5\x40\x18\x99\x11\xe4\x6a" 15165 + "\xdf\xfa\x4f\x25\x2c\xde\x15\xb7" 15166 + "\x12\xd8\xc6\x90\x0d\x0f\xc9\xfb" 15167 + "\x21\xf1\xed\xfe\x98\xe1\x03\xe2" 15168 + "\x5c\xef\xb6\xc7\x87\x77\x0e\xcd" 15169 + "\xff\x78\x94\xc9\xbe\xd3\x47\xf7" 15170 + "\x8d\x37\x48\x01\x42\xe2\x17\x96" 15171 + "\xfc\xc0\xcb\x7b\x7b\x57\xaf\x3b" 15172 + "\xc9\xd0\x94\xce\x5e\x1b\xa9\x47" 15173 + "\x02\x4d\x74\xcc\x45\x1d\xd3\x2d" 15174 + "\x5f\x4f\x7f\xf2\x4b\xf9\x59\xee" 15175 + "\x9e\x9e\xb9\x95\x29\x19\xd1\x5f" 15176 + "\x72\xab\x8d\xf1\x28\xd1\x1c\xae" 15177 + "\xc2\xba\xf7\x22\x84\x2c\x83\x51" 15178 + "\x03\xad\xa3\xef\x81\xa7\xdc\xf1" 15179 + "\x44\x51\x50\x96\x70\xd1\xe5\x47" 15180 + "\x57\xf9\x30\x90\xe4\xbf\xfc\x75" 15181 + "\x14\xaa\x4d\xb7\xb1\xe7\x79\x33" 15182 + "\x43\xc2\x5c\xc1\xbc\x09\x92\x0f" 15183 + "\xa7\xaf\x68\x51\x51\xec\x0b\xc3" 15184 + "\x3d\x2b\x94\x30\x45\x29\x1b\x9e" 15185 + "\x70\x56\xf8\xd6\x67\x2d\x39\x3b" 15186 + "\x3c\xd2\xd0\xd3\xdc\x7d\x84\xe9" 15187 + "\x06\x31\x98\xa6\x5c\xbf\x10\x58" 15188 + "\xce\xbb\xa7\xe1\x65\x7e\x51\x87" 15189 + "\x70\x46\xb4\x7f\xf9\xec\x92\x1c" 15190 + "\x9b\x24\x49\xc1\x04\xbe\x1c\x5f" 15191 + "\xcc\xb3\x33\x8c\xad\xe7\xdc\x32" 15192 + "\x54\xa2\x0d\x83\x0f\x3c\x12\x5d" 15193 + "\x71\xe3\x9c\xae\x71\xa3\x2a\x10" 15194 + "\xc5\x91\xb4\x73\x96\x60\xdb\x5d" 15195 + "\x1f\xd5\x9a\xd2\x69\xc3\xd7\x4b" 15196 + "\xa2\x66\x81\x96\x4a\xaa\x02\xd6" 15197 + "\xd5\x44\x9b\x42\x3a\x15\x5f\xe7" 15198 + "\x4d\x7c\xf6\x71\x4a\xea\xe8\x43" 15199 + "\xd7\x68\xe4\xbc\x05\x87\x49\x05" 15200 + "\x3b\x47\xb2\x6d\x5f\xd1\x11\xa6" 15201 + "\x58\xd4\xa2\x45\xec\xb5\x54\x55" 15202 + "\xd3\xd6\xd2\x6a\x8b\x21\x9e\x2c" 15203 + "\xf1\x27\x4b\x5b\xe3\xff\xe0\xfd" 15204 + "\x4b\xf1\xe7\xe2\x84\xf2\x17\x37" 15205 + "\x11\x68\xc4\x92\x4b\x6b\xef\x8e" 15206 + "\x75\xf5\xc2\x7d\x5c\xe9\x7c\xfc" 15207 + "\x2b\x00\x33\x0e\x7d\x69\xd8\xd4" 15208 + "\x9b\xa8\x38\x54\x7e\x6d\x23\x51" 15209 + "\x2c\xd6\xc4\x58\x23\x1c\x22\x2a" 15210 + "\x59\xc5\x9b\xec\x9d\xbf\x03\x0f" 15211 + "\xb3\xdd\xba\x02\x22\xa0\x34\x37" 15212 + "\x19\x56\xc2\x5b\x32\x1d\x1e\x66" 15213 + "\x68\xf4\x47\x05\x04\x18\xa7\x28" 15214 + "\x80\xf2\xc7\x99\xed\x1e\x72\x48" 15215 + "\x8f\x97\x5d\xb3\x74\x42\xfd\x0c" 15216 + "\x0f\x5f\x29\x0c\xf1\x35\x22\x90" 15217 + "\xd6\x7c\xb8\xa3\x2a\x89\x38\x71" 15218 + "\xe9\x7a\x55\x3c\x3b\xf2\x6e\x1a" 15219 + "\x22\x8f\x07\x81\xc1\xe1\xf1\x76" 15220 + "\x2a\x75\xab\x86\xc4\xcc\x52\x59" 15221 + "\x83\x19\x5e\xb3\x53\xe2\x81\xdf" 15222 + "\xe6\x15\xb3\xba\x0c\x0e\xba" 15223 + "\xa9\x2c\xed\x51\xd5\x06\xc8\xc6" 15224 + "\x4b\x9f\x5d\x1b\x61\x31\xad\xf4", 15225 + .clen = 735, 15589 15226 } 15590 15227 }; 15591 15228 ··· 15941 15026 .digest = "\x5f\x14\xc9\xa9\x20\xb2\xb4\xf0" 15942 15027 "\x76\xe0\xd8\xd6\xdc\x4f\xe1\xbc", 15943 15028 .psize = 63, 15029 + .ksize = 16, 15030 + } 15031 + }; 15032 + 15033 + static const struct hash_testvec sm4_xcbc128_tv_template[] = { 15034 + { /* Generated from AES-XCBC128 test vectors */ 15035 + .key = "\x00\x01\x02\x03\x04\x05\x06\x07" 15036 + "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", 15037 + .plaintext = zeroed_string, 15038 + .digest = "\xa9\x9a\x5c\x44\xe2\x34\xee\x2c" 15039 + "\x9b\xe4\x9d\xca\x64\xb0\xa5\xc4", 15040 + .psize = 0, 15041 + .ksize = 16, 15042 + }, { 15043 + .key = "\x00\x01\x02\x03\x04\x05\x06\x07" 15044 + "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", 15045 + .plaintext = "\x00\x01\x02", 15046 + .digest = "\x17\x27\x62\xf3\x8b\x88\x1d\xc0" 15047 + "\x97\x35\x9c\x3e\x9f\x27\xb7\x83", 15048 + .psize = 3, 15049 + .ksize = 16, 15050 + } , { 15051 + .key = "\x00\x01\x02\x03\x04\x05\x06\x07" 15052 + "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", 15053 + .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07" 15054 + "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", 15055 + .digest = "\xda\x45\xd1\xac\xec\x4d\xab\x46" 15056 + "\xdd\x59\xe0\x44\xff\x59\xd5\xfc", 15057 + .psize = 16, 15058 + .ksize = 16, 15059 + }, { 15060 + .key = "\x00\x01\x02\x03\x04\x05\x06\x07" 15061 + "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", 15062 + .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07" 15063 + "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" 15064 + "\x10\x11\x12\x13", 15065 + .digest = "\xbe\x24\x5d\x81\x8c\x8a\x10\xa4" 15066 + "\x8e\xc2\x16\xfa\xa4\x83\xc9\x2a", 15067 + .psize = 20, 15068 + .ksize = 16, 15069 + }, { 15070 + .key = "\x00\x01\x02\x03\x04\x05\x06\x07" 15071 + "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", 15072 + .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07" 15073 + "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" 15074 + "\x10\x11\x12\x13\x14\x15\x16\x17" 15075 + "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f", 15076 + .digest = "\x91\x82\x31\x56\xd5\x77\xa4\xc5" 15077 + "\x88\x2d\xce\x3a\x87\x5e\xbd\xba", 15078 + .psize = 32, 15079 + .ksize = 16, 15080 + }, { 15081 + .key = "\x00\x01\x02\x03\x04\x05\x06\x07" 15082 + "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", 15083 + .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07" 15084 + "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" 15085 + "\x10\x11\x12\x13\x14\x15\x16\x17" 15086 + "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f" 15087 + "\x20\x21", 15088 + .digest = "\x2a\xae\xa5\x24\x0c\x12\x9f\x5f" 15089 + "\x55\xfb\xae\x35\x13\x0d\x22\x2d", 15090 + .psize = 34, 15944 15091 .ksize = 16, 15945 15092 } 15946 15093 };