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

Crypto operations on streamed data #104

Open
kodlian opened this issue Feb 3, 2022 · 0 comments
Open

Crypto operations on streamed data #104

kodlian opened this issue Feb 3, 2022 · 0 comments

Comments

@kodlian
Copy link

kodlian commented Feb 3, 2022

New API Proposal: Crypto operations on streamed data

Motivation:

Add APIs to handle crypto operations on streamed data, meaning by processing chunks of data of arbitrary size in a non-continuous way.
These APIs should offer three phases:

  • context initialization
  • update(s): update through a method that takes as input a chunk of data (can be called multiple times)
  • finalization: Get the output of the crypto operation

Cipher, Digest, and HMac operations would benefit from such API. Although it may not be possible to add this kind of streamed operation on all the algorithms.

Such APIs exist in Common Crypto on the Apple Platforms through for instance CCCryptorCreate, CCCryptorUpdate, and CCCryptorFinal.

Importance:

When performing a crypto operation on a large file, it must be done by streaming the data instead of keeping it all in memory/loading all in memory.

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

No branches or pull requests

1 participant