FIDO2 CTAP CBOR helper.  
More...
FIDO2 CTAP CBOR helper. 
 | 
| file   | ctap_cbor.h | 
|   | CTAP CBOR helper function declarations. 
  | 
|   | 
 | 
| ctap_status_code_t  | fido2_ctap_cbor_parse_make_credential_req (ctap_make_credential_req_t *req, const uint8_t *req_raw, size_t len) | 
|   | Parse MakeCredential method.  More...
  | 
|   | 
| ctap_status_code_t  | fido2_ctap_cbor_parse_get_assertion_req (ctap_get_assertion_req_t *req, const uint8_t *req_raw, size_t len) | 
|   | Parse GetAssertion method.  More...
  | 
|   | 
| ctap_status_code_t  | fido2_ctap_cbor_encode_info (const ctap_info_t *info) | 
|   | Encode CBOR info map.  More...
  | 
|   | 
| ctap_status_code_t  | fido2_ctap_cbor_parse_client_pin_req (ctap_client_pin_req_t *req, const uint8_t *req_raw, size_t len) | 
|   | Parse ClientPIN method.  More...
  | 
|   | 
| ctap_status_code_t  | fido2_ctap_cbor_encode_attestation_object (const ctap_auth_data_t *auth_data, const uint8_t *client_data_hash, ctap_resident_key_t *rk) | 
|   | Encode attestation object.  More...
  | 
|   | 
| ctap_status_code_t  | fido2_ctap_cbor_encode_assertion_object (const ctap_auth_data_header_t *auth_data, const uint8_t *client_data_hash, ctap_resident_key_t *rk, uint8_t valid_cred_count) | 
|   | Encode assertion object.  More...
  | 
|   | 
| ctap_status_code_t  | fido2_ctap_cbor_encode_key_agreement (const ctap_public_key_cose_t *key) | 
|   | Encode key agreement.  More...
  | 
|   | 
| ctap_status_code_t  | fido2_ctap_cbor_encode_pin_token (uint8_t *token, size_t len) | 
|   | Encode encrypted pin token.  More...
  | 
|   | 
| ctap_status_code_t  | fido2_ctap_cbor_encode_retries (uint8_t tries_left) | 
|   | Encode PIN tries left.  More...
  | 
|   | 
| size_t  | fido2_ctap_cbor_get_buffer_size (const uint8_t *buf) | 
|   | Get size of CBOR encoded data.  More...
  | 
|   | 
| void  | fido2_ctap_cbor_init_encoder (uint8_t *buf, size_t len) | 
|   | Initialize CBOR encoder.  More...
  | 
|   | 
◆ fido2_ctap_cbor_encode_assertion_object()
Encode assertion object. 
CTAP specification (version 20190130) section 5.2
- Parameters
 - 
  
    | [in] | auth_data | authenticator data header  | 
    | [in] | client_data_hash | SHA-256 hash of JSON serialized client data  | 
    | [in] | rk | resident key  | 
    | [in] | valid_cred_count | amount of valid credentials found in allow list | 
  
   
- Returns
 - ctap_status_code_t 
 
 
 
◆ fido2_ctap_cbor_encode_attestation_object()
Encode attestation object. 
Webauthn specification (version 20190304) section 6.5
- Parameters
 - 
  
    | [in] | auth_data | authenticator data  | 
    | [in] | client_data_hash | SHA-256 hash of JSON serialized client data  | 
    | [in] | rk | resident key | 
  
   
- Returns
 - ctap_status_code_t 
 
 
 
◆ fido2_ctap_cbor_encode_info()
Encode CBOR info map. 
CTAP specification (version 20190130) section 5.4
- Parameters
 - 
  
    | [in] | info | information about capabilities | 
  
   
- Returns
 - ctap_status_code_t 
 
 
 
◆ fido2_ctap_cbor_encode_key_agreement()
Encode key agreement. 
- Parameters
 - 
  
    | [in] | key | Public key in COSE format | 
  
   
- Returns
 - ctap_status_code_t 
 
 
 
◆ fido2_ctap_cbor_encode_pin_token()
Encode encrypted pin token. 
- Parameters
 - 
  
    | [in] | token | encrypted pin token  | 
    | [in] | len | length of token  | 
  
   
- Returns
 - ctap_status_code_t 
 
 
 
◆ fido2_ctap_cbor_encode_retries()
Encode PIN tries left. 
- Parameters
 - 
  
    | [in] | tries_left | amount of tries left | 
  
   
- Returns
 - ctap_status_code_t 
 
 
 
◆ fido2_ctap_cbor_get_buffer_size()
      
        
          | size_t fido2_ctap_cbor_get_buffer_size  | 
          ( | 
          const uint8_t *  | 
          buf | ) | 
           | 
        
      
 
Get size of CBOR encoded data. 
- Parameters
 - 
  
    | [in] | buf | Buffer holding the data | 
  
   
- Returns
 - size of CBOR encoded data 
 
 
 
◆ fido2_ctap_cbor_init_encoder()
      
        
          | void fido2_ctap_cbor_init_encoder  | 
          ( | 
          uint8_t *  | 
          buf,  | 
        
        
           | 
           | 
          size_t  | 
          len  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Initialize CBOR encoder. 
- Parameters
 - 
  
    | [in] | buf | Buffer to hold CBOR encoded data  | 
    | [in] | len | Length of buf  | 
  
   
 
 
◆ fido2_ctap_cbor_parse_client_pin_req()
Parse ClientPIN method. 
CTAP specification (version 20190130) section 5.5
- Parameters
 - 
  
    | [in] | req | struct to parse into  | 
    | [in] | req_raw | raw request  | 
    | [in] | len | length of req_raw  | 
  
   
- Returns
 - ctap_status_code_t 
 
 
 
◆ fido2_ctap_cbor_parse_get_assertion_req()
Parse GetAssertion method. 
CTAP specification (version 20190130) section 5.2
- Parameters
 - 
  
    | [in] | req | struct to parse into  | 
    | [in] | req_raw | raw request  | 
    | [in] | len | length of req_raw  | 
  
   
- Returns
 - ctap_status_code_t 
 
 
 
◆ fido2_ctap_cbor_parse_make_credential_req()
Parse MakeCredential method. 
CTAP specification (version 20190130) section 5.1
- Parameters
 - 
  
    | [in] | req | struct to parse into  | 
    | [in] | req_raw | raw request  | 
    | [in] | len | length of req_raw  | 
  
   
- Returns
 - ctap_status_code_t