Closed WillSmartYubico closed 5 months ago
Hi, @WillSmartYubico ! After verifying the behaviour in code (in another of our SDK's) and conferring with a colleague, we come to the same conclusion.
Thanks for bringing this to our attention. We'll have the docs updated, I can't tell you when exactly as we're sorting out some of our release processes, but as soon as possible. Thanks.
From reading the documentation, I had the idea that the 2nd byte in the data field was always 03 for generating new keys, but it looks like that's not the case.
I'm told it should be the the total number of bytes that come after it in the data field, including any bytes for indicating PIN or touch policy. (Effectively two less than Lc)
https://github.com/Yubico/Yubico.NET.SDK/blob/82a32efd7708ac771625ea922fc621e36e184a17/Yubico.YubiKey/docs/users-manual/application-piv/apdu/generate-pair.md?plain=1#L22
https://github.com/Yubico/Yubico.NET.SDK/blob/82a32efd7708ac771625ea922fc621e36e184a17/Yubico.YubiKey/docs/users-manual/application-piv/apdu/generate-pair.md?plain=1#L50 should read