Repository navigation
feat(sync): add FLOW-SYNC/2 crypto checked against shared vectors - #1531
Merged
Merged
Conversation
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.
Summary
First step of linked devices on Android: the FLOW-SYNC/2 cryptography, checked byte for byte against the shared vectors from Flow-Tube/flow-sync (the spec all three apps follow). Nothing calls it yet; nothing changes for users.
sync2/crypto:sync2/store/Envelope.kt: the signed object envelope, and the stream rules (replay, gap,prev).SyncSerialization.canonicalJsonis now public, so FLOW-SYNC/2 reuses the canonical JSON writer instead of a second copy.Conscrypt.newProvider(); the platform has no HPKE before API 34);bcprov-jdk18on1.86, because Conscrypt's public API can't derive an Ed25519 public key from a seed, which recovery keys need;kotlin-bip391.0.9 (Electric Coin Co.), the BIP39 English list and checksum.conscrypt-openjdk-uber, same version and API, test-only). The Android-only artifact is kept off the JVM test classpath. Robolectric already pulled 2.5.2 of it.cab3979intoapp/src/test/resources/sync2/.The spec's Android row is updated in Flow-Tube/flow-sync#36.
Related issue
Part of #1075 (linked devices).
Change type
Validation
./gradlew :app:assembleGithubDebug: ok at the top of this stack./gradlew :app:testGithubDebugUnitTest: 4578 passed, 46 skipped, 0 failed on this commit;VectorsTest11 passed./gradlew :app:assembleFossRelease: universal APK 29,430,087 bytes against 29,415,385 on main (+14,702 bytes for this stack's first two PRs), under the 29,500,000 gate./gradlew ktlintCheck: okTest device and Android version: none (JVM tests only)
Risk and compatibility
No migrations, permissions or behavior changes. Three new dependencies, all added in
gradle/libs.versions.toml. Note that main itself is already within about 85 KB of the FOSS size gate.