ring icon indicating copy to clipboard operation
ring copied to clipboard

Add {OpeningKey, LessSafeKey}::open_in_place_separate_tag

Open blckngm opened this issue 6 years ago • 5 comments

  • 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.

blckngm avatar Oct 17 '19 09:10 blckngm

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.

oconnor663 avatar Oct 14 '20 02:10 oconnor663

Ping for feedback here?

oconnor663 avatar Dec 21 '20 02:12 oconnor663

I will revisit this after PR #1185 is merged. That should make it easier to implement, review, and test this.

briansmith avatar Feb 05 '21 03:02 briansmith

@oconnor663 Are you still interested in this?

Here's my suggested approach to this:

  1. Implement LessSafeKey::open_within_separate_tag.
  2. Re-implement LessSafeKey::open_within in terms of LessSafeKey::open_within_separate_tag.
  3. Add tests to aead_tests.rs for the new function.
  4. Implement OpeningKey::open_in_place_separate_tag in terms of LessSafeKey::open_within_separate_tag.
  5. Add tests for OpeningKey::open_in_place_separate_tag to aead_test.rs.

briansmith avatar Apr 20 '21 23:04 briansmith

I see that LessSafeKey::open_in_place_separate_tag landed in https://github.com/briansmith/ring/commit/2896a014de94d670a6913156c9f31d8de8a2323b and it is much appreciated.

ivan avatar Nov 29 '21 08:11 ivan