aws / aws/aws-encryption-sdk-c
Investigate potential re-use of EVP_CIPHER_CTX
- Dominant language
- C
- Stars
- 63
- Forks
- 59
- PR merge metrics
- No merged PRs in 30d
Description
The encrypt and decrypt path each appear to [initialize an EVP_CIPHER_CTX](https://github.com/aws/aws-encryption-sdk-c/blob/6005f41bf70ab9ef51139f80756cd30cde270d85/source/cipher.c#L435) twice using the same content key, which may represent a redundant AES key schedule. Re-using this context could avoid a redundant key schedule. This would likely require some refactoring of the aws_cryptosdk_session and the encrypt/decrypt paths, as well as the corresponding proofs.
Contributor guide
Research direction
Start at source/cipher.c around the linked EVP_CIPHER_CTX initialization and trace how the aws_cryptosdk_session encrypt and decrypt paths manage the content key. Determine whether the context can be reused safely, then assess the corresponding proofs; the investigation is done when the refactoring scope and its proof implications are established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cryptography
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100