From 176c192106e16d06eb35020daefa5ee953a05614 Mon Sep 17 00:00:00 2001 From: Jonas Finnemann Jensen Date: Tue, 17 Mar 2026 06:16:41 -0700 Subject: [PATCH] GSoC idea: JCA backend for package:webcrypto Change-Id: Ie25b171e728665fe4d97fcf30d6fc862b44c28e6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/488462 Auto-Submit: Jonas Jensen Reviewed-by: Daco Harkes Commit-Queue: Daco Harkes --- docs/gsoc/Dart-GSoC-2026-Project-Ideas.md | 36 +++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/docs/gsoc/Dart-GSoC-2026-Project-Ideas.md b/docs/gsoc/Dart-GSoC-2026-Project-Ideas.md index d3f9bc47fd6..e327a868a7f 100644 --- a/docs/gsoc/Dart-GSoC-2026-Project-Ideas.md +++ b/docs/gsoc/Dart-GSoC-2026-Project-Ideas.md @@ -181,3 +181,39 @@ Part 2: Create a Dart CLI app that uses `ProfileableWebSocket`. It should connec * [DevTools Network Panel documentation](https://docs.flutter.dev/tools/devtools/network) * [Dart DevTools source code](https://github.com/flutter/devtools) + +## **Idea:** Android JCA backend for package:webcrypto + + - **Possible Mentor(s)**: Hamdaan Ali `hamdaan.quatil@gmail.com`, Jonas Jensen `jonasfj@google.com` + - **Difficulty**: Hard + - **Project size**: Large (350 hours) + - **Skills**: Dart, Flutter, Android, Java/Kotlin, JNI + +**Description**: + +`package:webcrypto` provides a cross-platform implementation of the +_Web Cryptography APIs_. Outside the browser, it currently uses a native +implementation that embeds BoringSSL. This project is to create an experimental +branch of `package:webcrypto`, where Android uses `package:jnigen` to call +platform Java cryptography APIs instead of bundling a BoringSSL binary with +the package. + +**Good Sample Project**: + +Build a small Flutter app for Android that uses `package:jnigen` to call a +simple Java cryptography API from Dart, such as computing a digest or HMAC. +Expose the operation through a small Dart wrapper, compare the result with the +existing `package:webcrypto` API on Android, and document the data flow +between Dart, JNI, and the Java implementation. + +Bonus: include a simple benchmark against a version using the current +native backend. + +**Expected outcome**: + +A branch of `package:webcrypto` with an Android-specific backend implemented +through `package:jnigen` for an initial subset of primitives, together with +tests and documentation evaluating correctness, performance, +packaging constraints, and binary size tradeoffs. +A successful project may demonstrate that this approach is viable for future +integration into the main package.