Skip to content

Commit

Permalink
Obfuscate Safetynet nonce
Browse files Browse the repository at this point in the history
Closes #868
  • Loading branch information
leshi committed Apr 12, 2018
1 parent 2a23a11 commit 37e89f1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.bs
Expand Up @@ -3462,7 +3462,8 @@ even if the SafetyNet API is also present.
:: Let |authenticatorData| denote the [=authenticator data for the attestation=], and let |clientDataHash| denote the
[=hash of the serialized client data=].

Concatenate |authenticatorData| and |clientDataHash| to form |attToBeSigned|.
Concatenate |authenticatorData| and |clientDataHash|, perform SHA-256 hash of the concatenated string, and
let the result of the hash form |attToBeSigned|.

Request a SafetyNet attestation, providing |attToBeSigned| as the nonce value. Set |response| to the result, and |ver| to
the version of Google Play Services running in the authenticator.
Expand All @@ -3473,7 +3474,7 @@ even if the SafetyNet API is also present.
- Verify that |attStmt| is valid CBOR conforming to the syntax defined above and perform CBOR decoding on it to extract the
contained fields.
- Verify that |response| is a valid SafetyNet response of version |ver|.
- Verify that the nonce in the |response| is identical to the concatenation of |authenticatorData| and |clientDataHash|.
- Verify that the nonce in the |response| is identical to the SHA-256 hash of the concatenation of |authenticatorData| and |clientDataHash|.
- Verify that the attestation certificate is issued to the hostname "attest.android.com" (see
[SafetyNet online documentation](https://developer.android.com/training/safetynet/index.html#compat-check-response)).
- Verify that the `ctsProfileMatch` attribute in the payload of |response| is true.
Expand Down

0 comments on commit 37e89f1

Please sign in to comment.