Skip to content

chore: sync android-jca-branch with master - #338

Merged
HamdaanAliQuatil merged 17 commits into
google:android-jca-branchfrom
mfazrinizar:chore/sync-android-jca-with-master-337
Jul 24, 2026
Merged

chore: sync android-jca-branch with master#338
HamdaanAliQuatil merged 17 commits into
google:android-jca-branchfrom
mfazrinizar:chore/sync-android-jca-with-master-337

Conversation

@mfazrinizar

Copy link
Copy Markdown
Contributor

Summary

Mechanically merges master branch at 8a84b9b76ccf78381da05ef8ef1367e2ead0dbf0 into android-jca-branch.

This brings the Android JCA integration branch up to date through #337 before the JNI RSA-OAEP implementation is reviewed.

Manual conflict resolutions

  • example/webcrypto_demo_flutter_app/README.md: retained existing JNI smoke-test commands
  • lib/src/impl_stub/impl_stub.dart: retained master’s coverage annotation
  • lib/src/testing/testing.dart: included the new master regression tests
  • pubspec.yaml: retained jni: ^1.0.0 and updated native_toolchain_cmake to ^0.3.0
  • test/aes_ctr_counter_wrap_test.dart: retained JNI prerequisite skips

No new JCA primitive implementation changes are included.

Testing

  • dart format --output=none --set-exit-if-changed .
  • dart analyze
  • focused JNI tests for digest, HMAC, AES-GCM, AES-CBC, AES-CTR, and RSASSA-PKCS1-v1_5
  • git diff --check

Samarborkar and others added 17 commits June 22, 2026 21:43
…e#284)

* refactor: move Flutter demo app into example/webcrypto_demo_flutter_app/ (google#283)

* chore: fix references to the relocated example app (google#283)
…gle#279)

* refactor: replace runtime symbol lookup with direct FFI  bindings

* refactor: replace runtime symbol lookup with direct FFI
  bindings

* refactor: generate direct FFI bindings with ffigen

* refactor: remove stale symbol table files

* refactor: use Native.addressOf for EVP_PKEY finalizer
* Reject imported EC and RSA keys with trailing bytes

* Add regression tests for issue 60 (trailing bytes in key imports)

* Finalize regression tests for issue 60: hardcoded keys and browser compatibility

* Update lib/src/testing/regression/issue_60_trailing_bytes.dart

Co-authored-by: Jonas Finnemann Jensen <jopsen@gmail.com>

* Update lib/src/testing/regression/issue_60_trailing_bytes.dart

Co-authored-by: Jonas Finnemann Jensen <jopsen@gmail.com>

* Fix trailing bytes regression fixture

* Minimize trailing bytes fixture diff

* Fix trailing bytes regression on web wasm

* fix: FFI key import memory leaks and make trailing bytes tests

---------

Co-authored-by: Jonas Finnemann Jensen <jopsen@gmail.com>
* ci: add FFI memory-safety test lane

* test: separate Valgrind runner from FFI workload

* ci: run Valgrind in existing Linux job
…e#306)

* refactor(js): fix JSDomException checks for wasm compatibility

Resolve invalid_runtime_check_with_js_interop_types warnings for JSDomException.

Instead of directly catching the extension type JSDomException or checking e is JSObject, we catch generic objects, cast them to JSAny?, and check if they are JSDomException instances using isA<subtle.JSDomException>().

This avoids platform-inconsistent runtime checks that behave incorrectly under dart2wasm where extension types are runtime-erased.

* fix libraries

* refactor(js): fix JSDomException type-checking crash under WASM

Resolve _TypeError when casting generic exceptions to JSAny? under dart2wasm.
* fix(aes-ctr): handle partial chunks larger than buffer

* test(aes-ctr): refine large chunk coverage
Co-authored-by: Moritz <27859082+mosuem@users.noreply.github.com>
* chore: mark unsupported code paths with coverage:ignore

* test: mark impl_stub as coverage:ignore-file

* test: ignore unreachable curve fallbacks in EC helpers
* correct JWK use value for AES keys

* correct JWK use value for AES keys

* correct JWK use value for AES keys
Updates documentation on EcdhPrivateKey.deriveBits to include
the maximum number of bits that can be derived for each curve:

  * EllipticCurve.p256 — up to 256 bits
  * EllipticCurve.p384 — up to 384 bits
  * EllipticCurve.p521 — up to 528 bits

Also adds test coverage for all three curves at their maximum
derive lengths in the ECDH test runner.

Fixes google#130
@mfazrinizar
mfazrinizar marked this pull request as ready for review July 24, 2026 16:10
@HamdaanAliQuatil
HamdaanAliQuatil merged commit 26ee48e into google:android-jca-branch Jul 24, 2026
1 check 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.