Skip to content

Commit

Permalink
Fix Android attestation (#546)
Browse files Browse the repository at this point in the history
* Fix Android attestation

Android attestation had a circular dependency on the public key: The authenticatorData has a public key that was originally intended to be stuck in the ChallengeData for generating a new keypair. When calling this function the public key isn't available to us yet. We have made a change to bring this in line with other attestation formats (ie. packed attestation).

* Update index.bs

* Update index.bs
  • Loading branch information
christiaanbrand authored and leshi committed Sep 13, 2017
1 parent dcf7939 commit db1be80
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2424,19 +2424,26 @@ the attestation=] is consistent with the fields of the attestation certificate's
attStmt: androidStmtFormat
)

androidStmtFormat = bytes
androidStmtFormat = {
alg: rsaAlgName / eccAlgName,
sig: bytes,
x5c: [ credCert: bytes, * (caCert: bytes) ]
}

```

: Signing procedure
:: 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|.

Request an Android Key Attestation by calling "keyStore.getCertificateChain(myKeyUUID)") providing |attToBeSigned| as the
Request an Android Key Attestation by calling "keyStore.getCertificateChain(myKeyUUID)") providing |clientDataHash| as the
challenge value (e.g., by using <a
href="https://developer.android.com/reference/android/security/keystore/KeyGenParameterSpec.Builder.html#setAttestationChallenge(byte%5B%5D)">
setAttestationChallenge</a>), and set the attestation statement to the returned value.
setAttestationChallenge</a>). Set x5c to the returned value.

The authenticator produces |sig| by concatenating |authenticatorData| and |clientDataHash|,
and signing the result using the credential private key. It sets |alg| to the algorithm of the signature format.


: Verification procedure
:: Verification is performed as follows:
Expand Down Expand Up @@ -3183,7 +3190,7 @@ IANA "WebAuthn Attestation Statement Format Identifier" registry established by
- Specification Document: Section [[#tpm-attestation]] of this specification
<br/><br/>
- WebAuthn Attestation Statement Format Identifier: android-key
- Description: Platform-provided authenticators based on Android versions "N", and later, may provide this proprietary "hardware
- Description: Platform-provided authenticators based on versions "N", and later, may provide this proprietary "hardware
attestation" statement.
- Specification Document: Section [[#android-key-attestation]] of this specification
<br/><br/>
Expand Down

0 comments on commit db1be80

Please sign in to comment.