Skip to content

chore(jca): add ECDH KeyAgreement JNI binding - #353

Open
mfazrinizar wants to merge 2 commits into
google:android-jca-branchfrom
mfazrinizar:chore/jca-ecdh-bindings
Open

chore(jca): add ECDH KeyAgreement JNI binding#353
mfazrinizar wants to merge 2 commits into
google:android-jca-branchfrom
mfazrinizar:chore/jca-ecdh-bindings

Conversation

@mfazrinizar

Copy link
Copy Markdown
Contributor

Summary

Adds JNIgen coverage for javax.crypto.KeyAgreement, required by the JNI/JCA ECDH implementation.

The generated API exposes the operations needed by the JCA backend:

  • KeyAgreement.getInstance("ECDH")
  • init(privateKey)
  • doPhase(publicKey, true)
  • generateSecret()

The first commit updates only the reproducible JNIgen configuration. The second commit contains only regenerated output. No JCA backend implementation is included.

Regeneration

bash tool/update-jca-bindings.sh

Generated with JDK 17 and Android SDK Platform 36. Regenerating a second time produced the same checksum and no additional changes.

Testing

dart format --output=none --set-exit-if-changed .
dart analyze
dart run jni:setup  # if the desktop JNI helper is not already available
dart test test/impl_jni_digest_test.dart test/impl_jni_hmac_test.dart test/impl_jni_aesgcm_test.dart test/impl_jni_aescbc_test.dart test/impl_jni_aesctr_test.dart test/impl_jni_rsassapkcs1v15_test.dart test/impl_jni_rsaoaep_test.dart test/impl_jni_rsapss_test.dart
git diff --check

@mfazrinizar
mfazrinizar marked this pull request as ready for review August 1, 2026 13:32
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.

1 participant