Repository navigation
Conversation
Contributor
🤖 Pull request artifacts
|
capcom6
force-pushed
the
encryption/mgf1-digest-fix
branch
2 times, most recently
from
October 7, 2026 10:45
4304489 to
91bd260
Compare
capcom6
force-pushed
the
encryption/mgf1-digest-fix
branch
from
October 12, 2026 01:30
91bd260 to
14ea3f4
Compare
Device-paired E2E could not decrypt on any Android version. The OAEP parameters requested MGF1-SHA-256, but Android Keystore authorises only SHA-1 for MGF1 unless the key is created with setMgf1Digests, which is API 35+ and unavailable to this module (compileSdk 33). Every decrypt attempt failed: - below API 35: InvalidAlgorithmParameterException: Unsupported MGF1 digest: SHA-256. Only SHA-1 supported - API 35 and newer: KeyStoreException: INCOMPATIBLE_MGF_DIGEST Pin MGF1 to SHA-1 on both encrypt and decrypt and hoist the digests into named constants so the two paths cannot drift. The OAEP digest stays SHA-256. Verified with RSAEncryptionProviderTest on API 25, 30 and 36 (2/2 each); all three failed before this change.
No workflow ran connectedAndroidTest - build-apk.yml only runs `./gradlew test` - so RSAEncryptionProviderTest never executed in CI. That is how the MGF1 regression shipped in v1.77.0: the round-trip test that would have caught it passes on a developer machine only because nothing automated it. Run the suite on API 25, 30 and 35. Those levels cover the pre-M KeyPairGeneratorSpec branch, the Keystore1 provider, and the first level where Keystore2 enforces the MGF1 digest against the key's authorised set.
capcom6
force-pushed
the
encryption/mgf1-digest-fix
branch
from
October 15, 2026 01:25
f3cc5ae to
7d31764
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Confidence Score: 5/5
The PR appears safe to merge based on the current changes and resolved review threads.Summary
The PR uses MGF1-SHA-1 with RSA-OAEP-SHA-256 for Android Keystore-backed keys and adds instrumented coverage across three Android API levels. There are no changes since the previous review and no new findings.
Reviews (9) · Last reviewed commit: "[ci] add instrumented tests for encrypti..." · Reviewed by Greptile