Crypto operations on streamed data
- Dominant language
- Assembly
- Stars
- 1.7k
- Forks
- 223
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 7
Description
### 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.
Contributor guide
Research direction
Start by reviewing the existing Cipher, Digest, and HMac APIs and the Common Crypto references named in the proposal, including CCCryptorCreate, CCCryptorUpdate, and CCCryptorFinal. Determine which operations and algorithms can support initialization, repeated chunk updates, and finalization; the work is done when the supported streamed APIs and their scope are defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- cryptography
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100