aws / aws-lc-rs

aws-lc-rs is a cryptographic library using AWS-LC for its cryptographic operations. The library strives to be API-compatible with the popular Rust library named ring.
Other
236 stars 40 forks source link

Support streaming API for CBC #396

Closed fgaud closed 2 weeks ago

fgaud commented 2 months ago

Problem:

I would like to be able to use CBC in a streaming fashion. Unfortunately, currently the CBC encryptor always puts padding after an encryption operation and expects padding during a decryption operation.

OpenSSL solves that problem with finalize methods (for ex. https://docs.rs/openssl/latest/openssl/envelope/struct.Open.html#method.finalize)

Solution:

There are two possible options

The later would be nicer but more work

Requirements / Acceptance Criteria:

What must a solution address in order to solve the problem? How do we know the solution is complete?

Ideally we can encrypt/decrypt in a streaming fashion.

Out of scope:

Is there anything the solution will intentionally NOT address?

justsmth commented 1 week ago

FYI -- this API is now available in v1.8.0.