ring icon indicating copy to clipboard operation
ring copied to clipboard

Base Mode HPKE

Open tanyav2 opened this issue 3 years ago • 6 comments

This is a draft of a base mode implementation of HPKE. Opening this up before implementing the other modes for early feedback. It also includes support for bidirectional encryption, since in practice, almost all applications require it.

tanyav2 avatar Feb 16 '22 06:02 tanyav2

@tanyav2 Thanks for doing this. Are you still interested in this? If so, I can review it soon.

briansmith avatar Oct 01 '23 01:10 briansmith

Yes, still interested!

tanyav2 avatar Oct 02 '23 17:10 tanyav2

Over in rustls we'd like to implement support for Encrypted Client Hello, which would ideally use this.

Failing that, the work in this PR could live in a separate crate but that would need a solution for #331 (happy to provide a PR for that if that is the preferred direction).

ctz avatar Dec 18 '23 13:12 ctz

@ctz, I do think we should solve #331 regardless. In terms of the FIPS project I'm working on, my hope is that we'd implement HPKE outside of the FIPS boundary, by using an implementation of static ECDH that is within the FIPS boundary. Noise needs a solution for #331 anyway, and I believe that a solution for #331 is blocking the next phases of the HPKE implementation, from the "not implemented yet" comments I see in this PR.

briansmith avatar Dec 19 '23 23:12 briansmith

(Sorry, I didn't mean to close this. Reopening.)

briansmith avatar Dec 19 '23 23:12 briansmith

Codecov Report

Attention: 61 lines in your changes are missing coverage. Please review.

Comparison is base (08fcf4a) 93.02% compared to head (883ac53) 95.96%. Report is 1627 commits behind head on main.

Files Patch % Lines
src/hpke.rs 92.15% 57 Missing :warning:
tests/hpke_tests.rs 96.49% 4 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1462      +/-   ##
==========================================
+ Coverage   93.02%   95.96%   +2.93%     
==========================================
  Files         127      138      +11     
  Lines       18227    21601    +3374     
  Branches      195      226      +31     
==========================================
+ Hits        16956    20729    +3773     
+ Misses       1237      837     -400     
- Partials       34       35       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Dec 19 '23 23:12 codecov[bot]