Skip to content

feat(impl_jni): add JCA AES-CBC implementation#304

Open
mfazrinizar wants to merge 1 commit into
google:android-jca-branchfrom
mfazrinizar:feat/impl-jni-aes-cbc
Open

feat(impl_jni): add JCA AES-CBC implementation#304
mfazrinizar wants to merge 1 commit into
google:android-jca-branchfrom
mfazrinizar:feat/impl-jni-aes-cbc

Conversation

@mfazrinizar

Copy link
Copy Markdown
Contributor

Summary

Adds the JNI/JCA AES-CBC implementation on top of the existing Android JCA backend skeleton.

This PR implements:

  • AES-CBC raw key import/export
  • AES-CBC JWK import/export
  • AES-CBC key generation using the shared AES helper
  • byte and stream encryption/decryption
  • JCA Cipher("AES/CBC/PKCS5Padding") wiring with IvParameterSpec
  • focused desktop JNI tests
  • Android integration smoke test through the public API

PKCS5Padding is the JCA transformation name used for AES-CBC PKCS#7-style block padding.

This PR depends on the separate IvParameterSpec generated-binding PR #301. After that lands, this PR could then be tested against test/webcrypto_test.dart. This PR will be rebased after PR #298 and #300 approved and merged, therefore this is still a draft PR.

Testing

  • dart analyze
  • dart test test/impl_jni_aescbc_test.dart
  • dart test test/webcrypto_test.dart -p vm -n AES-CBC
  • flutter test integration_test/jni_aescbc_test.dart -d emulator-name

@mfazrinizar mfazrinizar force-pushed the feat/impl-jni-aes-cbc branch from 8b88407 to 618e863 Compare July 8, 2026 14:14
@mfazrinizar mfazrinizar force-pushed the feat/impl-jni-aes-cbc branch from 618e863 to 63dfd42 Compare July 8, 2026 14:27
@mfazrinizar mfazrinizar marked this pull request as ready for review July 8, 2026 14:28
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