Skip to content

Reduce data copying in CCM mode #34

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

Closed
wants to merge 1 commit into from

Conversation

timw
Copy link
Contributor

@timw timw commented Sep 7, 2013

Remove unnecessary data copying in the CCM mode implementation:

  • ByteArrayOutputStream buffers for AD and data are accessed directly to avoid extra allocate+copy of each
  • The output buffer is used directly by processPacket output without allocate+copy of a temporary buffer

…buffers, and without allocating+copying the output buffer.
@ghost ghost assigned bcgit Sep 13, 2013
@peterdettman
Copy link
Collaborator

Tim, this changes the signature of a public method (CCMBlockCipher.processPacket). Please preserve the old version (can deprecate it if you like) and its test coverage.

Also, it would be nice to return the number of output bytes from the new version of processPacket.

@bcgit
Copy link
Collaborator

bcgit commented Sep 18, 2013

Actually, I think I can deal with this one, leave it with me - I'll add the return value.

@bcgit
Copy link
Collaborator

bcgit commented Sep 18, 2013

Merged with minor changes - the main one beings I've made the ByteArrayOutputStream extension private to the class and I've added a return value to the processPacket method, leaving the other one in place.

@bcgit bcgit closed this Sep 18, 2013
@bcgit bcgit removed their assignment May 26, 2020
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.

3 participants