Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding HPKE support for crypto operations per RFC-9180 #1146

Merged
merged 18 commits into from
Aug 15, 2023

Conversation

jorgesaldivar
Copy link
Contributor

Supported cryptographic schemes:
KEM (key encapsulation mechanism)

  • 0x0020: DHKEM(X25519, HKDF-SHA256)

KDF (key derivation function)

  • 0x0001: HKDF-SHA256

AEAD (Authenticated Encryption with Associated Data)

  • 0x0001: AES-128-GCM
  • 0x0002: AES-256-GCM
  • 0x0003: ChaCha20Poly1305

Supported cryptographic schemes:
KEM (key encapsulation mechanism)
- 0x0020: DHKEM(X25519, HKDF-SHA256)

KDF (key derivation function)
- 0x0001: HKDF-SHA256

AEAD (Authenticated Encryption with Associated Data)
- 0x0001: AES-128-GCM
- 0x0002: AES-256-GCM
- 0x0003: ChaCha20Poly1305
@prbprbprb
Copy link
Collaborator

prbprbprb commented Jun 20, 2023

LGTM and tests pass under Gradle+OpenJDK... I haven't really reviewed the JNI code, hoping @davidben can do the honours.

David: The public APIs here are for OpenJDK only, on Android there will be a delegating API from a different namespace... Jorge can point you at the CL for that if needed.

common/src/jni/main/cpp/conscrypt/native_crypto.cc Outdated Show resolved Hide resolved
common/src/jni/main/cpp/conscrypt/native_crypto.cc Outdated Show resolved Hide resolved
common/src/jni/main/cpp/conscrypt/native_crypto.cc Outdated Show resolved Hide resolved
common/src/jni/main/cpp/conscrypt/native_crypto.cc Outdated Show resolved Hide resolved
common/src/main/java/org/conscrypt/Hpke.java Outdated Show resolved Hide resolved
common/src/main/java/org/conscrypt/HpkeSuite.java Outdated Show resolved Hide resolved
common/src/main/java/org/conscrypt/HpkeSuite.java Outdated Show resolved Hide resolved
common/src/main/java/org/conscrypt/HpkeSuite.java Outdated Show resolved Hide resolved
common/src/main/java/org/conscrypt/HpkeSuite.java Outdated Show resolved Hide resolved
jorgesaldivar pushed a commit to jorgesaldivar/conscrypt that referenced this pull request Jul 19, 2023
jorgesaldivar pushed a commit to jorgesaldivar/conscrypt that referenced this pull request Jul 19, 2023
common/src/jni/main/cpp/conscrypt/native_crypto.cc Outdated Show resolved Hide resolved
common/src/main/java/org/conscrypt/HpkeSuite.java Outdated Show resolved Hide resolved
common/src/main/java/org/conscrypt/Hpke.java Outdated Show resolved Hide resolved
common/src/main/java/org/conscrypt/HpkeSuite.java Outdated Show resolved Hide resolved
common/src/main/java/org/conscrypt/HpkeSuite.java Outdated Show resolved Hide resolved
Copy link
Contributor

@davidben davidben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if Pete is also happy!

common/src/main/java/org/conscrypt/HpkeContextSender.java Outdated Show resolved Hide resolved
common/src/jni/main/cpp/conscrypt/native_crypto.cc Outdated Show resolved Hide resolved
@prbprbprb
Copy link
Collaborator

LGTM if Pete is also happy!

Thanks for all your help, David!

@prbprbprb prbprbprb merged commit 8b379a7 into google:master Aug 15, 2023
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants