RE: why is "Public key algorithm and encoding" 2 bytes long?

This was inherited from FIDO I believe. It was in the initial submission of attestation formats. Rolf?

-----Original Message-----
From: Hodges, Jeff [mailto:jeff.hodges@paypal.com] 
Sent: Tuesday, October 25, 2016 3:18 PM
To: W3C WebAuthn WG <public-webauthn@w3.org>
Subject: why is "Public key algorithm and encoding" 2 bytes long?

in S 5.3.3 "Generating an Attestation Statement"
{#generating-an-attestation-statement}, the "Public key algorithm and encoding" is described as..

  Public key algorithm and encoding (16-bit big-endian value). Allowed values
  are: 

         
          
    1. 0x0100. This is raw ... Elliptic Curve public key [SEC1] ...

          
    2. 0x0102.  Raw encoded RSA ... public key [RFC3447] ...
           

questions:

1. Why do we need to use two bytes here?

2. Were there any particular reasons the values of 0x0100 and 0x0102 were picked? 

3. This "Public key algorithm and encoding" does not seem to be used as a set of bit flags ... is there any reason we cannot use a single byte here, which would ostensibly have enough distinct values to represent whatever different PK key types and encodings evolve in the future?

thanks,

=JeffH

Received on Wednesday, 26 October 2016 17:57:39 UTC