Fix encryption with blocksize 4#6
Open
chris-morgan wants to merge 1 commit intoneilsagarwal:masterfrom
Open
Conversation
The spec says: > For 4 bit numbers, the processing is a little more interesting. Each > word of the tmp array is used to control permutations as in the 2-bit > and 3-bit cases. Each temporary variable is used in 4-bit chunks from > the low-order end. 8 cycles are necessary to use up each variable. A > cycle adds a 4-bit chunk into s0, then applies PERM1. Then the next > 4-bit chunk is xored into s0, and PERM2 is applied. That is, add then xor. This implementation had it back to front, perhaps an error derived from 2–3 which *do* use xor then add.
Author
|
Aside: anyone got the official test vectors? http://richard.schroeppel.name:8015/hpc/test-index.html links to a dead FTP site, and I haven’t been able to find any other source. Such tests would help confirm an absence of errors like this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The spec says:
That is, add then xor. This implementation had it back to front, perhaps an error derived from 2–3 which do use xor then add.