-
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
SKIPJACK encryption gives wrong result #824
Comments
You need to set an IV with CBC mode. Use |
It looks like something may be wrong here. Reopening. (You still need an IV with CBC mode). |
OK, after some research:
For item (3), Ref Impl (original), it arrives at the result For item (6), NIST decryption, the controlling document is SP800-17, Modes of Operation Validation System (MOVS): Requirements and Procedures. It has test vectors but it is not easy to parse. I've tested (a) Crypto++, (b) Botan, (c) Ref Impl (original) and (d) Ref Impl (optimized). All of them arrive at different results. I think the way forward is, find which algorithm arrives at the NIST test vector and use it. I suspect it is going to be Ref Impl (original). I will know shortly. |
So it looks like Crypto++ arrives at the Known Answers from SP800-17 (in particular, Table 6, pp. 140-42). Botan also arrives at the known answers from NIST. Here's the first known answer test from the SP800-17 table. You can find additional known answer tests at
I don't know the difference between NIST algorithm/Crypto++ code and Panu Rissanen's implementation. I asked Wei if he recalled the difference or variations over chat, but he did not recall the details from that time. If you need to add the block cipher with Panu Rissanen's implementation, then copy/paste the code in I'm going to close this report. I will be adding test vectors and updating the docs. |
@Zungong, I added a new wiki page at SKIPJACK. It documents what we found in this bug report. I also added first class test vectors at You can use the test vectors with the Crypto++ test program:
If you figure out the difference in implementations, then please let me know. I will add it to the wiki article. I asked a question at Difference in SKIPJACK algorithms, but it may go unanswered. |
Generated using Botan 1.11.17, https://github.com/noloader/cryptopp-test/tree/master/SKIPJACK
It's broken. See: weidai11/cryptopp#824
I know that correct result cipher should be "2587CAE27A12D30069E1B7CA26BD2646".
But above code is giving me "C3069674579678B3864BEBE40220757B", which is quite different.
I am using Crypto++ 8.0 version now.
The text was updated successfully, but these errors were encountered: