Hi, I'm reading different structures on how to construct my signature for verification with PassKeys.
I have my key with:
publicKeyU2F = b"".join([
(0x04).to_bytes(1, byteorder='big'),
key_from_dict.x,
key_from_dict.y
])
but when it comes to building the data to verify, I can see two choices...what's the correct format
https://medium.com/webauthnworks/verifying-fido2-responses-4691288c8770
signature_base = b"".join(
[
authenticator_data_bytes,
client_data_hash_bytes,
]
)
signature_base_hash = hashlib.sha256()
signature_base_hash.update(signature_base)
signature_base_hash_bytes = signature_base_hash.digest()
or https://www.w3.org/TR/webauthn-2/#sctn-fido-u2f-attestation
signature_base = b"".join([
(0x00).to_bytes(1, byteorder='big'),
rpidhash,
client_data_hash_bytes,
credentialId,
publicKeyU2F
])
signature_base_hash = hashlib.sha256()
signature_base_hash.update(signature_base)
signature_base_hash_bytes = signature_base_hash.digest()