Skip to content

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

Draft
mfazrinizar wants to merge 3 commits into
google:android-jca-branchfrom
mfazrinizar:feat/impl-jni-aes-cbc
Draft

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

Conversation

@mfazrinizar

Copy link
Copy Markdown

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

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