FCP Data Structures and Algorithms 3 — Questions and Answers
Question 1: FIDO2 credential public keys are encoded using the COSE_Key structure. Which map key integer represents the key type (kty) parameter?
- 1 (Correct answer)
- -1
- 3
- 2
Correct answer: 1
In COSE_Key (RFC 8152), integer key 1 maps to the 'kty' (key type) parameter identifying whether the key is EC2, RSA, OKP, etc.
Question 2: Which graph traversal algorithm is conceptually used when a FIDO2 client validates an attestation certificate chain up to a trusted root CA?
- Breadth-first search from leaf to root (Correct answer)
- Depth-first search from root to leaf
- Dijkstra's shortest path
- Topological sort of the certificate DAG
Correct answer: Breadth-first search from leaf to root
Certificate chain validation traverses from the leaf (attestation certificate) upward via BFS-like hops to a trusted root, verifying each issuer-subject link.
Question 3: In FIDO metadata (MDS3), authenticator metadata entries are aggregated in a JWT whose payload contains a list. What is the algorithmic advantage of sorting this list by AAGUID?
- Enables O(log n) binary search for a specific authenticator entry (Correct answer)
- Reduces JWT signature size
- Allows parallel verification using divide and conquer
- Ensures CBOR encoding is shorter
Correct answer: Enables O(log n) binary search for a specific authenticator entry
A sorted list of entries allows O(log n) binary search when a relying party needs to look up metadata for a specific AAGUID.
Question 4: What data structure does a FIDO2 relying party maintain to prevent credential replay by tracking which assertion challenge nonces have been consumed?
- Bloom filter or set of used challenge values with TTL (Correct answer)
- Unlimited append-only log
- Min-heap of pending challenges
- Circular buffer of size 1
Correct answer: Bloom filter or set of used challenge values with TTL
Relying parties use a set (often with TTL expiry) or Bloom filter to record consumed challenges and reject any replayed assertion that reuses a nonce.
Question 5: The HMAC-Secret extension in FIDO2 uses HMAC with which underlying hash to derive secrets from a salt and the authenticator's device-bound key?
- MD5
- SHA-1
- SHA-256 (Correct answer)
- SHA-3-512
Correct answer: SHA-256
The HMAC-Secret extension specifies HMAC-SHA-256 to derive output secrets from the provided salts and the per-credential HMAC secret key.
Question 6: When a FIDO2 authenticator packs multiple extensions into the authenticatorData extensions map, which data format governs the encoding of that map?
- JSON object
- CBOR map (Correct answer)
- ASN.1 DER sequence
- TLV (Type-Length-Value) byte array
Correct answer: CBOR map
Extensions in authenticatorData are encoded as a CBOR map, consistent with CTAP2's use of CBOR throughout its data structures.
Question 7: What is the purpose of the 'credProtect' extension value stored as an integer in the credential's CBOR map during FIDO2 registration?
- It specifies the minimum PIN length required to use the credential
- It sets the credential protection policy level controlling when UV is required (Correct answer)
- It encodes the maximum allowed counter value
- It stores the attestation certificate serial number
Correct answer: It sets the credential protection policy level controlling when UV is required
The credProtect extension integer (1, 2, or 3) defines the credential protection level, determining when user verification is mandatory for the credential.
FIDO2 credential public keys are encoded using the COSE_Key structure.
Which map key integer represents the key type (kty) parameter?