-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speck implemententation not matching test vector from wiki #932
Comments
It is probably your implementation. The specification for SIMON and SPECK caused a lot of confusion when first released because the authors were a bit vague about endianess and presentation of test vectors. The kernel and Crypto++ had to change their implementations to align with what the authors stated in their paper (and not what they showed in their test vectors). The NSA folks published an implementation guide at SIMON and SPECK Implementation Guide. It removed confusion for the implementors. You can find it at the NSA's GitHub. You can also test the library's implementation using:
|
I am familiar with the problem of endianness with speck. But in my opinion should my usage produce the exact same value shown in the wiki, but it does not. |
any ideas? |
I think this was cleared under Issue #945 |
Hello,
i am new to cryptopp and currently getting familiar with the lib. I am testing with the speck cipher and want to reproduce the example from the wiki shown here:
https://www.cryptopp.com/wiki/SPECK
I am refering to the following lines on the wiki:
Key: F36D4289293A07A0C1E3D8EAFBF83C6F
IV: 50650B834D62457D3D5CBFE9708EC927
plain text: CBC Mode Test
Cipher text: 952FB25AF03C17F972BEB9357AA48719
recovered text: CBC Mode Test
I started implementing with the code shown in the wiki and wanted to repoduce the test vector shown above. So see my example program:
CryptoPP::AutoSeededRandomPool prng;
As a summary what my program does:
I am using a fixed IV and key (with the values from the wiki) instead of randomly generated values. My expectation is, that the program produces as cipher text "952FB25AF03C17F972BEB9357AA48719" (value from the wiki). But it generetes the following cipher text instead: "D3937748C4A9D3B215E930F41C6AD76B" which differs from the value of the wiki. In my opinion there is an error in my implementation or the test vector is wrong. May be someone can help?
OS: Windows 10 x64 with VS 2019
Crypto++ library: 8.2 Release from the website
The text was updated successfully, but these errors were encountered: