Commit acf468d3 authored by Jun Choi's avatar Jun Choi Committed by Commit Bot

Add serialization logic for MakeCredential response

Serialization for MakeCredential response is required to implement
virtual CTAP2 security key.

Bug: 829413
Change-Id: I268c1f11f03e23a2d0713de3de0b53694a3fc31a
Reviewed-on: https://chromium-review.googlesource.com/1111337
Commit-Queue: Jun Choi <hongjunchoi@chromium.org>
Reviewed-by: default avatarJan Wilken Dörrie <jdoerrie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570683}
parent 04a621ec
...@@ -69,4 +69,15 @@ std::vector<uint8_t> AttestationObject::SerializeToCBOREncodedBytes() const { ...@@ -69,4 +69,15 @@ std::vector<uint8_t> AttestationObject::SerializeToCBOREncodedBytes() const {
.value_or(std::vector<uint8_t>()); .value_or(std::vector<uint8_t>());
} }
std::vector<uint8_t> SerializeToCtapStyleCborEncodedBytes(
const AttestationObject& object) {
cbor::CBORValue::MapValue map;
map.emplace(1, object.attestation_statement().format_name());
map.emplace(2, object.authenticator_data().SerializeToByteArray());
map.emplace(3, object.attestation_statement().GetAsCBORMap());
auto encoded_bytes = cbor::CBORWriter::Write(cbor::CBORValue(std::move(map)));
DCHECK(encoded_bytes);
return std::move(*encoded_bytes);
}
} // namespace device } // namespace device
...@@ -47,7 +47,7 @@ class COMPONENT_EXPORT(DEVICE_FIDO) AttestationObject { ...@@ -47,7 +47,7 @@ class COMPONENT_EXPORT(DEVICE_FIDO) AttestationObject {
// not indended to be trackable.) // not indended to be trackable.)
bool IsAttestationCertificateInappropriatelyIdentifying(); bool IsAttestationCertificateInappropriatelyIdentifying();
// Produces a CBOR-encoded byte-array in the following format: // Produces a WebAuthN style CBOR-encoded byte-array in the following format:
// {"authData": authenticator data bytes, // {"authData": authenticator data bytes,
// "fmt": attestation format name, // "fmt": attestation format name,
// "attStmt": attestation statement bytes } // "attStmt": attestation statement bytes }
...@@ -57,6 +57,14 @@ class COMPONENT_EXPORT(DEVICE_FIDO) AttestationObject { ...@@ -57,6 +57,14 @@ class COMPONENT_EXPORT(DEVICE_FIDO) AttestationObject {
return authenticator_data_.application_parameter(); return authenticator_data_.application_parameter();
} }
const AuthenticatorData& authenticator_data() const {
return authenticator_data_;
}
const AttestationStatement& attestation_statement() const {
return *attestation_statement_.get();
}
private: private:
AuthenticatorData authenticator_data_; AuthenticatorData authenticator_data_;
std::unique_ptr<AttestationStatement> attestation_statement_; std::unique_ptr<AttestationStatement> attestation_statement_;
...@@ -64,6 +72,15 @@ class COMPONENT_EXPORT(DEVICE_FIDO) AttestationObject { ...@@ -64,6 +72,15 @@ class COMPONENT_EXPORT(DEVICE_FIDO) AttestationObject {
DISALLOW_COPY_AND_ASSIGN(AttestationObject); DISALLOW_COPY_AND_ASSIGN(AttestationObject);
}; };
// Produces a CTAP style CBOR-encoded byte array that that conforms to the
// format CTAP2 devices sends to the client as a response. More specifically:
// {01: attestation format name,
// 02: authenticator data bytes,
// 03: attestation statement bytes }
COMPONENT_EXPORT(DEVICE_FIDO)
std::vector<uint8_t> SerializeToCtapStyleCborEncodedBytes(
const AttestationObject& object);
} // namespace device } // namespace device
#endif // DEVICE_FIDO_ATTESTATION_OBJECT_H_ #endif // DEVICE_FIDO_ATTESTATION_OBJECT_H_
...@@ -37,7 +37,7 @@ class COMPONENT_EXPORT(DEVICE_FIDO) AttestationStatement { ...@@ -37,7 +37,7 @@ class COMPONENT_EXPORT(DEVICE_FIDO) AttestationStatement {
// indended to be trackable.) // indended to be trackable.)
virtual bool IsAttestationCertificateInappropriatelyIdentifying() = 0; virtual bool IsAttestationCertificateInappropriatelyIdentifying() = 0;
const std::string& format_name() { return format_; } const std::string& format_name() const { return format_; }
protected: protected:
explicit AttestationStatement(std::string format); explicit AttestationStatement(std::string format);
......
...@@ -89,4 +89,9 @@ AuthenticatorMakeCredentialResponse::GetRpIdHash() const { ...@@ -89,4 +89,9 @@ AuthenticatorMakeCredentialResponse::GetRpIdHash() const {
return attestation_object_.rp_id_hash(); return attestation_object_.rp_id_hash();
} }
std::vector<uint8_t> GetSerializedCtapDeviceResponse(
const AuthenticatorMakeCredentialResponse& response) {
return SerializeToCtapStyleCborEncodedBytes(response.attestation_object());
}
} // namespace device } // namespace device
...@@ -49,18 +49,26 @@ class COMPONENT_EXPORT(DEVICE_FIDO) AuthenticatorMakeCredentialResponse ...@@ -49,18 +49,26 @@ class COMPONENT_EXPORT(DEVICE_FIDO) AuthenticatorMakeCredentialResponse
// Returns true if the attestation certificate is known to be inappropriately // Returns true if the attestation certificate is known to be inappropriately
// identifying. Some tokens return unique attestation certificates even when // identifying. Some tokens return unique attestation certificates even when
// the bit to request that is not set. (Normal attestation certificates are // the bit to request that is not set. (Normal attestation certificates are
// not indended to be trackable.) // not intended to be trackable.)
bool IsAttestationCertificateInappropriatelyIdentifying(); bool IsAttestationCertificateInappropriatelyIdentifying();
// ResponseData: // ResponseData:
const std::array<uint8_t, kRpIdHashLength>& GetRpIdHash() const override; const std::array<uint8_t, kRpIdHashLength>& GetRpIdHash() const override;
const AttestationObject& attestation_object() const {
return attestation_object_;
}
private: private:
AttestationObject attestation_object_; AttestationObject attestation_object_;
DISALLOW_COPY_AND_ASSIGN(AuthenticatorMakeCredentialResponse); DISALLOW_COPY_AND_ASSIGN(AuthenticatorMakeCredentialResponse);
}; };
COMPONENT_EXPORT(DEVICE_FIDO)
std::vector<uint8_t> GetSerializedCtapDeviceResponse(
const AuthenticatorMakeCredentialResponse& response);
} // namespace device } // namespace device
#endif // DEVICE_FIDO_AUTHENTICATOR_MAKE_CREDENTIAL_RESPONSE_H_ #endif // DEVICE_FIDO_AUTHENTICATOR_MAKE_CREDENTIAL_RESPONSE_H_
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
#include "device/fido/fido_constants.h" #include "device/fido/fido_constants.h"
#include "device/fido/fido_parsing_utils.h" #include "device/fido/fido_parsing_utils.h"
#include "device/fido/fido_test_data.h" #include "device/fido/fido_test_data.h"
#include "device/fido/opaque_attestation_statement.h"
#include "device/fido/opaque_public_key.h"
#include "testing/gmock/include/gmock/gmock.h" #include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
...@@ -196,6 +198,10 @@ constexpr uint8_t kAuthDataCBOR[] = { ...@@ -196,6 +198,10 @@ constexpr uint8_t kAuthDataCBOR[] = {
// and test_data::kTestECPublicKeyCOSE. // and test_data::kTestECPublicKeyCOSE.
0x58, 0xC4}; 0x58, 0xC4};
constexpr uint8_t kTestDeviceAaguid[] = {0xF8, 0xA0, 0x11, 0xF3, 0x8C, 0x0A,
0x4D, 0x15, 0x80, 0x06, 0x17, 0x11,
0x1F, 0x9E, 0xDC, 0x7D};
std::vector<uint8_t> GetTestAttestedCredentialDataBytes() { std::vector<uint8_t> GetTestAttestedCredentialDataBytes() {
// Combine kTestAttestedCredentialDataPrefix and kTestECPublicKeyCOSE. // Combine kTestAttestedCredentialDataPrefix and kTestECPublicKeyCOSE.
auto test_attested_data = auto test_attested_data =
...@@ -250,7 +256,7 @@ std::vector<uint8_t> GetTestCredentialRawIdBytes() { ...@@ -250,7 +256,7 @@ std::vector<uint8_t> GetTestCredentialRawIdBytes() {
// 20170927.html // 20170927.html
TEST(CTAPResponseTest, TestReadMakeCredentialResponse) { TEST(CTAPResponseTest, TestReadMakeCredentialResponse) {
auto make_credential_response = auto make_credential_response =
ReadCTAPMakeCredentialResponse(test_data::kDeviceMakeCredentialResponse); ReadCTAPMakeCredentialResponse(test_data::kTestMakeCredentialResponse);
ASSERT_TRUE(make_credential_response); ASSERT_TRUE(make_credential_response);
auto cbor_attestation_object = cbor::CBORReader::Read( auto cbor_attestation_object = cbor::CBORReader::Read(
make_credential_response->GetCBOREncodedAttestationObject()); make_credential_response->GetCBOREncodedAttestationObject());
...@@ -278,8 +284,8 @@ TEST(CTAPResponseTest, TestReadMakeCredentialResponse) { ...@@ -278,8 +284,8 @@ TEST(CTAPResponseTest, TestReadMakeCredentialResponse) {
auto attStmt_it = attestation_statement_map.find(cbor::CBORValue("alg")); auto attStmt_it = attestation_statement_map.find(cbor::CBORValue("alg"));
ASSERT_TRUE(attStmt_it != attestation_statement_map.end()); ASSERT_TRUE(attStmt_it != attestation_statement_map.end());
ASSERT_TRUE(attStmt_it->second.is_unsigned()); ASSERT_TRUE(attStmt_it->second.is_integer());
EXPECT_EQ(attStmt_it->second.GetUnsigned(), 7u); EXPECT_EQ(attStmt_it->second.GetInteger(), -7);
attStmt_it = attestation_statement_map.find(cbor::CBORValue("sig")); attStmt_it = attestation_statement_map.find(cbor::CBORValue("sig"));
ASSERT_TRUE(attStmt_it != attestation_statement_map.end()); ASSERT_TRUE(attStmt_it != attestation_statement_map.end());
...@@ -304,7 +310,7 @@ TEST(CTAPResponseTest, TestReadMakeCredentialResponse) { ...@@ -304,7 +310,7 @@ TEST(CTAPResponseTest, TestReadMakeCredentialResponse) {
TEST(CTAPResponseTest, TestMakeCredentialNoneAttestationResponse) { TEST(CTAPResponseTest, TestMakeCredentialNoneAttestationResponse) {
auto make_credential_response = auto make_credential_response =
ReadCTAPMakeCredentialResponse(test_data::kDeviceMakeCredentialResponse); ReadCTAPMakeCredentialResponse(test_data::kTestMakeCredentialResponse);
ASSERT_TRUE(make_credential_response); ASSERT_TRUE(make_credential_response);
make_credential_response->EraseAttestationStatement(); make_credential_response->EraseAttestationStatement();
EXPECT_THAT(make_credential_response->GetCBOREncodedAttestationObject(), EXPECT_THAT(make_credential_response->GetCBOREncodedAttestationObject(),
...@@ -506,9 +512,6 @@ TEST(CTAPResponseTest, TestReadGetInfoResponseWithIncorrectVersionFormat) { ...@@ -506,9 +512,6 @@ TEST(CTAPResponseTest, TestReadGetInfoResponseWithIncorrectVersionFormat) {
} }
TEST(CTAPResponseTest, TestSerializeGetInfoResponse) { TEST(CTAPResponseTest, TestSerializeGetInfoResponse) {
constexpr uint8_t kTestDeviceAaguid[] = {0xF8, 0xA0, 0x11, 0xF3, 0x8C, 0x0A,
0x4D, 0x15, 0x80, 0x06, 0x17, 0x11,
0x1F, 0x9E, 0xDC, 0x7D};
AuthenticatorGetInfoResponse response( AuthenticatorGetInfoResponse response(
{ProtocolVersion::kCtap, ProtocolVersion::kU2f}, {ProtocolVersion::kCtap, ProtocolVersion::kU2f},
fido_parsing_utils::Materialize(kTestDeviceAaguid)); fido_parsing_utils::Materialize(kTestDeviceAaguid));
...@@ -532,4 +535,55 @@ TEST(CTAPResponseTest, TestSerializeGetInfoResponse) { ...@@ -532,4 +535,55 @@ TEST(CTAPResponseTest, TestSerializeGetInfoResponse) {
.subspan(1))); .subspan(1)));
} }
TEST(CTAPResponseTest, TestSerializeMakeCredentialResponse) {
constexpr uint8_t kCoseEncodedPublicKey[] = {
0xa3, 0x63, 0x61, 0x6c, 0x67, 0x65, 0x45, 0x53, 0x32, 0x35, 0x36, 0x61,
0x78, 0x58, 0x20, 0xf7, 0xc4, 0xf4, 0xa6, 0xf1, 0xd7, 0x95, 0x38, 0xdf,
0xa4, 0xc9, 0xac, 0x50, 0x84, 0x8d, 0xf7, 0x08, 0xbc, 0x1c, 0x99, 0xf5,
0xe6, 0x0e, 0x51, 0xb4, 0x2a, 0x52, 0x1b, 0x35, 0xd3, 0xb6, 0x9a, 0x61,
0x79, 0x58, 0x20, 0xde, 0x7b, 0x7d, 0x6c, 0xa5, 0x64, 0xe7, 0x0e, 0xa3,
0x21, 0xa4, 0xd5, 0xd9, 0x6e, 0xa0, 0x0e, 0xf0, 0xe2, 0xdb, 0x89, 0xdd,
0x61, 0xd4, 0x89, 0x4c, 0x15, 0xac, 0x58, 0x5b, 0xd2, 0x36, 0x84,
};
const auto application_parameter =
base::make_span(test_data::kApplicationParameter)
.subspan<0, kRpIdHashLength>();
// Starting signature counter value set by example 4 of the CTAP spec. The
// signature counter can start at any value but it should never decrease.
// https://fidoalliance.org/specs/fido-v2.0-rd-20170927/fido-client-to-authenticator-protocol-v2.0-rd-20170927.html
std::array<uint8_t, kSignCounterLength> signature_counter = {
{0x00, 0x00, 0x00, 0x0b}};
auto flag =
base::strict_cast<uint8_t>(AuthenticatorData::Flag::kTestOfUserPresence) |
base::strict_cast<uint8_t>(AuthenticatorData::Flag::kAttestation);
AttestedCredentialData attested_credential_data(
kTestDeviceAaguid,
std::array<uint8_t, kCredentialIdLengthLength>{
{0x00, 0x10}} /* credential_id_length */,
fido_parsing_utils::Materialize(
test_data::kCtap2MakeCredentialCredentialId),
std::make_unique<OpaquePublicKey>(kCoseEncodedPublicKey));
AuthenticatorData authenticator_data(application_parameter, flag,
signature_counter,
std::move(attested_credential_data));
cbor::CBORValue::MapValue attestation_map;
attestation_map.emplace("alg", -7);
attestation_map.emplace("sig", fido_parsing_utils::Materialize(
test_data::kCtap2MakeCredentialSignature));
cbor::CBORValue::ArrayValue certificate_chain;
certificate_chain.emplace_back(fido_parsing_utils::Materialize(
test_data::kCtap2MakeCredentialCertificate));
attestation_map.emplace("x5c", std::move(certificate_chain));
AuthenticatorMakeCredentialResponse response(AttestationObject(
std::move(authenticator_data),
std::make_unique<OpaqueAttestationStatement>(
"packed", cbor::CBORValue(std::move(attestation_map)))));
EXPECT_THAT(
GetSerializedCtapDeviceResponse(response),
::testing::ElementsAreArray(
base::make_span(test_data::kTestMakeCredentialResponse).subspan(1)));
}
} // namespace device } // namespace device
...@@ -938,20 +938,33 @@ constexpr uint8_t kTestGetInfoResponseCrossPlatformDevice[] = { ...@@ -938,20 +938,33 @@ constexpr uint8_t kTestGetInfoResponseCrossPlatformDevice[] = {
// A Sample well formed response to CTAP MakeCredential request. // A Sample well formed response to CTAP MakeCredential request.
constexpr uint8_t kTestMakeCredentialResponse[] = { constexpr uint8_t kTestMakeCredentialResponse[] = {
0x00, 0xa3, 0x01, 0x66, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x02, 0x58, // Success status byte
0x9a, 0x11, 0x94, 0x22, 0x8d, 0xa8, 0xfd, 0xbd, 0xee, 0xfd, 0x26, 0x1b, 0x00,
0xd7, 0xb6, 0x59, 0x5c, 0xfd, 0x70, 0xa5, 0x0d, 0x70, 0xc6, 0x40, 0x7b, // Map(03)
0xcf, 0x01, 0x3d, 0xe9, 0x6d, 0x4e, 0xfb, 0x17, 0xde, 0x41, 0x00, 0x00, 0xa3,
0x00, 0x0b, 0xf8, 0xa0, 0x11, 0xf3, 0x8c, 0x0a, 0x4d, 0x15, 0x80, 0x06, // key(01) - Format
0x17, 0x11, 0x1f, 0x9e, 0xdc, 0x7d, 0x00, 0x10, 0x89, 0x59, 0xce, 0xad, 0x01,
0x5b, 0x5c, 0x48, 0x16, 0x4e, 0x8a, 0xbc, 0xd6, 0xd9, 0x43, 0x5c, 0x6f, // "packed"
0xa3, 0x63, 0x61, 0x6c, 0x67, 0x65, 0x45, 0x53, 0x32, 0x35, 0x36, 0x61, 0x66, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64,
0x78, 0x58, 0x20, 0xf7, 0xc4, 0xf4, 0xa6, 0xf1, 0xd7, 0x95, 0x38, 0xdf, // key(02) - Authenticator Data
0xa4, 0xc9, 0xac, 0x50, 0x84, 0x8d, 0xf7, 0x08, 0xbc, 0x1c, 0x99, 0xf5, 0x02,
0xe6, 0x0e, 0x51, 0xb4, 0x2a, 0x52, 0x1b, 0x35, 0xd3, 0xb6, 0x9a, 0x61, // Byte(154)
0x79, 0x58, 0x20, 0xde, 0x7b, 0x7d, 0x6c, 0xa5, 0x64, 0xe7, 0x0e, 0xa3, 0x58, 0x9a, 0x11, 0x94, 0x22, 0x8d, 0xa8, 0xfd, 0xbd, 0xee, 0xfd, 0x26,
0x21, 0xa4, 0xd5, 0xd9, 0x6e, 0xa0, 0x0e, 0xf0, 0xe2, 0xdb, 0x89, 0xdd, 0x1b, 0xd7, 0xb6, 0x59, 0x5c, 0xfd, 0x70, 0xa5, 0x0d, 0x70, 0xc6, 0x40,
0x61, 0xd4, 0x89, 0x4c, 0x15, 0xac, 0x58, 0x5b, 0xd2, 0x36, 0x84, 0x03, 0x7b, 0xcf, 0x01, 0x3d, 0xe9, 0x6d, 0x4e, 0xfb, 0x17, 0xde, 0x41, 0x00,
0x00, 0x00, 0x0b, 0xf8, 0xa0, 0x11, 0xf3, 0x8c, 0x0a, 0x4d, 0x15, 0x80,
0x06, 0x17, 0x11, 0x1f, 0x9e, 0xdc, 0x7d, 0x00, 0x10, 0x89, 0x59, 0xce,
0xad, 0x5b, 0x5c, 0x48, 0x16, 0x4e, 0x8a, 0xbc, 0xd6, 0xd9, 0x43, 0x5c,
0x6f, 0xa3, 0x63, 0x61, 0x6c, 0x67, 0x65, 0x45, 0x53, 0x32, 0x35, 0x36,
0x61, 0x78, 0x58, 0x20, 0xf7, 0xc4, 0xf4, 0xa6, 0xf1, 0xd7, 0x95, 0x38,
0xdf, 0xa4, 0xc9, 0xac, 0x50, 0x84, 0x8d, 0xf7, 0x08, 0xbc, 0x1c, 0x99,
0xf5, 0xe6, 0x0e, 0x51, 0xb4, 0x2a, 0x52, 0x1b, 0x35, 0xd3, 0xb6, 0x9a,
0x61, 0x79, 0x58, 0x20, 0xde, 0x7b, 0x7d, 0x6c, 0xa5, 0x64, 0xe7, 0x0e,
0xa3, 0x21, 0xa4, 0xd5, 0xd9, 0x6e, 0xa0, 0x0e, 0xf0, 0xe2, 0xdb, 0x89,
0xdd, 0x61, 0xd4, 0x89, 0x4c, 0x15, 0xac, 0x58, 0x5b, 0xd2, 0x36, 0x84,
// Key(03) - Attestation object
0x03,
// Map - Attestation object
0xa3, 0x63, 0x61, 0x6c, 0x67, 0x26, 0x63, 0x73, 0x69, 0x67, 0x58, 0x47, 0xa3, 0x63, 0x61, 0x6c, 0x67, 0x26, 0x63, 0x73, 0x69, 0x67, 0x58, 0x47,
0x30, 0x45, 0x02, 0x20, 0x13, 0xf7, 0x3c, 0x5d, 0x9d, 0x53, 0x0e, 0x8c, 0x30, 0x45, 0x02, 0x20, 0x13, 0xf7, 0x3c, 0x5d, 0x9d, 0x53, 0x0e, 0x8c,
0xc1, 0x5c, 0xc9, 0xbd, 0x96, 0xad, 0x58, 0x6d, 0x39, 0x36, 0x64, 0xe4, 0xc1, 0x5c, 0xc9, 0xbd, 0x96, 0xad, 0x58, 0x6d, 0x39, 0x36, 0x64, 0xe4,
...@@ -1152,9 +1165,9 @@ constexpr uint8_t kCtap2MakeCredentialCertificate[] = { ...@@ -1152,9 +1165,9 @@ constexpr uint8_t kCtap2MakeCredentialCertificate[] = {
0xc5, 0xd3, 0x43, 0xcb, 0x2f, 0x11, 0x3d, 0xa2, 0x37, 0x23, 0xf3}; 0xc5, 0xd3, 0x43, 0xcb, 0x2f, 0x11, 0x3d, 0xa2, 0x37, 0x23, 0xf3};
constexpr uint8_t kCtap2MakeCredentialAuthData[] = { constexpr uint8_t kCtap2MakeCredentialAuthData[] = {
0xc2, 0x89, 0xc5, 0xca, 0x9b, 0x04, 0x60, 0xf9, 0x34, 0x6a, 0xb4, 0xe4, 0x11, 0x94, 0x22, 0x8D, 0xA8, 0xFD, 0xBD, 0xEE, 0xFD, 0x26, 0x1B, 0xD7,
0x2d, 0x84, 0x27, 0x43, 0x40, 0x4d, 0x31, 0xf4, 0x84, 0x68, 0x25, 0xa6, 0xB6, 0x59, 0x5C, 0xFD, 0x70, 0xA5, 0x0D, 0x70, 0xC6, 0x40, 0x7B, 0xCF,
0xd0, 0x65, 0xbe, 0x59, 0x7a, 0x87, 0x05, 0x1d, 0x41, 0x00, 0x00, 0x00, 0x01, 0x3D, 0xE9, 0x6D, 0x4E, 0xFB, 0x17, 0xDE, 0x41, 0x00, 0x00, 0x00,
0x0b, 0xf8, 0xa0, 0x11, 0xf3, 0x8c, 0x0a, 0x4d, 0x15, 0x80, 0x06, 0x17, 0x0b, 0xf8, 0xa0, 0x11, 0xf3, 0x8c, 0x0a, 0x4d, 0x15, 0x80, 0x06, 0x17,
0x11, 0x1f, 0x9e, 0xdc, 0x7d, 0x00, 0x10, 0x89, 0x59, 0xce, 0xad, 0x5b, 0x11, 0x1f, 0x9e, 0xdc, 0x7d, 0x00, 0x10, 0x89, 0x59, 0xce, 0xad, 0x5b,
0x5c, 0x48, 0x16, 0x4e, 0x8a, 0xbc, 0xd6, 0xd9, 0x43, 0x5c, 0x6f, 0xa3, 0x5c, 0x48, 0x16, 0x4e, 0x8a, 0xbc, 0xd6, 0xd9, 0x43, 0x5c, 0x6f, 0xa3,
...@@ -1203,9 +1216,9 @@ constexpr uint8_t kNoneAttestationResponse[] = { ...@@ -1203,9 +1216,9 @@ constexpr uint8_t kNoneAttestationResponse[] = {
// bytes(154) // bytes(154)
0x58, 0x9a, 0x58, 0x9a,
// byte data // byte data
0xc2, 0x89, 0xc5, 0xca, 0x9b, 0x04, 0x60, 0xf9, 0x34, 0x6a, 0xb4, 0xe4, 0x11, 0x94, 0x22, 0x8D, 0xA8, 0xFD, 0xBD, 0xEE, 0xFD, 0x26, 0x1B, 0xD7,
0x2d, 0x84, 0x27, 0x43, 0x40, 0x4d, 0x31, 0xf4, 0x84, 0x68, 0x25, 0xa6, 0xB6, 0x59, 0x5C, 0xFD, 0x70, 0xA5, 0x0D, 0x70, 0xC6, 0x40, 0x7B, 0xCF,
0xd0, 0x65, 0xbe, 0x59, 0x7a, 0x87, 0x05, 0x1d, 0x41, 0x00, 0x00, 0x00, 0x01, 0x3D, 0xE9, 0x6D, 0x4E, 0xFB, 0x17, 0xDE, 0x41, 0x00, 0x00, 0x00,
0x0b, 0x0b,
// Replaced device AAGUID // Replaced device AAGUID
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
...@@ -1222,102 +1235,6 @@ constexpr uint8_t kNoneAttestationResponse[] = { ...@@ -1222,102 +1235,6 @@ constexpr uint8_t kNoneAttestationResponse[] = {
0x58, 0x5b, 0xd2, 0x36, 0x84, 0x58, 0x5b, 0xd2, 0x36, 0x84,
}; };
const uint8_t kDeviceMakeCredentialResponse[] = {
// Success response code
0x00,
// map(3)
0xa3,
// unsigned(1)
0x01,
// text(6)
0x66,
// "packed"
0x70, 0x61, 0x63, 0x6b, 0x65, 0x64,
// unsigned(2)
0x02,
// bytes(154)
0x58, 0x9a,
// auth data
0xc2, 0x89, 0xc5, 0xca, 0x9b, 0x04, 0x60, 0xf9, 0x34, 0x6a, 0xb4, 0xe4,
0x2d, 0x84, 0x27, 0x43, 0x40, 0x4d, 0x31, 0xf4, 0x84, 0x68, 0x25, 0xa6,
0xd0, 0x65, 0xbe, 0x59, 0x7a, 0x87, 0x05, 0x1d, 0x41, 0x00, 0x00, 0x00,
0x0b, 0xf8, 0xa0, 0x11, 0xf3, 0x8c, 0x0a, 0x4d, 0x15, 0x80, 0x06, 0x17,
0x11, 0x1f, 0x9e, 0xdc, 0x7d, 0x00, 0x10, 0x89, 0x59, 0xce, 0xad, 0x5b,
0x5c, 0x48, 0x16, 0x4e, 0x8a, 0xbc, 0xd6, 0xd9, 0x43, 0x5c, 0x6f, 0xa3,
0x63, 0x61, 0x6c, 0x67, 0x65, 0x45, 0x53, 0x32, 0x35, 0x36, 0x61, 0x78,
0x58, 0x20, 0xf7, 0xc4, 0xf4, 0xa6, 0xf1, 0xd7, 0x95, 0x38, 0xdf, 0xa4,
0xc9, 0xac, 0x50, 0x84, 0x8d, 0xf7, 0x08, 0xbc, 0x1c, 0x99, 0xf5, 0xe6,
0x0e, 0x51, 0xb4, 0x2a, 0x52, 0x1b, 0x35, 0xd3, 0xb6, 0x9a, 0x61, 0x79,
0x58, 0x20, 0xde, 0x7b, 0x7d, 0x6c, 0xa5, 0x64, 0xe7, 0x0e, 0xa3, 0x21,
0xa4, 0xd5, 0xd9, 0x6e, 0xa0, 0x0e, 0xf0, 0xe2, 0xdb, 0x89, 0xdd, 0x61,
0xd4, 0x89, 0x4c, 0x15, 0xac, 0x58, 0x5b, 0xd2, 0x36, 0x84,
// unsigned(3)
0x03,
// map(3)
0xa3,
// text(3)
0x63,
// "alg"
0x61, 0x6c, 0x67,
// 7
0x07,
// text(3)
0x63,
// "sig"
0x73, 0x69, 0x67,
// bytes(71)
0x58, 0x47,
// signature
0x30, 0x45, 0x02, 0x20, 0x13, 0xf7, 0x3c, 0x5d, 0x9d, 0x53, 0x0e, 0x8c,
0xc1, 0x5c, 0xc9, 0xbd, 0x96, 0xad, 0x58, 0x6d, 0x39, 0x36, 0x64, 0xe4,
0x62, 0xd5, 0xf0, 0x56, 0x12, 0x35, 0xe6, 0x35, 0x0f, 0x2b, 0x72, 0x89,
0x02, 0x21, 0x00, 0x90, 0x35, 0x7f, 0xf9, 0x10, 0xcc, 0xb5, 0x6a, 0xc5,
0xb5, 0x96, 0x51, 0x19, 0x48, 0x58, 0x1c, 0x8f, 0xdd, 0xb4, 0xa2, 0xb7,
0x99, 0x59, 0x94, 0x80, 0x78, 0xb0, 0x9f, 0x4b, 0xdc, 0x62, 0x29,
// text(3)
0x63,
// "x5c"
0x78, 0x35, 0x63,
// array(1)
0x81,
// bytes(407)
0x59, 0x01, 0x97,
// certificate
0x30, 0x82, 0x01, 0x93, 0x30, 0x82, 0x01, 0x38, 0xa0, 0x03, 0x02, 0x01,
0x02, 0x02, 0x09, 0x00, 0x85, 0x9b, 0x72, 0x6c, 0xb2, 0x4b, 0x4c, 0x29,
0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02,
0x30, 0x47, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13,
0x02, 0x55, 0x53, 0x31, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x04, 0x0a,
0x0c, 0x0b, 0x59, 0x75, 0x62, 0x69, 0x63, 0x6f, 0x20, 0x54, 0x65, 0x73,
0x74, 0x31, 0x22, 0x30, 0x20, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x19,
0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x6f,
0x72, 0x20, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x36, 0x31, 0x32, 0x30, 0x34, 0x31,
0x31, 0x35, 0x35, 0x30, 0x30, 0x5a, 0x17, 0x0d, 0x32, 0x36, 0x31, 0x32,
0x30, 0x32, 0x31, 0x31, 0x35, 0x35, 0x30, 0x30, 0x5a, 0x30, 0x47, 0x31,
0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53,
0x31, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x0c, 0x0b, 0x59,
0x75, 0x62, 0x69, 0x63, 0x6f, 0x20, 0x54, 0x65, 0x73, 0x74, 0x31, 0x22,
0x30, 0x20, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x0c, 0x19, 0x41, 0x75, 0x74,
0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x41,
0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x30, 0x59,
0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06,
0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00,
0x04, 0xad, 0x11, 0xeb, 0x0e, 0x88, 0x52, 0xe5, 0x3a, 0xd5, 0xdf, 0xed,
0x86, 0xb4, 0x1e, 0x61, 0x34, 0xa1, 0x8e, 0xc4, 0xe1, 0xaf, 0x8f, 0x22,
0x1a, 0x3c, 0x7d, 0x6e, 0x63, 0x6c, 0x80, 0xea, 0x13, 0xc3, 0xd5, 0x04,
0xff, 0x2e, 0x76, 0x21, 0x1b, 0xb4, 0x45, 0x25, 0xb1, 0x96, 0xc4, 0x4c,
0xb4, 0x84, 0x99, 0x79, 0xcf, 0x6f, 0x89, 0x6e, 0xcd, 0x2b, 0xb8, 0x60,
0xde, 0x1b, 0xf4, 0x37, 0x6b, 0xa3, 0x0d, 0x30, 0x0b, 0x30, 0x09, 0x06,
0x03, 0x55, 0x1d, 0x13, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0a, 0x06, 0x08,
0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x49, 0x00, 0x30,
0x46, 0x02, 0x21, 0x00, 0xe9, 0xa3, 0x9f, 0x1b, 0x03, 0x19, 0x75, 0x25,
0xf7, 0x37, 0x3e, 0x10, 0xce, 0x77, 0xe7, 0x80, 0x21, 0x73, 0x1b, 0x94,
0xd0, 0xc0, 0x3f, 0x3f, 0xda, 0x1f, 0xd2, 0x2d, 0xb3, 0xd0, 0x30, 0xe7,
0x02, 0x21, 0x00, 0xc4, 0xfa, 0xec, 0x34, 0x45, 0xa8, 0x20, 0xcf, 0x43,
0x12, 0x9c, 0xdb, 0x00, 0xaa, 0xbe, 0xfd, 0x9a, 0xe2, 0xd8, 0x74, 0xf9,
0xc5, 0xd3, 0x43, 0xcb, 0x2f, 0x11, 0x3d, 0xa2, 0x37, 0x23, 0xf3};
constexpr uint8_t kCtap2GetAssertionAuthData[] = { constexpr uint8_t kCtap2GetAssertionAuthData[] = {
0x62, 0x5d, 0xda, 0xdf, 0x74, 0x3f, 0x57, 0x27, 0xe6, 0x6b, 0x62, 0x5d, 0xda, 0xdf, 0x74, 0x3f, 0x57, 0x27, 0xe6, 0x6b,
0xba, 0x8c, 0x2e, 0x38, 0x79, 0x22, 0xd1, 0xaf, 0x43, 0xc5, 0xba, 0x8c, 0x2e, 0x38, 0x79, 0x22, 0xd1, 0xaf, 0x43, 0xc5,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment