ring
ring copied to clipboard
Add {OpeningKey, LessSafeKey}::open_in_place_separate_tag
-
For API parity with
seal_in_place_separate_tag. -
And because this allows not-in-place decryption without allocation: the ciphertext can be copied to the output buffer, and the tag can be passed separately.
What are the remaining blocking issues on this PR? I just ran into this asymmetry in the crate API, and I'd be happy to help push this over the line if I can.
Ping for feedback here?
I will revisit this after PR #1185 is merged. That should make it easier to implement, review, and test this.
@oconnor663 Are you still interested in this?
Here's my suggested approach to this:
- Implement
LessSafeKey::open_within_separate_tag. - Re-implement
LessSafeKey::open_withinin terms ofLessSafeKey::open_within_separate_tag. - Add tests to aead_tests.rs for the new function.
- Implement
OpeningKey::open_in_place_separate_tagin terms ofLessSafeKey::open_within_separate_tag. - Add tests for
OpeningKey::open_in_place_separate_tagto aead_test.rs.
I see that LessSafeKey::open_in_place_separate_tag landed in https://github.com/briansmith/ring/commit/2896a014de94d670a6913156c9f31d8de8a2323b and it is much appreciated.