RustCrypto / RustCrypto/traits
Support one pass re-encryption?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 755
- Forks
- 256
- Avg merge
- 1h 27m
- Merged PRs (30d)
- 2
Description
I have encountered a problem in which I need to re-encrypt data. I wonder if we could add some kind of API which would allow "in-flight" re-encryption, i.e. we would decrypt blocks (or a block, if cipher does not support parallel decryption) with an old cipher, immedetely encrypt them with a new cipher, and only then store the result in an output buffer. It should not only help with performance, since data processing is done in one pass, but also improve security a bit, since it would minimize time plaintext spends in RAM.
In my case decryption and encryption is done by a single algorithm, but in general decryption and encryption may be performed by different algorithms (e.g. you decrypt data with AES-GCM and encrypt it with ChaCha20Poly1305).
Unfortunately, right now I don't have good ideas of how such API could look like. Do you have any good ideas and do you think it's worth to support such API in trait crates?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file, test, or entry point is named. Start by reviewing the existing encryption and decryption trait APIs in the RustCrypto traits repository, then determine whether a one-pass API can support different algorithms and block-processing constraints. Done would be an agreed API design and a decision on whether the trait crates should support it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cryptography
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100