Merged
Conversation
3c294ef to
8659eb4
Compare
Right now our DeviceCheck machinery only works on real iOS devices (excluding the iOS simulator) and Android devices (real or emulator) and we need them to work for the web (for the web version of Multipaz Wallet) and it would also be nice if they worked for the iOS simulator. As such, introduce `DeviceAttestationSoftware` which can be generated in any environment which lacks hardware-backed attestation. This is inherently insecure but the backend has access to the attestation so it can provide a subset of functionality to e.g. web clients. For example, for Multipaz Wallet we can allow access to shared state (bound to e.g. a Google account) for web clients but refuse access to e.g. key attestation services. Also introduce the notion of a "proof of secret" embedded in this new attestation. This is inhererently insecure (an attacker can exfiltrate this client-side secret from the binary or app process) and HW-backed attestation should be preferred but in an environment without HW-backed attestation this adds a little bit of security. Change DeviceCheck for JVM so it uses `DeviceAttestationSoftware` and also DeviceCheck for iOS when running on the iOS simulator. This way it's actually possible to develop Multipaz Wallet using the iOS simulator when using its dev backend configured to accept software attestations. Add a new screen to Compose TestApp to easily test both device attestations and assertions, both strict and non-strict. This also uncovered a bug in `ClientRegistrationImpl` where we would always generate empty challenges. Fix this. Test: Unit tests for DeviceAttestationSoftware. Test: Manually tested on Android and iOS. Signed-off-by: David Zeuthen <zeuthen@google.com>
8659eb4 to
f8d44f6
Compare
sorotokin
approved these changes
Mar 30, 2026
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.
Right now our DeviceCheck machinery only works on real iOS devices (excluding the iOS simulator) and Android devices (real or emulator) and we need them to work for the web (for the web version of Multipaz Wallet) and it would also be nice if they worked for the iOS simulator.
As such, introduce
DeviceAttestationSoftwarewhich can be generated in any environment which lacks hardware-backed attestation. This is inherently insecure but the backend has access to the attestation so it can provide a subset of functionality to e.g. web clients. For example, for Multipaz Wallet we can allow access to shared state (bound to e.g. a Google account) for web clients but refuse access to e.g. key attestation services.Also introduce the notion of a "proof of secret" embedded in this new attestation. This is inhererently insecure (an attacker can exfiltrate this client-side secret from the binary or app process) and HW-backed attestation should be preferred but in an environment without HW-backed attestation this adds a little bit of security.
Change DeviceCheck for JVM so it uses
DeviceAttestationSoftwareand also DeviceCheck for iOS when running on the iOS simulator. This way it's actually possible to develop Multipaz Wallet using the iOS simulator when using its dev backend configured to accept software attestations.Add a new screen to Compose TestApp to easily test both device attestations and assertions, both strict and non-strict.
This also uncovered a bug in
ClientRegistrationImplwhere we would always generate empty challenges. Fix this.Test: Unit tests for DeviceAttestationSoftware.
Test: Manually tested on Android and iOS.