[WIP] Implement Play Integrity attestation and expand proof companion…#790
Merged
prathieshna merged 2 commits intoJul 12, 2026
Conversation
… file generation.
Specific changes:
**Proof Generation & Metadata:**
- Expanded `ProofCompanionGenerator` to generate `.csv` proof files and corresponding PGP signatures (`.csv.asc`) alongside existing JSON proofs.
- Added a dynamically generated `HowToVerifyProofData.txt` to the proof bundle with instructions for manual GPG, OpenTimestamps, and Play Integrity verification.
- Refactored metadata extraction into `buildProofFields` to include richer device and network information (e.g., Brand, Model, Network Type, IPv4/IPv6, CellInfo) directly from `CaptureMetadata`.
- Updated `CameraViewModel` to pass live capture metadata to the proof generator, ensuring sensor and device fields are preserved without relying solely on EXIF.
**Google Play Integrity (GST):**
- Introduced `SafetyNetHelper` with flavor-specific implementations:
- **GMS:** Requests a Play Integrity token (GST) using a nonce derived from the media hash and saves it to a `.gst` file.
- **FOSS:** Provides a no-op stub for environments without Google Mobile Services.
- Added `com.google.android.play:integrity` dependency to the GMS build configuration.
**Networking & Utilities:**
- Updated OpenTimestamps (OTS) submission to use `application/octet-stream` for raw hash uploads.
- Implemented CSV escaping logic to handle special characters and line breaks in metadata fields.
- Included the new `.csv`, `.gst`, and instruction files in the list of companions prepared for upload.
There was a problem hiding this comment.
detekt found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
7e51a3c
into
temp/next-prod-release-8th-june-2026
2 checks passed
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.
… file generation.
Specific changes:
Proof Generation & Metadata:
ProofCompanionGeneratorto generate.csvproof files and corresponding PGP signatures (.csv.asc) alongside existing JSON proofs.HowToVerifyProofData.txtto the proof bundle with instructions for manual GPG, OpenTimestamps, and Play Integrity verification.buildProofFieldsto include richer device and network information (e.g., Brand, Model, Network Type, IPv4/IPv6, CellInfo) directly fromCaptureMetadata.CameraViewModelto pass live capture metadata to the proof generator, ensuring sensor and device fields are preserved without relying solely on EXIF.Google Play Integrity (GST):
SafetyNetHelperwith flavor-specific implementations:.gstfile.com.google.android.play:integritydependency to the GMS build configuration.Networking & Utilities:
application/octet-streamfor raw hash uploads..csv,.gst, and instruction files in the list of companions prepared for upload.