Skip to content
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

Next major iteration on Cipher interface #23

Merged
merged 4 commits into from
Feb 3, 2015
Merged

Next major iteration on Cipher interface #23

merged 4 commits into from
Feb 3, 2015

Conversation

bford
Copy link
Contributor

@bford bford commented Jan 29, 2015

This pull request represents the next iteration on the Cipher interface that I mentioned during the last meeting. It will require minor changes to all code that called the old cipher.Crypt method, to invoke the new cipher.Message or cipher.Partial methods instead. Partial is equivalent to the old cipher.Crypt(..., abstract.More{}), getting rid of the somewhat clunky use of variable-length options arguments to the workhorse message-processing methods.

The other significant API change is that the new Cipher interface no longer has a need for the "Direction" option-arguments (which was insufficient anyway as it didn't quite provide a proper stream-cipher mode of operation): instead, both the Message and Partial methods now take a third byte-slice argument, 'key', in which the caller explicitly specifies what - if any - input should be absorbed into the Cipher's state to key (or re-key) it for the next message (or hash/MAC output or whatever).

I've rewritten and greatly expanded the documentation for the Cipher interface, to include a bunch of examples of how to use it in various ways; please see that documentation for details on how to use it.

Currently some tests fail merely because the bits have changed in various test-cases; this will be fixed before merging this branch (and possibly after adding some more extensive Cipher tests; see the work-item I'll be posting shortly).

further generalized, streamlined, and simplified considerably.
This time I hope it'll prove to be something that can be kept fairly stable.
bford added a commit that referenced this pull request Feb 3, 2015
Next major iteration on Cipher interface: merging, since I have not received any comments or pushback.
@bford bford merged commit 6914506 into master Feb 3, 2015
armfazh pushed a commit to armfazh/kyber that referenced this pull request Apr 13, 2023
armfazh pushed a commit to armfazh/kyber that referenced this pull request Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant