KeyVersionNumber Property
KeyVersionNumber
The number that identifies the key set. Unless specified by the caller, this class will assume the Key Version Number is 1, or else 255 if the default keys are used.
public byte KeyVersionNumber { get; set; }
Property Value
Type | Description |
---|---|
System.Byte |
Remarks
When the SDK makes an SCP03 Connection
with a YubiKey, it will
specify the Key Version Number. In that way, the YubiKey will know
which keys to use to complete the handshake.
A YubiKey can store up to three sets of SCP03 keys. You can think of it as if the YubiKey contains three slots (1, 2, and 3) for SCP03 keys. Each set (slot) is specified by a number, which the standard calls the Key Version Number. On a YubiKey, the only numbers allowed to be a Key Version Number are 255, 1, 2, and 3.
Most YubiKeys are manufactured with a default set of SCP03 keys in slot 1. Slots 2 and 3 are empty. The initial, default set of keys in slot 1 is given the Key Version Number 255. If you replace those keys, the replacement must be specified as number 1. If you want to add key sets to the other two slots, you must use the numbers 2 and 3. Note that you cannot set the two empty slots until the initial, default keys are replaced.
If the Key Version Number to use is not the value this class uses by default, then set this value after constructing the object.