diff options
author | David Zeuthen <zeuthen@google.com> | 2020-06-03 17:27:58 -0400 |
---|---|---|
committer | David Zeuthen <zeuthen@google.com> | 2020-06-04 16:46:15 -0400 |
commit | 5641fe41414a0b8d7e95d45425628a268284d068 (patch) | |
tree | f93a268720aacb5b7c3150990895ab21f497db53 /identity | |
parent | df792ee3f2d74d5df6d74ab370d3fcaa35a309ca (diff) | |
download | base-5641fe41414a0b8d7e95d45425628a268284d068.tar.gz |
Identity: Update requirements about SessionTranscript CBOR and provisioning challenge.
Bug: 156911917
Bug: 158107945
Test: atest VtsHalIdentityTargetTest
Test: atest android.security.identity.cts
Change-Id: Iacdf89744bbd30c5a10d6cba873147e424ddb01b
Diffstat (limited to 'identity')
-rw-r--r-- | identity/java/android/security/identity/IdentityCredential.java | 27 | ||||
-rw-r--r-- | identity/java/android/security/identity/WritableIdentityCredential.java | 8 |
2 files changed, 12 insertions, 23 deletions
diff --git a/identity/java/android/security/identity/IdentityCredential.java b/identity/java/android/security/identity/IdentityCredential.java index b351b3d77430..493c85a930be 100644 --- a/identity/java/android/security/identity/IdentityCredential.java +++ b/identity/java/android/security/identity/IdentityCredential.java @@ -167,25 +167,14 @@ public abstract class IdentityCredential { * IntentToRetain = bool * </pre> * - * <p>If the {@code sessionTranscript} parameter is not {@code null}, it must contain CBOR - * data conforming to the following CDDL schema: - * - * <pre> - * SessionTranscript = [ - * DeviceEngagementBytes, - * EReaderKeyBytes - * ] - * - * DeviceEngagementBytes = #6.24(bstr .cbor DeviceEngagement) ; Bytes of DeviceEngagement - * EReaderKeyBytes = #6.24(bstr .cbor EReaderKey.Pub) ; Bytes of EReaderKey.pub - * - * EReaderKey.Pub = COSE_Key ; Ephemeral public key provided by reader - * </pre> - * - * <p>where a {@code COSE_Key} structure for the public part of the key-pair previously - * generated by {@link #createEphemeralKeyPair()} must appear somewhere in - * {@code DeviceEngagement} and the X and Y coordinates must both be present - * in uncompressed form. + * <p>If the {@code sessionTranscript} parameter is not {@code null}, the X and Y coordinates + * of the public part of the key-pair previously generated by {@link #createEphemeralKeyPair()} + * must appear somewhere in the bytes of the CBOR. Each of these coordinates must appear + * encoded with the most significant bits first and use the exact amount of bits indicated by + * the key size of the ephemeral keys. For example, if the ephemeral key is using the P-256 + * curve then the 32 bytes for the X coordinate encoded with the most significant bits first + * must appear somewhere in {@code sessionTranscript} and ditto for the 32 bytes for the Y + * coordinate. * * <p>If {@code readerAuth} is not {@code null} it must be the bytes of a {@code COSE_Sign1} * structure as defined in RFC 8152. For the payload nil shall be used and the diff --git a/identity/java/android/security/identity/WritableIdentityCredential.java b/identity/java/android/security/identity/WritableIdentityCredential.java index c7aa32855abc..305d0ead0652 100644 --- a/identity/java/android/security/identity/WritableIdentityCredential.java +++ b/identity/java/android/security/identity/WritableIdentityCredential.java @@ -56,10 +56,10 @@ public abstract class WritableIdentityCredential { * authority doesn't care about the nature of the security hardware. If called, however, this * method must be called before {@link #personalize(PersonalizationData)}. * - * @param challenge is a byte array whose contents should be unique, fresh and provided by - * the issuing authority. The value provided is embedded in the attestation - * extension and enables the issuing authority to verify that the attestation - * certificate is fresh. + * @param challenge is a non-empty byte array whose contents should be unique, fresh and + * provided by the issuing authority. The value provided is embedded in the + * attestation extension and enables the issuing authority to verify that the + * attestation certificate is fresh. * @return the X.509 certificate for this credential's CredentialKey. */ public abstract @NonNull Collection<X509Certificate> getCredentialKeyCertificateChain( |