Repository navigation
K2GO-554 feat(download): app-side rootfs signature verify - #760
Merged
Merged
Conversation
…(D5) Add MinisignVerifier (BouncyCastle lightweight: streamed BLAKE2b-512 plus two Ed25519 checks, prehashed "ED" only) and TrustedSigningKeys (public keys pinned by key id). isTrusted fails closed on a missing, malformed, or unknown-key signature. Bundle bcprov-jdk15to18. Hermetic JVM tests (in-test keygen and signing) and an on-device test.
… D8) When an official rootfs download carries a minisign signature from a pinned key, TarExtractor skips the listing pass (the bake gate checked traversal before signing) and drives the byte bar from the gzip feeder against the gzip ISIZE. Aria2Manager verifies the sidecar after the integrity gate, opt-in per caller. Fail closed to the full listing when unsigned or unverified.
Q8 (Cortex-A7, no crypto extensions): BLAKE2b 3.4 MiB/s vs SHA-256 34 MiB/s. Identity comes from the minisign trusted comment, integrity from the existing SHA-256 pass.
…d comment file, size, sha256 and meta4 hash, authenticated by the global signature. A stale .sha256 or .meta4 now fails the bake.
…y BLAKE2b One Ed25519 check plus the existing DownloadVerifier pass replaces the full-file BLAKE2b (2 min 12 s on a OnePlus 7T, about 19 min projected on the Q8).
…heck BitTorrent stays on until the zero-pass step (A6). Trust also requires the signed file name to name the requested tier and ABI.
An unsigned meta4 could offer an official tarball of another ABI or tier; the signed file name must now match the request. RootfsTier.id() is the one tier token for the URLs and this check.
…d bar Full tiers are above 4 GiB, so the ISIZE trailer wrapped and the bar sat at 99%. Trust now applies only to gzip without validateRootfs, and the .minisig read is capped.
…esign map OnePlus 7T: trust check 0.16 s (was 2 min 12 s). Q8: no listing; cold SHA-256 at 11.9 MiB/s is now the main verify cost.
…/K2GO-554-app-verify
All decisions, including Amendment 1, are implemented and verified on device.
The trusted bar gets the bundled rootfs_sizes.csv snapshot, not the live .installed sidecar.
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.
What changes
k2go-rootfs v1 file= size= sha256= meta4=).RootfsManifest.judgeneeds the existing SHA-256 pass (DownloadVerifier), a matching manifest, and the requested tier/ABI. No BLAKE2b on the device..sha256or.meta4.Why
Verifications
Notes