91da55f440a230f3d1988f35b6e318d23ffa50bc3d40f021c3c0bdae4958c24c
518f36b284b1d3700fedce83878ddadaf2a279c794e01be890716f4b954b8aa3
S-BoxS8
e216300dbbddfffca7ebdabd356480957789f8b7e6c1121b0e241600052ce8b5
11a9cfb0e5952f11ece7990a9386d1742a42931c76e38111b12def3a37ddddfc
de9adeb10a0cc32cbe19702984a00940bb243a0fb4d137cfb44e79f0049eedfd
0b15a15d480d31688bbbde5a669ded42c7ece8313f8f95e772df191b7580330d
940742515c7dcdfaabbe6d63aa402164b301d40a02e7d1ca53571dae7a3182a2
12a8ddecfdaa335d176f43e871fb46d438129022ce949ad4b84769ad965bd862
82f3d05566fb976715b80b4e1d5b47a04cfde06fc28ec4b857e8726e647a78fc
99865d44608bd5936c200e0339dc5ff65d0b00a3ae63aff27e8bd63270108c0c
bbd350492998df04980cf42a9b6df4919e7edd530691854858cb7e073b74ef2e
522fffb1d24708cc1c7e27cda4eb215b3cf1d2e219b47a38424f761835856039
9d17dee727eb35e6c9aff67b36baf5b809c467cdc18910b1e11dbf7b06cd1af8
7170c6082d5e3354d4de495a64c6d006bcc0c62c3dd00db3708f8f3477d51b42
264f620f24b8d2bf15c1b79e46a52564f8d7e54e3e3781607895cda5859c15a5
e6459788c37bc75fdb07ba0c0676a3ab7f229b1e31842e7b24259fd7f8bef472
835ffcb86df4c1f296f5b195fd0af0fcb0fe134ce2506d3d4f9b12eaf215f225
a223736f9fb4c42825d0497934c713f8c4618187ea7a6e987cd16efc1436876c
f1544107bedeee1456e9af27a04aa4413cf7c89992ecbae6dd67016d151682eb
a842eedffdba60b4f1907b7520e3030f24d8c29ee139673befa63fb871873054
b6f2cf3b9f326442cb15a4ccb01a4504f1e47d8d844a1be5bae7dfdc42cbda70
cd7dae0a57e85b7ad53f5af620cf4d8ccea4d42879d130a43486ebfb33d3cddc
77853b5337effcb5c5068778e580b3e64e68b8f4c5c8b37e0d809ea2398feb7c
132a4f9443b7950e2fee7d1c223613bddd06caa237df932bc4248289acf3ebc3
5715f6b7ef3478ddf267616fc148cbe49052815e5e410fabb48a24652eda7fa4
e87b40e4e98ea0845889e9e1efd390fcdd07d35bdb48569438d7e5b257720101
730edebc5b64311394917e4f503c2fba646f12827523d24ae0779695f9c17a8f
7a5b2121d187b89629263a4dba510cdf81f47c9fad1163edea7b59651a00726e
1140309200da6d774a0cdd61ad1f4603605bdfb09eedc36422ebe6a8cee7d28a
a0e736a05564a6b910853209c7eb8f372de705ca8951570fdf09822bbd691a6c
aa12e4f287451c0fe0f6a27a3ada48194cf1764f0d771c2b67cdb156350d8384
5938fa0f42399ef336997b070e84093d4aa93e618360d87b1fa98b0c1149382c
e97625a50614d1b70e25244b0c768347589e8d820d2059d1a466bb1ef8da0a82
04f19130ba6e4ec0992651641ee7230d50b2ad80eaee68018db2a283ea8bf59e
8 附录B.测试向量
该附录为本文描述的CAST-128加密提供测试向量 。
B.1.单独的明文-密码-密文集
为了保证算法的正确实现,可以使用下面的测试向量(使用十六进制符号表示)进行验
证 。
128-bitkey=0123456712345678234567893456789A
plaintext=0123456789ABCDEF
ciphertext=238B4FE5847E44B2
80-bitkey=01234567123456782345
=01234567123456782345000000000000
plaintext=0123456789ABCDEF
ciphertext=EB6A711A2C02271B
40-bitkey=0123456712
=01234567120000000000000000000000
plaintext=0123456789ABCDEF
ciphertext=7AC816D16E9B302E
B.2.完整的维护性测试
CAST-128的维护性测试被定义为验证实现的正确性 。它使用如下的伪代码表示,其中
a和b是128位的向量,aL和bL是a左右两部分,bL和bR是b的左右两部分,enrypt(d,k)
是块对于密码k以ECB模式的加密 。
Initiala=0123456712345678234567893456789A(hex)
Initialb=0123456712345678234567893456789A(hex)
do1,000,000times
{
aL=encrypt(aL,b)
aR=encrypt(aR,b)
bL=encrypt(bL,a)
bR=encrypt(bR,a)
}
Verifya==EEA9D0A249FD3BA6B3436FB89D6DCA92(hex)
Verifyb==B2C95EB00C31AD7180AC05B8E83D696E(hex)
推荐阅读
- HTTP远程变量选择算法—RVSA/1.0
- PKCS#1:RSA加密 版本1.5
- 等价多径算法的分析
- ESP CBC模式加密算法
- NULL加密算法及其在IPsec协议中的应用
- 联想z5s中为应用加密具体操作步骤
- vivox23幻彩版开启应用指纹加密
- Moboplayer怎么文件夹加密
- 如何判断一个算法的好坏
- 1 RIP协议V-D算法的介绍