diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..ea99a43 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +# SPDX-FileCopyrightText: 2023 Steffen Vogel +# SPDX-License-Identifier: Apache-2.0 + +mockdata/** linguist-generated diff --git a/algorithm.go b/algorithm.go index 2e38684..671a47f 100644 --- a/algorithm.go +++ b/algorithm.go @@ -1,15 +1,10 @@ // SPDX-FileCopyrightText: 2020 Google LLC +// SPDX-FileCopyrightText: 2023-2024 Steffen Vogel // SPDX-License-Identifier: Apache-2.0 package piv -type algorithmType byte - -const ( - AlgTypeRSA algorithmType = iota + 1 - AlgTypeECCP - AlgTypeEd25519 -) +import "fmt" // Algorithm represents a specific algorithm and bit size supported by the PIV // specification. @@ -18,48 +13,117 @@ type Algorithm byte // Algorithms supported by this package. Note that not all cards will support // every algorithm. // -// AlgorithmEd25519 is currently only implemented by SoloKeys. -// -// For algorithm discovery, see: https://github.com/ericchiang/piv-go/issues/1 +// For algorithm discovery, see: https://github.com/go-piv/piv-go/issues/1 const ( - Alg3DES Algorithm = 0x03 - AlgRSA1024 Algorithm = 0x06 - AlgRSA2048 Algorithm = 0x07 - AlgECCP256 Algorithm = 0x11 - AlgECCP384 Algorithm = 0x14 - - // Non-standard; as implemented by SoloKeys. Chosen for low probability of eventual - // clashes, if and when PIV standard adds Ed25519 support - AlgEd25519 Algorithm = 0x22 + // NIST SP 800-78-4 + // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=21 + AlgRSA2048 Algorithm = 0x07 // RSA 2048 bit modulus, 65537 ≤ exponent ≤ 2256 - 1 + AlgECCP256 Algorithm = 0x11 // ECC: Curve P-256 + AlgECCP384 Algorithm = 0x14 // ECC: Curve P-384 + + // NIST SP 800-78-5 ipd (Initial Public Draft) + // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-78-5.ipd.pdf#page=12 + Alg3DESSalt Algorithm = 0x00 // 3 Key Triple DES – ECB (deprecated) + Alg3DES Algorithm = 0x03 // 3 Key Triple DES – ECB (deprecated) + AlgRSA3072 Algorithm = 0x05 // RSA 3072 bit modulus, 65537 ≤ exponent ≤ 2256 - 1 + AlgRSA1024 Algorithm = 0x06 // RSA 1024 bit modulus, 65537 ≤ exponent ≤ 2256 - 1 + AlgAES128 Algorithm = 0x08 // AES-128 – ECB + AlgAES192 Algorithm = 0x0A // AES-192 – ECB + AlgAES256 Algorithm = 0x0C // AES-256 – ECB + AlgCS2 Algorithm = 0x27 // Cipher Suite 2 + AlgCS7 Algorithm = 0x2E // Cipher Suite 7 + + // Non-standard extensions + AlgPIN Algorithm = 0xFF + + // YubiKey 5.7 Firmware Specifics - PIV Enhancements - Additional Key Types Supported + // + // https://docs.yubico.com/hardware/yubikey/yk-tech-manual/5.7-firmware-specifics.html#additional-key-types-supported + AlgRSA4096 Algorithm = 0x16 + + AlgEd25519 Algorithm = 0xE0 // YubiKey + AlgX25519 Algorithm = 0xE1 // YubiKey + + // Trussed PIV authenticator (NitroKey / SoloKeys) + // + // https://github.com/Nitrokey/piv-authenticator/blob/efb4632b3f498af6732fc716354af746f3960038/tests/command_response.rs#L58-L72 + + // AlgECCP521 Algorithm = 0x15 + // AlgRSA3072 Algorithm = 0xE0 + // AlgRSA4096 Algorithm = 0xE1 + // AlgEd25519 Algorithm = 0xE2 + // AlgX25519 Algorithm = 0xE3 + // AlgEd448 Algorithm = 0xE4 + // AlgX448 Algorithm = 0xE5 + + // Internal algorithms for testing + algRSA512 Algorithm = 0xF0 + algECCP224 Algorithm = 0xF1 + algECCP521 Algorithm = 0xF2 ) -func (a Algorithm) algType() algorithmType { +func (a Algorithm) String() string { switch a { - case AlgRSA1024, AlgRSA2048: - return AlgTypeRSA + case AlgRSA1024, AlgRSA2048, AlgRSA3072, AlgRSA4096, algRSA512: + return fmt.Sprintf("RSA-%d", a.bits()) + + case AlgECCP256, AlgECCP384, algECCP224, algECCP521: + return fmt.Sprintf("P-%d", a.bits()) + + case Alg3DESSalt: + return "3DESSalt" + case Alg3DES: + return "3DES" + + case AlgAES128, AlgAES192, AlgAES256: + return fmt.Sprintf("AES-%d", a.bits()) - case AlgECCP256, AlgECCP384: - return AlgTypeECCP + case AlgCS2: + return "CS2" + case AlgCS7: + return "CS7" + + case AlgPIN: + return "PIN" case AlgEd25519: - return AlgTypeEd25519 + return "Ed25519" + case AlgX25519: + return "X25519" default: - return 0 + return "" } } func (a Algorithm) bits() int { switch a { + case algRSA512: + return 512 case AlgRSA1024: return 1024 case AlgRSA2048: return 2048 + case AlgRSA3072: + return 3072 + case AlgRSA4096: + return 4096 + case algECCP224: + return 224 case AlgECCP256: return 256 case AlgECCP384: return 384 + case algECCP521: + return 521 + + case AlgAES128: + return 128 + case AlgAES192: + return 192 + case AlgAES256: + return 256 default: return 0 diff --git a/attestation.go b/attestation.go index 7ba0056..7acd8c4 100644 --- a/attestation.go +++ b/attestation.go @@ -14,12 +14,14 @@ import ( ) // Prefix in the x509 Subject Common Name for YubiKey attestations +// // https://developers.yubico.com/PIV/Introduction/PIV_attestation.html const yubikeySubjectCNPrefix = "YubiKey PIV Attestation " // Attestation returns additional information about a key attested to be generated -// on a card. See https://developers.yubico.com/PIV/Introduction/PIV_attestation.html -// for more information. +// on a card. +// +// https://developers.yubico.com/PIV/Introduction/PIV_attestation.html type Attestation struct { // Version of the YubiKey's firmware. Version iso.Version @@ -176,6 +178,7 @@ func (c *Card) AttestationCertificate() (*x509.Certificate, error) { // YubiKey. // // This method is only supported for YubiKey versions >= 4.3.0. +// // https://developers.yubico.com/PIV/Introduction/PIV_attestation.html // // Certificates returned by this method MUST NOT be used for anything other than diff --git a/attestation_test.go b/attestation_test.go index 3a9cded..21e2aad 100644 --- a/attestation_test.go +++ b/attestation_test.go @@ -33,7 +33,7 @@ func TestAttestation(t *testing.T) { serial, err := c.Serial() assert.NoError(t, err, "Failed to get serial number") assert.Equal(t, serial, a.Serial, "Mismatching attestation serial got=%d, wanted=%d", a.Serial, serial) - assert.Equal(t, key.PINPolicy, a.PINPolicy, "Mismatching attestation pin policy got=0x%x, wanted=0x%x", a.TouchPolicy, key.PINPolicy) + assert.Equal(t, key.PINPolicy, a.PINPolicy, "Mismatching attestation PIN policy got=0x%x, wanted=0x%x", a.TouchPolicy, key.PINPolicy) assert.Equal(t, key.TouchPolicy, a.TouchPolicy, "Mismatching attestation touch policy got=0x%x, wanted=0x%x", a.TouchPolicy, key.TouchPolicy) assert.Equal(t, c.Version(), a.Version, "Mismatching attestation version got=%#v, wanted=%#v", a.Version, c.Version()) assert.Equal(t, SlotAuthentication, a.Slot, "Mismatching attested slot got=%v, wanted=%v", a.Slot, SlotAuthentication) diff --git a/auth.go b/auth.go index fcc928f..7d520d0 100644 --- a/auth.go +++ b/auth.go @@ -1,10 +1,12 @@ -// SPDX-FileCopyrightText: 2023 Steffen Vogel +// SPDX-FileCopyrightText: 2023-2024 Steffen Vogel // SPDX-License-Identifier: Apache-2.0 package piv import ( "bytes" + "crypto/aes" + "crypto/cipher" "crypto/des" //nolint:gosec "errors" "fmt" @@ -21,12 +23,17 @@ var errFailedToGenerateKey = errors.New("failed to generate random key") // certificates to slots. // // Use DefaultManagementKey if the management key hasn't been set. +// +// https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=92 +// https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=918402#page=114 func (c *Card) authenticate(key ManagementKey) error { - // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=92 - // https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=918402#page=114 + meta, err := c.Metadata(SlotCardManagement) + if err != nil { + return fmt.Errorf("failed to get management key metadata: %w", err) + } // Request a witness - resp, err := sendTLV(c.tx, iso.InsGeneralAuthenticate, byte(Alg3DES), keyCardManagement, + resp, err := sendTLV(c.tx, iso.InsGeneralAuthenticate, byte(meta.Algorithm), keyCardManagement, tlv.New(0x7c, tlv.New(0x80), ), @@ -35,30 +42,41 @@ func (c *Card) authenticate(key ManagementKey) error { return fmt.Errorf("failed to execute command: %w", err) } + var block cipher.Block + + switch meta.Algorithm { + case Alg3DES: + block, err = des.NewTripleDESCipher(key[:]) //nolint:gosec + + case AlgAES128, AlgAES192, AlgAES256: + block, err = aes.NewCipher(key[:]) + + default: + return errUnsupportedKeyType + } + if err != nil { + return fmt.Errorf("failed to create block cipher: %w", err) + } + cardChallenge, _, ok := resp.GetChild(0x7c, 0x80) if !ok { return errUnmarshal - } else if len(cardChallenge) != 8 { - return errUnexpectedLength - } - - block, err := des.NewTripleDESCipher(key[:]) //nolint:gosec - if err != nil { - return fmt.Errorf("failed to create triple des block cipher: %w", err) + } else if len(cardChallenge) != block.BlockSize() { + return fmt.Errorf("%w: %d", errUnexpectedLength, len(cardChallenge)) } - cardResponse := make([]byte, 8) + cardResponse := make([]byte, block.BlockSize()) block.Decrypt(cardResponse, cardChallenge) - challenge := make([]byte, 8) + challenge := make([]byte, block.BlockSize()) if _, err := io.ReadFull(c.Rand, challenge); err != nil { return fmt.Errorf("failed to read random data: %w", err) } - response := make([]byte, 8) + response := make([]byte, block.BlockSize()) block.Encrypt(response, challenge) - if resp, err = sendTLV(c.tx, iso.InsGeneralAuthenticate, byte(Alg3DES), keyCardManagement, + if resp, err = sendTLV(c.tx, iso.InsGeneralAuthenticate, byte(meta.Algorithm), keyCardManagement, tlv.New(0x7c, tlv.New(0x80, cardResponse), tlv.New(0x81, challenge), @@ -69,7 +87,7 @@ func (c *Card) authenticate(key ManagementKey) error { if cardResponse, _, ok = resp.GetChild(0x7c, 0x82); !ok { return errUnmarshal - } else if len(cardResponse) != 8 { + } else if len(cardResponse) != block.BlockSize() { return errUnexpectedLength } else if !bytes.Equal(cardResponse, response) { return errChallengeFailed @@ -79,6 +97,7 @@ func (c *Card) authenticate(key ManagementKey) error { } // authenticateWithPIN uses a PIN protected management key to authenticate +// // https://docs.yubico.com/yesdk/users-manual/application-piv/pin-only.html // https://docs.yubico.com/yesdk/users-manual/application-piv/piv-objects.html#pinprotecteddata // @@ -108,19 +127,18 @@ func (c *Card) authenticateWithPIN(pin string) error { // if err := c.SetManagementKey(piv.DefaultManagementKey, newKey); err != nil { // // ... // } -func (c *Card) SetManagementKey(oldKey, newKey ManagementKey) error { +func (c *Card) SetManagementKey(oldKey, newKey ManagementKey, requireTouch bool, alg Algorithm) error { if err := c.authenticate(oldKey); err != nil { return fmt.Errorf("failed to authenticate with old key: %w", err) } p2 := byte(0xff) - touch := false // TODO - if touch { + if requireTouch { p2 = 0xfe } if _, err := send(c.tx, insSetManagementKey, 0xff, p2, append([]byte{ - byte(Alg3DES), keyCardManagement, 24, + byte(alg), keyCardManagement, 24, }, newKey[:]...)); err != nil { return fmt.Errorf("failed to execute command: %w", err) } @@ -130,7 +148,7 @@ func (c *Card) SetManagementKey(oldKey, newKey ManagementKey) error { // https://docs.yubico.com/yesdk/users-manual/application-piv/pin-only.html // https://docs.yubico.com/yesdk/users-manual/application-piv/piv-objects.html#pinprotecteddata -func (c *Card) SetManagementKeyPinProtected(oldKey ManagementKey, pin string) error { +func (c *Card) SetManagementKeyPinProtected(oldKey ManagementKey, pin string, requireTouch bool, alg Algorithm) error { var newKey ManagementKey if n, err := c.Rand.Read(newKey[:]); err != nil { @@ -152,7 +170,7 @@ func (c *Card) SetManagementKeyPinProtected(oldKey ManagementKey, pin string) er return err } - return c.SetManagementKey(oldKey, newKey) + return c.SetManagementKey(oldKey, newKey, requireTouch, alg) } // SetPIN updates the PIN to a new value. For compatibility, PINs should be 1-8 @@ -251,6 +269,10 @@ func encodePIN(pin string) ([]byte, error) { } // Apply padding + // + // 2.4 Security Architecture + // 2.4.3 Authentication of an Individual + // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=88 for i := len(data); i < 8; i++ { data = append(data, 0xff) } @@ -278,7 +300,11 @@ func login(tx *iso.Transaction, pin string) error { return err } + // 3.2 PIV Card Application Card Commands for Authentication + // 3.2.1 VERIFY Card Command + // // https://csrc.nist.gov/CSRC/media/Publications/sp/800-73/4/archive/2015-05-29/documents/sp800_73-4_pt2_draft.pdf#page=20 + // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=86 if _, err = send(tx, iso.InsVerify, 0, 0x80, data); err != nil { return fmt.Errorf("failed to execute command: %w", err) } @@ -295,7 +321,7 @@ func loginNeeded(tx *iso.Transaction) bool { func (c *Card) Retries() (int, error) { _, err := send(c.tx, iso.InsVerify, 0, 0x80, nil) if err == nil { - return 0, fmt.Errorf("%w from empty pin", errExpectedError) + return 0, fmt.Errorf("%w from empty PIN", errExpectedError) } var aErr AuthError @@ -305,3 +331,23 @@ func (c *Card) Retries() (int, error) { return 0, fmt.Errorf("invalid response: %w", err) } + +// SetRetries sets the number of attempts for PIN and PUK. +// +// Both PIN and PUK will be reset to default values when this is executed. +// Requires authentication with management key and PIN verification. +func (c *Card) SetRetries(key ManagementKey, pin string, pinAttempts, pukAttempts int) error { + if err := login(c.tx, pin); err != nil { + return fmt.Errorf("PIN verification failed: %w", err) + } + + if err := c.authenticate(key); err != nil { + return fmt.Errorf("failed to authenticate with management key: %w", err) + } + + if _, err := send(c.tx, insSetPINRetries, byte(pinAttempts), byte(pukAttempts), nil); err != nil { + return fmt.Errorf("failed to execute command: %w", err) + } + + return nil +} diff --git a/auth_test.go b/auth_test.go index 017365b..328bc62 100644 --- a/auth_test.go +++ b/auth_test.go @@ -52,20 +52,24 @@ func TestAuthenticate(t *testing.T) { } func TestSetManagementKey(t *testing.T) { - withCard(t, false, false, nil, func(t *testing.T, c *Card) { - var mgmtKey ManagementKey - _, err := io.ReadFull(c.Rand, mgmtKey[:]) - require.NoError(t, err, "Failed to generate management key") - - err = c.SetManagementKey(DefaultManagementKey, mgmtKey) - require.NoError(t, err, "Failed to set management key") - - err = c.authenticate(mgmtKey) - assert.NoError(t, err, "Failed to authenticate with new management key") - - err = c.SetManagementKey(mgmtKey, DefaultManagementKey) - require.NoError(t, err, "Failed to reset management key") - }) + for _, alg := range []Algorithm{Alg3DES, AlgAES128, AlgAES192, AlgAES256} { + t.Run(alg.String(), func(t *testing.T) { + withCard(t, false, false, nil, func(t *testing.T, c *Card) { + var mgmtKey ManagementKey + _, err := io.ReadFull(c.Rand, mgmtKey[:]) + require.NoError(t, err, "Failed to generate management key") + + err = c.SetManagementKey(DefaultManagementKey, mgmtKey, false, alg) + require.NoError(t, err, "Failed to set management key") + + err = c.authenticate(mgmtKey) + assert.NoError(t, err, "Failed to authenticate with new management key") + + err = c.SetManagementKey(mgmtKey, DefaultManagementKey, false, alg) + require.NoError(t, err, "Failed to reset management key") + }) + }) + } } func TestUnblockPIN(t *testing.T) { @@ -73,10 +77,10 @@ func TestUnblockPIN(t *testing.T) { badPIN := "0" for { err := login(c.tx, badPIN) - require.Error(t, err, "Login with bad pin succeeded") + require.Error(t, err, "Login with bad PIN succeeded") var e AuthError - require.ErrorAs(t, err, &e, "Error returned was not a wrong pin error") + require.ErrorAs(t, err, &e, "Error returned was not a wrong PIN error") if e.Retries == 0 { break @@ -87,7 +91,7 @@ func TestUnblockPIN(t *testing.T) { require.NoError(t, err, "Failed to unblock PIN") err = login(c.tx, DefaultPIN) - assert.NoError(t, err, "Failed to login with pin after unblock") + assert.NoError(t, err, "Failed to login with PIN after unblock") }) } @@ -96,7 +100,7 @@ func TestChangePIN(t *testing.T) { newPIN := "654321" err := c.SetPIN(newPIN, newPIN) - assert.Error(t, err, "Successfully changed pin with invalid pin, expected error") + assert.Error(t, err, "Successfully changed PIN with invalid PIN, expected error") err = c.SetPIN(DefaultPIN, newPIN) require.NoError(t, err, "Failed to change PIN") @@ -134,13 +138,74 @@ func TestChangeManagementKey(t *testing.T) { } } - err = c.SetManagementKey(newKey, newKey) + err = c.SetManagementKey(newKey, newKey, false, Alg3DES) assert.Error(t, err, "Successfully changed management key with invalid key, expected error") - err = c.SetManagementKey(DefaultManagementKey, newKey) + err = c.SetManagementKey(DefaultManagementKey, newKey, false, Alg3DES) require.NoError(t, err, "Failed to change management key") - err = c.SetManagementKey(newKey, DefaultManagementKey) + err = c.SetManagementKey(newKey, DefaultManagementKey, false, Alg3DES) require.NoError(t, err, "Failed to reset management key") }) } + +func TestSetRetries(t *testing.T) { + withCard(t, true, false, nil, func(t *testing.T, c *Card) { + // Check default attempt counters + for _, key := range []byte{keyPIN, keyPUK} { + meta, err := c.Metadata(Slot{Key: key}) + require.NoError(t, err) + require.Equal(t, 3, meta.RetriesRemaining) + require.Equal(t, 3, meta.RetriesTotal) + require.True(t, meta.IsDefault) + } + + retries := map[byte]int{keyPIN: 5, keyPUK: 10} + + // Modify retry counter + err := c.SetRetries(DefaultManagementKey, DefaultPIN, retries[keyPIN], retries[keyPUK]) + require.NoError(t, err) + + for key, cnt := range retries { + meta, err := c.Metadata(Slot{Key: key}) + require.NoError(t, err) + require.Equal(t, cnt, meta.RetriesRemaining) + require.Equal(t, cnt, meta.RetriesTotal) + require.True(t, meta.IsDefault) + } + + // Update remaining retries + var aErr AuthError + + err = c.VerifyPIN("92837492") + require.ErrorAs(t, err, &aErr) + require.Equal(t, retries[keyPIN]-1, aErr.Retries) + + err = c.Unblock("92837492", "12345678") + require.ErrorAs(t, err, &aErr) + require.Equal(t, retries[keyPUK]-1, aErr.Retries) + + for key, cnt := range retries { + meta, err := c.Metadata(Slot{Key: key}) + require.NoError(t, err) + require.Equal(t, cnt-1, meta.RetriesRemaining) + require.Equal(t, cnt, meta.RetriesTotal) + require.True(t, meta.IsDefault) + } + + // Modify PIN/PUK + err = c.SetPIN(DefaultPIN, "981211") + require.NoError(t, err) + + err = c.SetPUK(DefaultPUK, "981211") + require.NoError(t, err) + + for key, cnt := range retries { + meta, err := c.Metadata(Slot{Key: key}) + require.NoError(t, err) + require.Equal(t, cnt, meta.RetriesRemaining) + require.Equal(t, cnt, meta.RetriesTotal) + require.False(t, meta.IsDefault) + } + }) +} diff --git a/error.go b/error.go index fd34405..5115d55 100644 --- a/error.go +++ b/error.go @@ -33,7 +33,7 @@ func wrapCode(err error) error { // Older YubiKeys sometimes return sw1=0x63 and sw2=0x0N to indicate the // number of retries. This isn't spec compliant, but support it anyway. // - // https://cunicu.li/go-piv/issues/60 + // https://github.com/go-piv/piv-go/issues/60 return AuthError{int(c[1] & 0xf)} default: diff --git a/filter.go b/filter.go index 3ed6660..4b7129b 100644 --- a/filter.go +++ b/filter.go @@ -1,15 +1,34 @@ -// SPDX-FileCopyrightText: 2023 Steffen Vogel +// SPDX-FileCopyrightText: 2023-2024 Steffen Vogel // SPDX-License-Identifier: Apache-2.0 package piv import ( + iso "cunicu.li/go-iso7816" "cunicu.li/go-iso7816/devices/yubikey" + "cunicu.li/go-iso7816/filter" ) //nolint:gochecknoglobals var ( - SupportsAttestation = yubikey.HasVersionStr("4.3.0") - SupportsMetadata = yubikey.HasVersionStr("5.3.0") - SupportsAlgorithmEC384 = yubikey.HasVersionStr("4.3.0") + v430 = iso.Version{Major: 4, Minor: 3, Patch: 0} + v530 = iso.Version{Major: 5, Minor: 3, Patch: 0} + v571 = iso.Version{Major: 5, Minor: 7, Patch: 1} + + SupportsAttestation = yubikey.HasVersion(v430) + SupportsMetadata = yubikey.HasVersion(v530) + SupportsKeyMoveDelete = yubikey.HasVersion(v571) ) + +func SupportsAlgorithm(alg Algorithm) filter.Filter { + switch alg { + case AlgRSA1024, AlgRSA2048, AlgECCP256, AlgECCP384: + return yubikey.HasVersion(v430) + + case AlgRSA3072, AlgRSA4096, AlgX25519, AlgEd25519: + return yubikey.HasVersion(v571) + + default: + return filter.None + } +} diff --git a/form_factor.go b/form_factor.go index d2a96e8..d9fd89e 100644 --- a/form_factor.go +++ b/form_factor.go @@ -36,7 +36,8 @@ func (f FormFactor) String() string { return fmt.Sprintf("unknown(0x%02x)", int(f)) } -// Formfactors recognized by this package. See the reference for more information: +// Form factors recognized by this package. +// // https://developers.yubico.com/yubikey-manager/Config_Reference.html#_form_factor const ( FormFactorUSBAKeychain = 0x1 diff --git a/go.sum b/go.sum index 5c88e74..77f0f02 100644 --- a/go.sum +++ b/go.sum @@ -1,38 +1,18 @@ -cunicu.li/go-iso7816 v0.3.0 h1:KSt0D7TBh0ghWnpDSjNJDehFmXwM67Q8I3Qg0fvZlgw= -cunicu.li/go-iso7816 v0.3.0/go.mod h1:jL3bciDEU4prkEtONmCzVAz542Vb7SLJBnLV3o4o8qo= -cunicu.li/go-iso7816 v0.4.0 h1:GwYTCcaGlaNC+Tb+TVVqGTKX83Z/UALM1U388Ymgfec= -cunicu.li/go-iso7816 v0.4.0/go.mod h1:jL3bciDEU4prkEtONmCzVAz542Vb7SLJBnLV3o4o8qo= -cunicu.li/go-iso7816 v0.5.0 h1:HjjEZFw5DqNukwswPBtHrt/iqfuZ2zZsHEhmasT7eXI= -cunicu.li/go-iso7816 v0.5.0/go.mod h1:jL3bciDEU4prkEtONmCzVAz542Vb7SLJBnLV3o4o8qo= -cunicu.li/go-iso7816 v0.5.1 h1:0fsdN5j+AoU9Y32RfF2IR126xpYAU1CC9WNBV6zmZAs= -cunicu.li/go-iso7816 v0.5.1/go.mod h1:OwF8/IxfJAi/GEuMv3cv7jXFmbto+7lDwl2eknMucoA= -cunicu.li/go-iso7816 v0.5.2 h1:hdGm6xLZ5//FjRSFxMRfuqfEFDIu6bIlKreKrXH6Fx8= -cunicu.li/go-iso7816 v0.5.2/go.mod h1:OwF8/IxfJAi/GEuMv3cv7jXFmbto+7lDwl2eknMucoA= -cunicu.li/go-iso7816 v0.6.0 h1:l0CzHZWN7FFLJOGY1NUQGyRxv0IuZODpMvEHWFIvOz4= -cunicu.li/go-iso7816 v0.6.0/go.mod h1:DBXPMv/k9XQplA9qQT2k/Xo2gPCWQ9/rIh+h4hzJ850= cunicu.li/go-iso7816 v0.8.0 h1:EEQ9hAbdIbTUM0uVrWbfGnQnFjA3P/VoNj1GM71Tf5w= cunicu.li/go-iso7816 v0.8.0/go.mod h1:gSG/jc0iH2bykUasCbyIfnI1PFotnm76Gmk1bc7UFEg= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/ebfe/scard v0.0.0-20230420082256-7db3f9b7c8a7 h1:HYAhfGa9dEemCZgGZWL5AvVsctBCsHxl2CI0HUXzHQE= github.com/ebfe/scard v0.0.0-20230420082256-7db3f9b7c8a7/go.mod h1:BkYEeWL6FbT4Ek+TcOBnPzEKnL7kOq2g19tTQXkorHY= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/key.go b/key.go index 30637b5..8297880 100644 --- a/key.go +++ b/key.go @@ -26,13 +26,13 @@ var ( errInvalidPKCS1Padding = errors.New("invalid PKCS#1 v1.5 padding") errInvalidSerialNumber = errors.New("invalid serial number") - errMissingPIN = errors.New("pin required but wasn't provided") + errMissingPIN = errors.New("PIN required but wasn't provided") errParseCert = errors.New("failed to parse certificate") errUnexpectedLength = errors.New("unexpected length") errUnmarshal = errors.New("failed to unmarshal") errUnsupportedAlgorithm = errors.New("unsupported algorithm") errUnsupportedHashAlgorithm = errors.New("unsupported hash algorithm") - errUnsupportedPinPolicy = errors.New("unsupported pin policy") + errUnsupportedPinPolicy = errors.New("unsupported PIN policy") errUnsupportedTouchPolicy = errors.New("unsupported touch policy") errUnsupportedKeyType = errors.New("unsupported key type") errUnsupportedOrigin = errors.New("unsupported origin") @@ -47,19 +47,6 @@ func (e UnsupportedCurveError) Error() string { return fmt.Sprintf("unsupported curve: %d", e.curve) } -// Slot is a private key and certificate combination managed by the security key. -type Slot struct { - // Key is a reference for a key type. - // - // See: https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=32 - Key byte - - // Object is a reference for data object. - // - // See: https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=30 - Object Object -} - //nolint:gochecknoglobals var ( extIDFirmwareVersion = asn1.ObjectIdentifier([]int{1, 3, 6, 1, 4, 1, 41482, 3, 3}) @@ -75,13 +62,17 @@ var ( type Key struct { // Algorithm to use when generating the key. Algorithm Algorithm + // PINPolicy for the key. // // BUG(ericchiang): some older YubiKeys (third generation) will silently // drop this value. If PINPolicyNever or PINPolicyOnce is supplied but the // key still requires a PIN every time, you may be using a buggy key and - // should supply PINPolicyAlways. See https://cunicu.li/go-piv/issues/60 + // should supply PINPolicyAlways. + // + // https://github.com/go-piv/piv-go/issues/60 PINPolicy PINPolicy + // TouchPolicy for the key. TouchPolicy TouchPolicy } @@ -131,7 +122,7 @@ func decodePublic(b []byte, alg Algorithm) (pub crypto.PublicKey, err error) { } switch alg { - case AlgRSA1024, AlgRSA2048: + case AlgRSA1024, AlgRSA2048, AlgRSA3072, AlgRSA4096: if pub, err = decodeRSAPublic(tvs); err != nil { return nil, fmt.Errorf("failed to decode RSA public key: %w", err) } @@ -151,6 +142,11 @@ func decodePublic(b []byte, alg Algorithm) (pub crypto.PublicKey, err error) { return nil, fmt.Errorf("failed to decode Ed25519 public key: %w", err) } + case AlgX25519: + if pub, err = decodeX25519Public(tvs); err != nil { + return nil, fmt.Errorf("failed to decode X25519 public key: %w", err) + } + default: return nil, errUnsupportedAlgorithm } @@ -193,6 +189,9 @@ func (c *Card) PrivateKey(slot Slot, public crypto.PublicKey, auth KeyAuth) (cry case ed25519.PublicKey: return &keyEd25519{c, slot, pub, auth, pp}, nil + case *ecdh.PublicKey: + return &keyX25519{c, slot, pub, auth, pp}, nil + case *rsa.PublicKey: return &keyRSA{c, slot, pub, auth, pp}, nil @@ -253,6 +252,14 @@ func (c *Card) SetPrivateKeyInsecure(key ManagementKey, slot Slot, private crypt policy.Algorithm = AlgRSA2048 elemLen = 128 + case 3072: + policy.Algorithm = AlgRSA3072 + elemLen = 192 + + case 4096: + policy.Algorithm = AlgRSA4096 + elemLen = 256 + default: return errUnsupportedKeySize } @@ -284,11 +291,22 @@ func (c *Card) SetPrivateKeyInsecure(key ManagementKey, slot Slot, private crypt tvs = append(tvs, tlv.New(0x06, pad(elemLen, priv.D.Bytes()))) // S value + case *ed25519.PrivateKey: + tvs = append(tvs, tlv.New(0x07, priv.Seed())) + + case *ecdh.PrivateKey: + if priv.Curve() != ecdh.X25519() { + return UnsupportedCurveError{} + } + + tvs = append(tvs, tlv.New(0x08, priv.Bytes())) + default: return errUnsupportedKeyType } // This command is a Yubico PIV extension. + // // https://developers.yubico.com/PIV/Introduction/Yubico_extensions.html if _, err := sendTLV(c.tx, insImportKey, byte(policy.Algorithm), slot.Key, tvs...); err != nil { return fmt.Errorf("failed to execute command: %w", err) @@ -296,3 +314,27 @@ func (c *Card) SetPrivateKeyInsecure(key ManagementKey, slot Slot, private crypt return nil } + +// MoveKey moves a key from any slot except F9 (SlotAttestation) to any other slot except F9 (SlotAttestation). +// +// This enables retaining retired encryption keys on the device to decrypt older messages. +// +// Note: This is a YubiKey specific extension to PIV. Its supported by YubiKeys with firmware 5.7.0 or newer. +func (c *Card) MoveKey(key ManagementKey, from, to Slot) error { + if err := c.authenticate(key); err != nil { + return fmt.Errorf("failed to authenticate with management key: %w", err) + } + + _, err := send(c.tx, insMoveDeleteKey, to.Key, from.Key, nil) + + return err +} + +// DeleteKey deletes a key from any slot, including F9 (SlotAttestation). +// +// This enables destroying key material without overwriting with bogus data or resetting the PIV application. +// +// Note: This is a YubiKey specific extension to PIV. Its supported by YubiKeys with firmware 5.7.0 or newer. +func (c *Card) DeleteKey(key ManagementKey, slot Slot) error { + return c.MoveKey(key, slot, SlotGraveyard) +} diff --git a/key_auth.go b/key_auth.go index e2b14a3..8313cce 100644 --- a/key_auth.go +++ b/key_auth.go @@ -37,7 +37,8 @@ func (k KeyAuth) authTx(c *Card, pp PINPolicy) error { // PINPolicyAlways should always prompt a PIN even if the key says that // login isn't needed. - // https://cunicu.li/go-piv/issues/49 + // + // https://github.com/go-piv/piv-go/issues/49 if pp != PINPolicyAlways && !loginNeeded(c.tx) { return nil } diff --git a/key_data_test.go b/key_data_test.go new file mode 100644 index 0000000..8fc321b --- /dev/null +++ b/key_data_test.go @@ -0,0 +1,123 @@ +// SPDX-FileCopyrightText: 2023-2024 Steffen Vogel +// SPDX-License-Identifier: Apache-2.0 + +package piv + +import ( + "crypto" + "crypto/ecdh" + "crypto/ed25519" + "crypto/x509" + _ "embed" + "encoding/pem" + "testing" + + "github.com/stretchr/testify/require" +) + +// privateKey is an interface with the optional (but always supported) methods +// of crypto.PrivateKey. +type privateKey interface { + Equal(crypto.PrivateKey) bool + Public() crypto.PublicKey +} + +var ( + //go:embed testdata/EC_224.key + testKeyEC224 []byte + //go:embed testdata/EC_256.key + testKeyEC256 []byte + //go:embed testdata/EC_384.key + testKeyEC384 []byte + //go:embed testdata/EC_521.key + testKeyEC521 []byte + + //go:embed testdata/Ed25519.key + testKeyEd25519 []byte + //go:embed testdata/X25519.key + testKeyX25519 []byte + + //go:embed testdata/RSA_512.key + testKeyRSA512 []byte + //go:embed testdata/RSA_1024.key + testKeyRSA1024 []byte + //go:embed testdata/RSA_2048.key + testKeyRSA2048 []byte + //go:embed testdata/RSA_3072.key + testKeyRSA3072 []byte + //go:embed testdata/RSA_4096.key + testKeyRSA4096 []byte +) + +// testKey returns a deterministic key for testing +// We require deterministic keys for reproducible tests +// in order for the test transcript to match +func testKey(t *testing.T, alg Algorithm) (key privateKey) { + t.Helper() + + var testKey []byte + var err error + switch alg { + case algECCP224, AlgECCP256, AlgECCP384, algECCP521: + switch alg.bits() { + case 224: + testKey = testKeyEC224 + case 256: + testKey = testKeyEC256 + case 384: + testKey = testKeyEC384 + case 521: + testKey = testKeyEC521 + default: + t.Fatalf("Unsupported EC curve: P-%d", alg.bits()) + } + + b, _ := pem.Decode(testKey) + require.NotNil(t, b) + + key, err = x509.ParseECPrivateKey(b.Bytes) + require.NoError(t, err) + + case AlgEd25519: + b, _ := pem.Decode(testKeyEd25519) + require.NotNil(t, b) + require.Len(t, b.Bytes, 32) + + key = ed25519.PrivateKey(b.Bytes) + + case AlgX25519: + b, _ := pem.Decode(testKeyX25519) + require.NotNil(t, b) + require.Len(t, b.Bytes, 32) + + key, err = ecdh.X25519().NewPrivateKey(b.Bytes) + require.NoError(t, err) + + case algRSA512, AlgRSA1024, AlgRSA2048, AlgRSA3072, AlgRSA4096: + switch alg.bits() { + case 512: + testKey = testKeyRSA512 + case 1024: + testKey = testKeyRSA1024 + case 2048: + testKey = testKeyRSA2048 + case 3072: + testKey = testKeyRSA3072 + case 4096: + testKey = testKeyRSA4096 + default: + t.Fatalf("Unsupported RSA modulus length: %d", alg.bits()) + } + + b, _ := pem.Decode(testKey) + require.NotNil(t, b) + + key, err = x509.ParsePKCS1PrivateKey(b.Bytes) + require.NoError(t, err) + + default: + t.Fatalf("test key: unknown algorithm: %s", alg) + } + + return key +} diff --git a/key_ecdh.go b/key_ecdh.go new file mode 100644 index 0000000..d38040e --- /dev/null +++ b/key_ecdh.go @@ -0,0 +1,73 @@ +// SPDX-FileCopyrightText: 2020 Google LLC +// SPDX-License-Identifier: Apache-2.0 + +package piv + +import ( + "crypto/ecdh" + "fmt" + + iso "cunicu.li/go-iso7816" + "cunicu.li/go-iso7816/encoding/tlv" +) + +type keyX25519 struct { + c *Card + slot Slot + pub *ecdh.PublicKey + auth KeyAuth + pp PINPolicy +} + +func (k *keyX25519) Public() *ecdh.PublicKey { + return k.pub +} + +// SharedKey performs a Diffie-Hellman key agreement with the peer +// to produce a shared secret key. +// +// Peer's public key must use the same algorithm as the key in +// this slot, or an error will be returned. +// +// Length of the result depends on the types and sizes of the keys +// used for the operation. Callers should use a cryptographic key +// derivation function to extract the amount of bytes they need. +func (k *keyX25519) SharedKey(peer *ecdh.PublicKey) ([]byte, error) { + if peer.Curve() != k.pub.Curve() { + return nil, errMismatchingAlgorithms + } + + return k.auth.do(k.c, k.pp, func(tx *iso.Transaction) ([]byte, error) { + // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=118 + // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=93 + resp, err := sendTLV(k.c.tx, iso.InsGeneralAuthenticate, byte(AlgX25519), k.slot.Key, + tlv.New(0x7c, + tlv.New(0x82), + tlv.New(0x85, peer.Bytes()), + ), + ) + if err != nil { + return nil, fmt.Errorf("failed to execute command: %w", err) + } + + rs, _, ok := resp.GetChild(0x7c, 0x82) + if !ok { + return nil, fmt.Errorf("%w: missing tag", errUnmarshal) + } + return rs, nil + }) +} + +// https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=95 +func decodeX25519Public(tvs tlv.TagValues) (*ecdh.PublicKey, error) { + p, _, ok := tvs.Get(0x86) + if !ok { + return nil, fmt.Errorf("%w points", errUnmarshal) + } + + if len(p) != 32 { + return nil, fmt.Errorf("%w of points: %d", errUnexpectedLength, len(p)) + } + + return ecdh.X25519().NewPublicKey(p) +} diff --git a/key_ecdh_test.go b/key_ecdh_test.go new file mode 100644 index 0000000..29dcbf1 --- /dev/null +++ b/key_ecdh_test.go @@ -0,0 +1,4 @@ +// SPDX-FileCopyrightText: 2023-2024 Steffen Vogel +// SPDX-License-Identifier: Apache-2.0 + +package piv diff --git a/key_ecdsa.go b/key_ecdsa.go index 12abcd5..f327a33 100644 --- a/key_ecdsa.go +++ b/key_ecdsa.go @@ -95,8 +95,8 @@ func (k *ECPPPrivateKey) SharedKey(peer *ecdsa.PublicKey) ([]byte, error) { }) } +// https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=95 func decodeECDSAPublic(tvs tlv.TagValues, curve ecdh.Curve) (*ecdsa.PublicKey, error) { - // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=95 p, _, ok := tvs.Get(0x86) if !ok { return nil, fmt.Errorf("%w: no points", errUnmarshal) @@ -117,6 +117,7 @@ func signEC(tx *iso.Transaction, slot Slot, pub *ecdsa.PublicKey, data []byte) ( } // Same as the standard library + // // https://github.com/golang/go/blob/go1.13.5/src/crypto/ecdsa/ecdsa.go#L125-L128 orderBytes := (pub.Params().BitSize + 7) / 8 if len(data) > orderBytes { diff --git a/key_ecdsa_test.go b/key_ecdsa_test.go index 89c4127..bccaf4a 100644 --- a/key_ecdsa_test.go +++ b/key_ecdsa_test.go @@ -15,89 +15,100 @@ import ( "github.com/stretchr/testify/require" ) -func TestECCPSharedKey(t *testing.T) { - withCard(t, false, false, nil, func(t *testing.T, c *Card) { - slot := SlotAuthentication +var testsECC = []struct { + alg Algorithm + slot Slot +}{ + { + alg: AlgECCP256, + slot: SlotAuthentication, + }, + { + alg: AlgECCP384, + slot: SlotAuthentication, + }, +} - key := Key{ - Algorithm: AlgECCP256, - TouchPolicy: TouchPolicyNever, - PINPolicy: PINPolicyNever, - } - pubKey, err := c.GenerateKey(DefaultManagementKey, slot, key) - require.NoError(t, err, "Failed to generate key") +func TestSharedKeyECC(t *testing.T) { + for _, test := range testsECC { + t.Run(test.alg.String(), func(t *testing.T) { + withCard(t, false, false, SupportsAlgorithm(test.alg), func(t *testing.T, c *Card) { + key := Key{ + Algorithm: test.alg, + TouchPolicy: TouchPolicyNever, + PINPolicy: PINPolicyNever, + } + pubKey, err := c.GenerateKey(DefaultManagementKey, test.slot, key) + require.NoError(t, err, "Failed to generate key") - pub, ok := pubKey.(*ecdsa.PublicKey) - require.True(t, ok, "Public key is not an EC key") + pub, ok := pubKey.(*ecdsa.PublicKey) + require.True(t, ok, "Public key is not an EC key") - priv, err := c.PrivateKey(slot, pub, KeyAuth{}) - require.NoError(t, err, "Failed to get private key") + priv, err := c.PrivateKey(test.slot, pub, KeyAuth{}) + require.NoError(t, err, "Failed to get private key") - privECCP, ok := priv.(*ECPPPrivateKey) - require.True(t, ok, "Expected private key to be EC private key") + privECCP, ok := priv.(*ECPPPrivateKey) + require.True(t, ok, "Expected private key to be EC private key") - t.Run("good", func(t *testing.T) { - key, ok := testKey(t, AlgTypeECCP, 256).(*ecdsa.PrivateKey) - require.True(t, ok) + t.Run("good", func(t *testing.T) { + key, ok := testKey(t, test.alg).(*ecdsa.PrivateKey) + require.True(t, ok) - mult, _ := pub.ScalarMult(pub.X, pub.Y, key.D.Bytes()) - secret1 := mult.Bytes() + mult, _ := pub.ScalarMult(pub.X, pub.Y, key.D.Bytes()) + secret1 := mult.Bytes() - secret2, err := privECCP.SharedKey(&key.PublicKey) - require.NoError(t, err, "Key agreement failed") + secret2, err := privECCP.SharedKey(&key.PublicKey) + require.NoError(t, err, "Key agreement failed") - assert.Equal(t, secret1, secret2, "Key agreement didn't match") - }) + assert.Equal(t, secret1, secret2, "Key agreement didn't match") + }) - t.Run("bad", func(t *testing.T) { - t.Run("size", func(t *testing.T) { - key, ok := testKey(t, AlgTypeECCP, 384).(*ecdsa.PrivateKey) - require.True(t, ok) + t.Run("bad", func(t *testing.T) { + t.Run("size", func(t *testing.T) { + key, ok := testKey(t, AlgECCP384).(*ecdsa.PrivateKey) + require.True(t, ok) - _, err = privECCP.SharedKey(&key.PublicKey) - require.ErrorIs(t, err, errMismatchingAlgorithms) + _, err = privECCP.SharedKey(&key.PublicKey) + require.ErrorIs(t, err, errMismatchingAlgorithms) + }) + }) }) }) - }) + } } -func TestSetECCPPrivateKey(t *testing.T) { +func TestSetPrivateKeyECC(t *testing.T) { tests := []struct { - name string - bits int + alg Algorithm slot Slot wantErr error }{ { - name: "EC/P256", - bits: 256, + alg: AlgECCP256, slot: SlotSignature, wantErr: nil, }, { - name: "EC/P384", - bits: 384, + alg: AlgECCP384, slot: SlotCardAuthentication, wantErr: nil, }, { - name: "EC/P224", - bits: 224, + alg: algECCP224, slot: SlotAuthentication, wantErr: UnsupportedCurveError{curve: 224}, }, { - name: "EC/P521", - bits: 521, + alg: algECCP521, slot: SlotKeyManagement, wantErr: UnsupportedCurveError{curve: 521}, }, } for _, test := range tests { - t.Run(test.name, func(t *testing.T) { + t.Run(test.alg.String(), func(t *testing.T) { withCard(t, false, false, nil, func(t *testing.T, c *Card) { - generated, ok := testKey(t, AlgTypeECCP, test.bits).(*ecdsa.PrivateKey) + generated, ok := testKey(t, test.alg).(*ecdsa.PrivateKey) require.True(t, ok) err := c.SetPrivateKeyInsecure(DefaultManagementKey, test.slot, generated, Key{ @@ -128,41 +139,43 @@ func TestSetECCPPrivateKey(t *testing.T) { } } -func TestSignECCP(t *testing.T) { - withCard(t, false, false, nil, func(t *testing.T, c *Card) { - err := c.Reset() - require.NoError(t, err, "Failed to reset applet") +func TestSignECC(t *testing.T) { + for _, test := range testsECC { + t.Run(test.alg.String(), func(t *testing.T) { + withCard(t, false, false, SupportsAlgorithm(test.alg), func(t *testing.T, c *Card) { + err := c.Reset() + require.NoError(t, err, "Failed to reset applet") - slot := SlotAuthentication - - key := Key{ - Algorithm: AlgECCP256, - TouchPolicy: TouchPolicyNever, - PINPolicy: PINPolicyNever, - } - pubKey, err := c.GenerateKey(DefaultManagementKey, slot, key) - require.NoError(t, err, "Failed to generate key") + key := Key{ + Algorithm: test.alg, + TouchPolicy: TouchPolicyNever, + PINPolicy: PINPolicyNever, + } + pubKey, err := c.GenerateKey(DefaultManagementKey, test.slot, key) + require.NoError(t, err, "Failed to generate key") - pub, ok := pubKey.(*ecdsa.PublicKey) - require.True(t, ok, "public key is not an EC key") + pub, ok := pubKey.(*ecdsa.PublicKey) + require.True(t, ok, "public key is not an EC key") - data := sha256.Sum256([]byte("hello")) - priv, err := c.PrivateKey(slot, pub, KeyAuth{}) - require.NoError(t, err, "Failed to get private key") + data := sha256.Sum256([]byte("hello")) + priv, err := c.PrivateKey(test.slot, pub, KeyAuth{}) + require.NoError(t, err, "Failed to get private key") - s, ok := priv.(crypto.Signer) - require.True(t, ok, "expected private key to implement crypto.Signer") + s, ok := priv.(crypto.Signer) + require.True(t, ok, "expected private key to implement crypto.Signer") - out, err := s.Sign(c.Rand, data[:], crypto.SHA256) - require.NoError(t, err, "Failed to sign") + out, err := s.Sign(c.Rand, data[:], crypto.SHA256) + require.NoError(t, err, "Failed to sign") - var sig struct { - R, S *big.Int - } - _, err = asn1.Unmarshal(out, &sig) - require.NoError(t, err, "Failed to unmarshal signature") + var sig struct { + R, S *big.Int + } + _, err = asn1.Unmarshal(out, &sig) + require.NoError(t, err, "Failed to unmarshal signature") - verified := ecdsa.Verify(pub, data[:], sig.R, sig.S) - assert.True(t, verified, "Signature didn't match") - }) + verified := ecdsa.Verify(pub, data[:], sig.R, sig.S) + assert.True(t, verified, "Signature didn't match") + }) + }) + } } diff --git a/key_eddsa.go b/key_eddsa.go index 1e79fd9..67a90fe 100644 --- a/key_eddsa.go +++ b/key_eddsa.go @@ -25,17 +25,17 @@ func (k *keyEd25519) Public() crypto.PublicKey { return k.pub } -// This function only works on SoloKeys prototypes and other PIV devices that choose -// to implement Ed25519 signatures under alg 0x22. +// This function only works on YubiKeys with firmware version 5.7.0 and higher as well +// as SoloKeys prototypes and other PIV devices that choose to implement Ed25519 +// signatures under algorithm type 0xE0 / 0x22. func (k *keyEd25519) Sign(_ io.Reader, digest []byte, _ crypto.SignerOpts) ([]byte, error) { return k.auth.do(k.c, k.pp, func(tx *iso.Transaction) ([]byte, error) { return signEd25519(tx, k.slot, digest) }) } +// https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=95 func decodeEd25519Public(tvs tlv.TagValues) (ed25519.PublicKey, error) { - // Adaptation of - // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=95 p, _, ok := tvs.Get(0x86) if !ok { return nil, fmt.Errorf("%w points", errUnmarshal) @@ -48,9 +48,8 @@ func decodeEd25519Public(tvs tlv.TagValues) (ed25519.PublicKey, error) { return ed25519.PublicKey(p), nil } +// https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=118 func signEd25519(tx *iso.Transaction, slot Slot, data []byte) ([]byte, error) { - // Adaptation of - // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=118 resp, err := sendTLV(tx, iso.InsGeneralAuthenticate, byte(AlgEd25519), slot.Key, tlv.New(0x7c, tlv.New(0x82), diff --git a/key_rsa.go b/key_rsa.go index 73001de..537341f 100644 --- a/key_rsa.go +++ b/key_rsa.go @@ -40,8 +40,8 @@ func (k *keyRSA) Decrypt(_ io.Reader, msg []byte, _ crypto.DecrypterOpts) ([]byt }) } +// https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=95 func decodeRSAPublic(tvs tlv.TagValues) (*rsa.PublicKey, error) { - // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=95 mod, _, ok := tvs.Get(0x81) if !ok { return nil, fmt.Errorf("%w modulus", errUnmarshal) @@ -174,6 +174,12 @@ func algRSA(pub *rsa.PublicKey) (Algorithm, error) { case 2048: return AlgRSA2048, nil + case 3072: + return AlgRSA3072, nil + + case 4096: + return AlgRSA4096, nil + default: return 0, fmt.Errorf("%w: %d", errUnsupportedKeySize, size) } diff --git a/key_rsa_test.go b/key_rsa_test.go index 9e025e2..9414e0d 100644 --- a/key_rsa_test.go +++ b/key_rsa_test.go @@ -23,15 +23,16 @@ import ( func TestSignRSA(t *testing.T) { tests := []struct { - name string alg Algorithm long bool }{ - {"RSA/1024", AlgRSA1024, false}, - {"RSA/2048", AlgRSA2048, true}, + {AlgRSA1024, false}, + {AlgRSA2048, true}, + {AlgRSA3072, true}, + {AlgRSA4096, true}, } for _, test := range tests { - t.Run(test.name, func(t *testing.T) { + t.Run(test.alg.String(), func(t *testing.T) { withCard(t, false, test.long, nil, func(t *testing.T, c *Card) { slot := SlotAuthentication key := Key{ @@ -64,15 +65,16 @@ func TestSignRSA(t *testing.T) { func TestSignRSAPSS(t *testing.T) { tests := []struct { - name string alg Algorithm long bool }{ - {"RSA/1024", AlgRSA1024, false}, - {"RSA/2048", AlgRSA2048, true}, + {AlgRSA1024, false}, + {AlgRSA2048, true}, + {AlgRSA3072, true}, + {AlgRSA4096, true}, } for _, test := range tests { - t.Run(test.name, func(t *testing.T) { + t.Run(test.alg.String(), func(t *testing.T) { withCard(t, false, test.long, nil, func(t *testing.T, c *Card) { slot := SlotAuthentication key := Key{ @@ -104,43 +106,43 @@ func TestSignRSAPSS(t *testing.T) { } } -func TestSetRSAPrivateKey(t *testing.T) { +func TestSetPrivateKeyRSA(t *testing.T) { tests := []struct { - name string - bits int + alg Algorithm slot Slot wantErr error }{ { - name: "RSA/1024", - bits: 1024, + alg: AlgRSA1024, slot: SlotSignature, wantErr: nil, }, { - name: "RSA/2048", - bits: 2048, + alg: AlgRSA2048, slot: SlotCardAuthentication, wantErr: nil, }, { - name: "RSA/4096", - bits: 4096, + alg: AlgRSA3072, slot: SlotAuthentication, - wantErr: errUnsupportedKeySize, + wantErr: nil, + }, + { + alg: AlgRSA4096, + slot: SlotAuthentication, + wantErr: nil, }, { - name: "RSA/512", - bits: 512, + alg: algRSA512, slot: SlotKeyManagement, wantErr: errUnsupportedKeySize, }, } for _, test := range tests { - t.Run(test.name, func(t *testing.T) { + t.Run(test.alg.String(), func(t *testing.T) { withCard(t, false, false, nil, func(t *testing.T, c *Card) { - key := testKey(t, AlgTypeRSA, test.bits) + key := testKey(t, test.alg) generated, ok := key.(*rsa.PrivateKey) require.True(t, ok) diff --git a/key_test.go b/key_test.go index 3baba0d..c4f55c9 100644 --- a/key_test.go +++ b/key_test.go @@ -1,4 +1,5 @@ // SPDX-FileCopyrightText: 2020 Google LLC +// SPDX-FileCopyrightText: 2023-2024 Steffen Vogel // SPDX-License-Identifier: Apache-2.0 package piv @@ -17,7 +18,7 @@ import ( "testing" "time" - "cunicu.li/go-iso7816/filter" + "cunicu.li/go-iso7816" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -84,15 +85,16 @@ func TestPINPrompt(t *testing.T) { func TestDecryptRSA(t *testing.T) { tests := []struct { - name string alg Algorithm long bool }{ - {"RSA/1024", AlgRSA1024, false}, - {"RSA/2048", AlgRSA2048, true}, + {AlgRSA1024, false}, + {AlgRSA2048, true}, + {AlgRSA3072, true}, + {AlgRSA4096, true}, } for _, test := range tests { - t.Run(test.name, func(t *testing.T) { + t.Run(test.alg.String(), func(t *testing.T) { withCard(t, false, test.long, nil, func(t *testing.T, c *Card) { slot := SlotAuthentication key := Key{ @@ -130,7 +132,7 @@ func TestStoreCertificate(t *testing.T) { withCard(t, false, false, nil, func(t *testing.T, c *Card) { slot := SlotAuthentication - caPriv := testKey(t, AlgTypeECCP, 256) + caPriv := testKey(t, AlgECCP256) // Generate a self-signed certificate caTmpl := &x509.Certificate{ @@ -196,37 +198,34 @@ func TestStoreCertificate(t *testing.T) { func TestGenerateKey(t *testing.T) { tests := []struct { - name string alg Algorithm - bits int long bool }{ { - name: "EC/P256", - alg: AlgECCP256, + alg: AlgECCP256, }, { - name: "EC/P384", - alg: AlgECCP384, + alg: AlgECCP384, }, { - name: "RSA/1024", - alg: AlgRSA1024, + alg: AlgRSA1024, }, { - name: "RSA/2048", alg: AlgRSA2048, long: true, }, + { + alg: AlgRSA3072, + long: true, + }, + { + alg: AlgRSA4096, + long: true, + }, } for _, test := range tests { - t.Run(test.name, func(t *testing.T) { - var flt filter.Filter - if test.alg == AlgECCP384 { - flt = SupportsAlgorithmEC384 - } - - withCard(t, false, test.long, flt, func(t *testing.T, c *Card) { + t.Run(test.alg.String(), func(t *testing.T) { + withCard(t, false, test.long, SupportsAlgorithm(test.alg), func(t *testing.T, c *Card) { key := Key{ Algorithm: test.alg, TouchPolicy: TouchPolicyNever, @@ -391,81 +390,72 @@ func TestVerify(t *testing.T) { } } -// privateKey is an interface with the optional (but always supported) methods -// of crypto.PrivateKey. -type privateKey interface { - Equal(crypto.PrivateKey) bool - Public() crypto.PublicKey -} +func TestMoveKey(t *testing.T) { + withCard(t, true, false, SupportsKeyMoveDelete, func(t *testing.T, c *Card) { + // Moving non-existing key must fail + err := c.MoveKey(DefaultManagementKey, SlotAuthentication, SlotCardAuthentication) + require.ErrorIs(t, err, iso7816.ErrReferenceNotFound, "Expected move of non-existing key to fail") -var ( - //go:embed testdata/EC_224.key - testKeyEC224 []byte - //go:embed testdata/EC_256.key - testKeyEC256 []byte - //go:embed testdata/EC_384.key - testKeyEC384 []byte - //go:embed testdata/EC_521.key - testKeyEC521 []byte - - //go:embed testdata/RSA_512.key - testKeyRSA512 []byte - //go:embed testdata/RSA_1024.key - testKeyRSA1024 []byte - //go:embed testdata/RSA_2048.key - testKeyRSA2048 []byte - //go:embed testdata/RSA_4096.key - testKeyRSA4096 []byte -) + // Generate key + _, err = c.GenerateKey(DefaultManagementKey, SlotAuthentication, Key{ + Algorithm: AlgRSA1024, + PINPolicy: PINPolicyNever, + TouchPolicy: TouchPolicyNever, + }) + require.NoErrorf(t, err, "Generation of new key failed: %w", err) -// testKey returns a deterministic key for testing -// We require deterministic keys for reproducible tests -// in order for the test transcript to match -func testKey(t *testing.T, typ algorithmType, bits int) (key privateKey) { - t.Helper() - - var testKey []byte - var err error - switch typ { - case AlgTypeECCP: - switch bits { - case 224: - testKey = testKeyEC224 - case 256: - testKey = testKeyEC256 - case 384: - testKey = testKeyEC384 - case 521: - testKey = testKeyEC521 - } + // Check that new key exists + m1, err := c.Metadata(SlotAuthentication) + require.NoErrorf(t, err, "Failed to retrieve metadata of new key: %w", err) + require.Equal(t, m1.Algorithm, AlgRSA1024, "Mismatching algorithm for new key") - b, _ := pem.Decode(testKey) - require.NotNil(t, b) - - key, err = x509.ParseECPrivateKey(b.Bytes) - require.NoError(t, err) - - case AlgTypeRSA: - switch bits { - case 512: - testKey = testKeyRSA512 - case 1024: - testKey = testKeyRSA1024 - case 2048: - testKey = testKeyRSA2048 - case 4096: - testKey = testKeyRSA4096 - } + pk1, ok := m1.PublicKey.(*rsa.PublicKey) + require.True(t, ok, "Key is not an RSA key") - b, _ := pem.Decode(testKey) - require.NotNil(t, b) + // Move key + err = c.MoveKey(DefaultManagementKey, SlotAuthentication, SlotCardAuthentication) + require.NoErrorf(t, err, "Failed to move key: %w", err) - key, err = x509.ParsePKCS1PrivateKey(b.Bytes) - require.NoError(t, err) + // Check key has been removed from source slot + _, err = c.Metadata(SlotAuthentication) + require.ErrorIs(t, err, iso7816.ErrReferenceNotFound, "Key still exists") - default: - t.Fatalf("ephemeral key: unknown algorithm") - } + // Check key is now in the new slot + m2, err := c.Metadata(SlotCardAuthentication) + require.NoErrorf(t, err, "Failed to retrieve metadata of moved key: %w", err) + + pk2, ok := m2.PublicKey.(*rsa.PublicKey) + require.True(t, ok, "Key is not an RSA key") + + require.True(t, pk1.Equal(pk2), "Public keys of moved slot are not equal") + }) +} + +func TestDeleteKey(t *testing.T) { + withCard(t, true, false, SupportsKeyMoveDelete, func(t *testing.T, c *Card) { + // Delete non-existing key must fail + err := c.DeleteKey(DefaultManagementKey, SlotAuthentication) + require.ErrorIs(t, err, iso7816.ErrReferenceNotFound, "Deletion of non-existing key succeeded") - return key + // Generate key + _, err = c.GenerateKey(DefaultManagementKey, SlotAuthentication, Key{ + Algorithm: AlgRSA1024, + PINPolicy: PINPolicyNever, + TouchPolicy: TouchPolicyNever, + }) + require.NoErrorf(t, err, "Failed to generate key: %w", err) + + // Check that new key exists + m, err := c.Metadata(SlotAuthentication) + require.NoErrorf(t, err, "Failed to retrieve metadata of new key: %w", err) + require.Equal(t, m.Algorithm, AlgRSA1024, "Key is not an RSA key") + + // Delete key + err = c.DeleteKey(DefaultManagementKey, SlotAuthentication) + require.NoErrorf(t, err, "Failed to delete key: %w", err) + + // Check key has been removed + _, err = c.Metadata(SlotAuthentication) + require.ErrorIs(t, err, iso7816.ErrReferenceNotFound, "Key has not been removed") + }) } diff --git a/metadata.go b/metadata.go index aec5dd1..96fc05b 100644 --- a/metadata.go +++ b/metadata.go @@ -12,43 +12,48 @@ import ( // Metadata holds unprotected metadata about a key slot. type Metadata struct { - Algorithm Algorithm - PINPolicy PINPolicy - TouchPolicy TouchPolicy - Origin Origin - PublicKey crypto.PublicKey + Algorithm Algorithm + PINPolicy PINPolicy + TouchPolicy TouchPolicy + Origin Origin + PublicKey crypto.PublicKey + RetriesTotal int + RetriesRemaining int + IsDefault bool } //nolint:gocognit func (ki *Metadata) unmarshal(tvs tlv.TagValues) (err error) { // Algorithm - if v, _, ok := tvs.Get(0x01); ok { - if len(v) != 1 { - return fmt.Errorf("%w for algorithm", errUnexpectedLength) + if v, _, ok := tvs.Get(tagMetadataAlgo); ok { + if l := len(v); l != 1 { + return fmt.Errorf("%w for algorithm: %d", errUnexpectedLength, l) } ki.Algorithm = Algorithm(v[0]) } // PIN & Touch Policy - if v, _, ok := tvs.Get(0x02); ok { - if len(v) != 2 { - return fmt.Errorf("%w for pin and touch policy", errUnexpectedLength) + if v, _, ok := tvs.Get(tagMetadataPolicy); ok { + if l := len(v); l != 2 { + return fmt.Errorf("%w for PIN and touch policy: %d", errUnexpectedLength, l) } if ki.PINPolicy, ok = pinPolicyMapInv[v[0]]; !ok { - return errUnsupportedPinPolicy + if v[0] > 0 { // SlotCardManagement has no PIN policy + return fmt.Errorf("%w: %x", errUnsupportedPinPolicy, v[0]) + } } if ki.TouchPolicy, ok = touchPolicyMapInv[v[1]]; !ok { - return errUnsupportedTouchPolicy + return fmt.Errorf("%w: %x", errUnsupportedTouchPolicy, v[1]) } } // Origin - if v, _, ok := tvs.Get(0x03); ok { - if len(v) != 1 { - return fmt.Errorf("%w for origin", errUnexpectedLength) + if v, _, ok := tvs.Get(tagMetadataOrigin); ok { + if l := len(v); l != 1 { + return fmt.Errorf("%w for origin: %d", errUnexpectedLength, l) } if ki.Origin, ok = originMapInv[v[0]]; !ok { @@ -57,38 +62,40 @@ func (ki *Metadata) unmarshal(tvs tlv.TagValues) (err error) { } // Public Key - if v, _, ok := tvs.Get(0x04); ok { + if v, _, ok := tvs.Get(tagMetadataPublicKey); ok { ki.PublicKey, err = decodePublic(v, ki.Algorithm) if err != nil { return fmt.Errorf("failed to parse public key: %w", err) } } - // TODO: According to the Yubico website, we get two more fields, - // if we pass 0x80 or 0x81 as slots: - // 1. Default value (for PIN/PUK and management key): Whether the - // default value is used. - // 2. Retries (for PIN/PUK): The number of retries remaining - // However, it seems the reference implementation does not expect - // these and can not parse them out: - // https://github.com/Yubico/yubico-piv-tool/blob/yubico-piv-tool-2.3.1/lib/util.c#L1529 - // For now, we just ignore them. + // Has default value + if v, _, ok := tvs.Get(tagMetadataIsDefault); ok { + if l := len(v); l != 1 { + return fmt.Errorf("%w for default value: %d", errUnexpectedLength, l) + } - // Default Value - // if _, v, ok := tvs.Get(0x05); ok { - // } + ki.IsDefault = v[0] != 0 + } - // Retries - // if _, v, ok := tvs.Get(0x06); ok { - // } + // Number of retries left + if v, _, ok := tvs.Get(tagMetadataRetries); ok { + if l := len(v); l != 2 { + return fmt.Errorf("%w for retries: %d", errUnexpectedLength, l) + } + + ki.RetriesTotal = int(v[0]) + ki.RetriesRemaining = int(v[1]) + } return nil } // Metadata returns public information about the given key slot. It is only // supported by YubiKeys with a version >= 5.3.0. +// +// https://developers.yubico.com/PIV/Introduction/Yubico_extensions.html#_get_metadata func (c *Card) Metadata(slot Slot) (*Metadata, error) { - // https://developers.yubico.com/PIV/Introduction/Yubico_extensions.html#_get_metadata resp, err := sendTLV(c.tx, insGetMetadata, 0x00, slot.Key) if err != nil { return nil, fmt.Errorf("failed to execute command: %w", err) diff --git a/metadata_test.go b/metadata_test.go index 8b4b98d..06650e1 100644 --- a/metadata_test.go +++ b/metadata_test.go @@ -14,57 +14,81 @@ func TestMetadata(t *testing.T) { tests := []struct { name string slot Slot - policy Key + key Key importKey bool }{ { - "EC/P256/Generated", + "EC-P256/Generated", SlotAuthentication, Key{AlgECCP256, PINPolicyNever, TouchPolicyNever}, false, }, { - "EC/P384/Generated", + "EC-P384/Generated", SlotAuthentication, Key{AlgECCP384, PINPolicyNever, TouchPolicyNever}, false, }, { - "RSA/1024/Generated", + "RSA-1024/Generated", SlotAuthentication, Key{AlgRSA1024, PINPolicyNever, TouchPolicyNever}, false, }, { - "RSA/2048/Generated", + "RSA-2048/Generated", SlotAuthentication, Key{AlgRSA2048, PINPolicyNever, TouchPolicyNever}, false, }, { - "EC/P256/Imported", + "RSA-3072/Generated", + SlotAuthentication, + Key{AlgRSA3072, PINPolicyNever, TouchPolicyNever}, + false, + }, + { + "RSA-4096/Generated", + SlotAuthentication, + Key{AlgRSA4096, PINPolicyNever, TouchPolicyNever}, + false, + }, + { + "EC-P256/Imported", SlotAuthentication, Key{AlgECCP256, PINPolicyNever, TouchPolicyNever}, true, }, { - "EC/P384/Imported", + "EC-P384/Imported", SlotAuthentication, Key{AlgECCP384, PINPolicyNever, TouchPolicyNever}, true, }, { - "RSA/1024/Imported", + "RSA-1024/Imported", SlotAuthentication, Key{AlgRSA1024, PINPolicyNever, TouchPolicyNever}, true, }, { - "RSA/2048/Imported", + "RSA-2048/Imported", SlotAuthentication, Key{AlgRSA2048, PINPolicyNever, TouchPolicyNever}, true, }, + { + "RSA-3072/Imported", + SlotAuthentication, + Key{AlgRSA3072, PINPolicyNever, TouchPolicyNever}, + true, + }, + { + "RSA-4096/Imported", + SlotAuthentication, + Key{AlgRSA4096, PINPolicyNever, TouchPolicyNever}, + true, + }, { "PINPolicy/Once", SlotAuthentication, @@ -113,21 +137,22 @@ func TestMetadata(t *testing.T) { t.Run(test.name, func(t *testing.T) { withCard(t, true, false, SupportsMetadata, func(t *testing.T, c *Card) { want := &Metadata{ - Algorithm: test.policy.Algorithm, - PINPolicy: test.policy.PINPolicy, - TouchPolicy: test.policy.TouchPolicy, + Algorithm: test.key.Algorithm, + PINPolicy: test.key.PINPolicy, + TouchPolicy: test.key.TouchPolicy, + IsDefault: false, } if test.importKey { - key := testKey(t, test.policy.Algorithm.algType(), test.policy.Algorithm.bits()) + key := testKey(t, test.key.Algorithm) - err := c.SetPrivateKeyInsecure(DefaultManagementKey, test.slot, key, test.policy) + err := c.SetPrivateKeyInsecure(DefaultManagementKey, test.slot, key, test.key) require.NoError(t, err, "importing key") want.Origin = OriginImported want.PublicKey = key.Public() } else { - pub, err := c.GenerateKey(DefaultManagementKey, test.slot, test.policy) + pub, err := c.GenerateKey(DefaultManagementKey, test.slot, test.key) require.NoError(t, err, "Failed to generate key") want.Origin = OriginGenerated @@ -141,3 +166,45 @@ func TestMetadata(t *testing.T) { }) } } + +func TestMetadataPINPUK(t *testing.T) { + for typ, slot := range map[string]Slot{ + "PIN": SlotPIN, + "PUK": SlotPUK, + } { + t.Run(typ, func(t *testing.T) { + withCard(t, true, false, SupportsMetadata, func(t *testing.T, c *Card) { + want := &Metadata{ + Algorithm: AlgPIN, + RetriesTotal: 3, + RetriesRemaining: 3, + IsDefault: true, + } + + // Get default metadata + got, err := c.Metadata(slot) + require.NoError(t, err) + require.Equal(t, want, got) + }) + }) + } +} + +func TestMetadataCardManagement(t *testing.T) { + withCard(t, true, false, SupportsMetadata, func(t *testing.T, c *Card) { + want := &Metadata{ + TouchPolicy: TouchPolicyNever, + IsDefault: true, + } + + if v571.Less(c.Version()) { + want.Algorithm = Alg3DES + } else { + want.Algorithm = AlgAES192 + } + + got, err := c.Metadata(SlotCardManagement) + require.NoError(t, err) + require.Equal(t, want, got) + }) +} diff --git a/mockdata/TestAttestation/yk-5.7.1 b/mockdata/TestAttestation/yk-5.7.1 new file mode 100644 index 0000000..beb7e61 --- /dev/null +++ b/mockdata/TestAttestation/yk-5.7.1 @@ -0,0 +1,30 @@ +mockfile + +file version v3 +file created 2024-06-05T18:39:14+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.118 0.118 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.852 1.852 Transmit 00fd0000 0507019000 +on 2.992 2.992 Transmit 00cb3fff055c035fff01 53820302708202fe308202fa308201e2a00302010202090096d3bff5fdb29f7a300d06092a864886f70d01010b0500302b3129302706035504030c2059756269636f2050495620526f6f742043412053657269616c203236333735313020170d3136303331343030303030305a180f32303532303431373030303030305a3021311f301d06035504030c1659756269636f20504956204174746573746174696f6e30820122300d06092a864886f70d01010105000382010f003082010a0282010100d9f719a916bbd2b4db342da77d9519a45e8d30436bd1be9fc6c944cc303cde8052a8f724a069b27fe5b31a1bdd9fc6fa04671f9a9a51bf8fb25f24f403666100 +on 5.288 5.288 Transmit 00c00000 2bd4d0d36c6df7d654b3676473d005e5e5664d6b277575025ad95e6f162e8dfad3fac1ad0be949c703ac4e5d24770b0f1d3169adb7917e3dff712cae8b6f6a6ac15989eaba713b5f3fb8f21a589301bc80938855f6e3bc662eba0948ea74d1486cade86a3a3d3a0c0979de9d03d2501d5a09b92540e7f7b0e73dfeff101995fc5610ee7f4c1acdc2ec6a29957b52f95b00651963c776c2fd2f1c1220005daf0e9c6d7392ed23b33cf1b1abadc9620043c5dcf09ddad2b3dadbc0f2c6db9c62e081030203010001a32930273011060a2b0601040182c40a0303040305070130120603551d130101ff040830060101ff020100300d06092a864886f70d01010b056100 +on 6.214 6.214 Transmit 00c00000 000382010100ace6b833c09a3b0eff0a4fc7a7a8135c226c2ccdef56ee39aa22c33ee3fb0e1eee2b9f9025f30e0c3b31d5e4acbf5afee948290951332a49a0417f07afbc26b26eaae9372bdef685e92d97062722fe3e59337e9673929a374cbfb812c6532d36d77fe77112f1668446c24b03251fbaec2a4c0b96180374a86d31e7cdcf99bbcfd00b669c9eecfbd8a53c31ba306eb094abcf2f452f6c1f9fdc005bff595545cfba14e1e91135148bfa7f06381d62ecb75dcccf14cd599bc7c6dac866c96f01523f8152e2c92b99f61f31b81df24d2031e3c7165c7a0d82696bb9535b57093637436298e8ab39a0af5c6055b01beef598e0ec90d2fd1e049450246106 +on 7.094 7.094 Transmit 00c00000 a7d7f06428d19000 +on 7.621 7.621 Transmit 00f7009b 01010a020200010501019000 +on 8.791 8.791 Transmit 00870a9b047c028000 7c1280109ccd1a2d88e1e192b5185c82b092675d9000 +on 10.565 10.565 Transmit 00870a9b267c248010bfeb45eb25e11304019642b24712485f8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 12.537 12.537 Transmit 0047009a0bac09800111aa0101ab0101 7f49438641046d7beeccafeaff081550169641aca34ba3b97be975b562164ceeea3b6aa46b8330cafdfd1af86f6806cd74be9027d94a7193df116bc26cc239ce628b5b09794f9000 +on 688.876 688.876 Transmit 00f99a00 308202553082013da003020102021001e928865662877f0b33704edcfad76d300d06092a864886f70d01010b05003021311f301d06035504030c1659756269636f20504956204174746573746174696f6e3020170d3136303331343030303030305a180f32303532303431373030303030305a30253123302106035504030c1a597562694b657920504956204174746573746174696f6e2039613059301306072a8648ce3d020106082a8648ce3d030107034200046d7beeccafeaff081550169641aca34ba3b97be975b562164ceeea3b6aa46b8330cafdfd1af86f6806cd74be9027d94a7193df116bc26cc239ce628b5b09794fa34e304c3011060a2b06016100 +on 1082.866 1082.866 Transmit 00c00000 040182c40a030304030507013014060a2b0601040182c40a03070406020401bd27a93010060a2b0601040182c40a030804020101300f060a2b0601040182c40a0309040103300d06092a864886f70d01010b050003820101008f6c15820784d4913666c7073d3c96712ac0f3afd3a05ebc43577313be6c67d2d6d91db3e79e160cf939806676d30f2c6a9713dfe2ede287763d4cfafde39b9e4a118dd11e6b7c8f2d685573d03c84ffa30c2951415b1b4a81407738383c15260159f2d7d99bc97607f5ab942fd3abbab75909ece8bb42d39a9a97e34b70cec1b9985603dce668fe4a50a6b8b794206f79fa596cd6a2f17094bc44872bb0bce9fdad4776ffc3676159 +on 1087.162 1087.162 Transmit 00c00000 4b07fbaab0c846a6f1d3331d50cded143c07fef4ac207eb944b0a9fcf0d886de6cbeb9266435f40ea443d98267b15146f53481a9f040f9d8a1470cca0c7272cf0ea49c87d2cd358c8dc6083d311c4b6480f65aeb86ad1011ab9000 +on 1088.803 1088.803 Transmit 00f80000 01bd27a99000 +on 1090.736 1090.736 EndTransaction diff --git a/mockdata/TestAuthenticate/yk-5.7.1 b/mockdata/TestAuthenticate/yk-5.7.1 new file mode 100644 index 0000000..7623065 --- /dev/null +++ b/mockdata/TestAuthenticate/yk-5.7.1 @@ -0,0 +1,21 @@ +mockfile + +file version v3 +file created 2024-06-05T18:39:22+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.066 0.066 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.743 0.743 Transmit 00fd0000 0507019000 +on 1.791 1.791 Transmit 00f7009b 01010a020200010501019000 +on 2.982 2.982 Transmit 00870a9b047c028000 7c1280106e52d92a0c37febe33934e587a407f609000 +on 4.657 4.657 Transmit 00870a9b267c248010c65c0939ac25e72eab255708fd6d432c8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 6.211 6.211 EndTransaction diff --git a/mockdata/TestChangeManagementKey/yk-5.7.1 b/mockdata/TestChangeManagementKey/yk-5.7.1 new file mode 100644 index 0000000..6c205d6 --- /dev/null +++ b/mockdata/TestChangeManagementKey/yk-5.7.1 @@ -0,0 +1,29 @@ +mockfile + +file version v3 +file created 2024-06-05T18:39:22+02:00 +file creator stv0g@cam + +meta status.active_protocol any,t1 +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.079 0.079 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.788 0.788 Transmit 00fd0000 0507019000 +on 1.935 1.935 Transmit 00f7009b 010103020200010501009000 +on 3.127 3.127 Transmit 0087039b047c028000 7c0a80084993421ebd5a32a59000 +on 4.622 4.622 Transmit 0087039b167c1480082e7da4e9f01a979f8108abababababababab 6982 +on 6.284 6.284 Transmit 00f7009b 010103020200010501009000 +on 7.387 7.387 Transmit 0087039b047c028000 7c0a800859934e072c38f4539000 +on 8.979 8.979 Transmit 0087039b167c148008600133d181256eae8108abababababababab 7c0a8208b4e0e48bf8e2d06a9000 +on 10.651 10.651 Transmit 00ffffff1b039b18abababababababababababababababababababababababab 9000 +on 20.317 20.317 Transmit 00f7009b 010103020200010501009000 +on 21.586 21.586 Transmit 0087039b047c028000 7c0a80083de65ab66bd35b0a9000 +on 23.219 23.219 Transmit 0087039b167c1480082155444713973b268108abababababababab 7c0a8208ace41a06bfa258ea9000 +on 24.853 24.853 Transmit 00ffffff1b039b18010203040506070801020304050607080102030405060708 9000 +on 34.463 34.463 EndTransaction diff --git a/mockdata/TestChangePIN/yk-5.7.1 b/mockdata/TestChangePIN/yk-5.7.1 new file mode 100644 index 0000000..dd395f6 --- /dev/null +++ b/mockdata/TestChangePIN/yk-5.7.1 @@ -0,0 +1,21 @@ +mockfile + +file version v3 +file created 2024-06-05T18:39:22+02:00 +file creator stv0g@cam + +meta status.active_protocol any,t1 +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state specific,present,powered +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.088 0.088 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.854 0.854 Transmit 00fd0000 0507019000 +on 2.168 2.168 Transmit 0024008010363534333231ffff363534333231ffff 63c2 +on 7.808 7.808 Transmit 0024008010313233343536ffff363534333231ffff 9000 +on 29.359 29.359 Transmit 0024008010363534333231ffff313233343536ffff 9000 +on 51.082 51.082 EndTransaction diff --git a/mockdata/TestChangePUK/yk-5.7.1 b/mockdata/TestChangePUK/yk-5.7.1 new file mode 100644 index 0000000..8f23dc7 --- /dev/null +++ b/mockdata/TestChangePUK/yk-5.7.1 @@ -0,0 +1,21 @@ +mockfile + +file version v3 +file created 2024-06-05T18:39:22+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state specific,present,powered +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.052 0.052 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.663 0.663 Transmit 00fd0000 0507019000 +on 1.895 1.895 Transmit 002400811038373635343332313837363534333231 63c2 +on 7.438 7.438 Transmit 002400811031323334353637383837363534333231 9000 +on 33.151 33.151 Transmit 002400811038373635343332313132333435363738 9000 +on 54.716 54.716 EndTransaction diff --git a/mockdata/TestDecryptRSA/RSA/1024/yk-5.4.3 b/mockdata/TestDecryptRSA/RSA-1024/yk-5.4.3 similarity index 100% rename from mockdata/TestDecryptRSA/RSA/1024/yk-5.4.3 rename to mockdata/TestDecryptRSA/RSA-1024/yk-5.4.3 diff --git a/mockdata/TestDecryptRSA/RSA-1024/yk-5.7.1 b/mockdata/TestDecryptRSA/RSA-1024/yk-5.7.1 new file mode 100644 index 0000000..70a7547 --- /dev/null +++ b/mockdata/TestDecryptRSA/RSA-1024/yk-5.7.1 @@ -0,0 +1,23 @@ +mockfile + +file version v3 +file created 2024-06-05T19:09:44+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.153 0.153 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.229 1.229 Transmit 00fd0000 0507019000 +on 2.463 2.463 Transmit 00f7009b 01010a020200010501019000 +on 3.927 3.927 Transmit 00870a9b047c028000 7c128010e4a1b1c985bed81e66767c8702a74c919000 +on 5.718 5.718 Transmit 00870a9b267c24801015ad57c80d0b6731439734a71680fca08110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 7.536 7.536 Transmit 0047009a0bac09800106aa0101ab0101 7f498188818180c32431da38f307c30a8da6480257c0865325e15b8932bed5fb519816c5c2b40744964549e8e7b9d3609d3422c0bf98af552ba93d3797a3be3c40eb66c4ec302e4d68d71c4ffecbb76f8ee58ca720c14b843392d7404809579fb3fbb9b5ddb0ae2799ef03bc6eed2a79d373341020f1381cfe073f07927e7aa9905bcd4fde996782030100019000 +on 627.160 627.160 Transmit 0087069a887c818582008181809880578fe64b41561174c6a8e12c1f424f91dc4bb3c92c1d0dc4ab16fc48e54367c08a32c87ea9a070aacc4a9e33ad6bcae70cf57b71f32c34eebe94459d9a1ec9aace535b24a73b7cfaabab20eb72efaf0e804e8ce33118c136e20181b28d0784aabda718192db162efe0bbc24e52cb7c4bf1941373afdd572e1c434db0162f 7c81838281800002abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab0068656c6c6f9000 +on 692.793 692.793 EndTransaction diff --git a/mockdata/TestDecryptRSA/RSA/2048/yk-5.4.3 b/mockdata/TestDecryptRSA/RSA-2048/yk-5.4.3 similarity index 100% rename from mockdata/TestDecryptRSA/RSA/2048/yk-5.4.3 rename to mockdata/TestDecryptRSA/RSA-2048/yk-5.4.3 diff --git a/mockdata/TestDecryptRSA/RSA-2048/yk-5.7.1 b/mockdata/TestDecryptRSA/RSA-2048/yk-5.7.1 new file mode 100644 index 0000000..d79b3c1 --- /dev/null +++ b/mockdata/TestDecryptRSA/RSA-2048/yk-5.7.1 @@ -0,0 +1,24 @@ +mockfile + +file version v3 +file created 2024-06-05T19:09:49+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state specific,present,powered +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.171 0.171 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.095 1.095 Transmit 00fd0000 0507019000 +on 2.335 2.335 Transmit 00f7009b 01010a020200010501019000 +on 3.745 3.745 Transmit 00870a9b047c028000 7c1280103a9c1dd3d48e30115267bb035e0be1519000 +on 5.480 5.480 Transmit 00870a9b267c248010916142aa0ee82bc53a07b722275c60128110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 7.487 7.487 Transmit 0047009a0bac09800107aa0101ab0101 7f4982010981820100a394d7273a904fff0ebbfc5949ddd64c3f1acc4b69f6161ead87ab58d54f19336babbfc0e93eff85c0c73e2600b31a63231ee5f4323f472072219167be6bdaf41b6592c7b307f213c048d504e3fe092d7f5ab75537afc7ec27af1456ebd0154cd687da3390e40015a4dd630f251eda600d5263052642b6a348be69c07707f4b3015e4bab964c727300b2c9f91b87f3c3d7ebedcb9e4f0b732fa56088c3a70fb1fd6901649e35bb887bc1e89ad229038bb4c785a769b0afbfb09b6f7cf8d17d78202be89912dcff195f2d97bf071c19b44b36bd3d1cff5e2227ca83482e5206b53f60109f67dcf3817b63459c8e9667670b630938e18e9f610e +on 4654.068 4654.068 Transmit 00c00000 8cd21911c16979ba5f82030100019000 +on 4655.574 4655.574 Transmit 0087079a00010a7c820106820081820100770ba29de4c1d8d921e2f3682ee913e69fa7d119445ee69d9ca03114e87686ecf450ffb518106d4bd84a6de5e7bac26e847a33e0911dcdb92f2164afb19c3f69dfec6ebb69c3fec3c668e42452c7781c2e2649c081536b2c29cb3c9e28d7a762462379c8e0a2c7a295d759fdff2ae3740baee6431a9e7370d2b1c85c5af87f2b0b759c64978bc02c6c8a9b9531990ee482191fe145bbec83e7bd5105abe38c151731bf38e111e6fa2e370e5b0c41a1a5cdf5139385ead68e1557ce5f03162f88c7750f11c498cdd0303da752510c885bdc55717f764845c75c8a9ecd89f47ab2d24cd7b456bf096c22741aeef041175433395ff4434f78bca78ba244bb6c63dc 7c820104828201000002abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab0068656c6c6f9000 +on 4826.950 4826.950 EndTransaction diff --git a/mockdata/TestDecryptRSA/RSA-3072/yk-5.7.1 b/mockdata/TestDecryptRSA/RSA-3072/yk-5.7.1 new file mode 100644 index 0000000..c07a67c --- /dev/null +++ b/mockdata/TestDecryptRSA/RSA-3072/yk-5.7.1 @@ -0,0 +1,24 @@ +mockfile + +file version v3 +file created 2024-06-05T19:10:00+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.169 0.169 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.053 1.053 Transmit 00fd0000 0507019000 +on 2.444 2.444 Transmit 00f7009b 01010a020200010501019000 +on 4.100 4.100 Transmit 00870a9b047c028000 7c128010c1ebbda517bf3725aca0dc29537c9a9c9000 +on 6.201 6.201 Transmit 00870a9b267c248010f4cde2f507d9f74172a72a01515881fc8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 8.120 8.120 Transmit 0047009a0bac09800105aa0101ab0101 7f4982018981820180e24125bb702bb841b39f0b63c1c224d40ac46e619c9369273093a336bf458f3830221f6ca5447d403e7e23f2b04300baa25c6e9f3e3781380a301e268c94a9ee07cd2ee3cc516c21cc23925c6eff8919c41a7c9bbc67b73d88d53629dca08b1b7e83b15fbb94bbceda44fc5c4420a255f059995d915496dc4be9c498b49157fc9b7db8a0f74a13b23548e93a93584104f98d7ab307614e66ccd536f19bb69635978ca562a7a66d91c346e1e11f834f96c7ead1db33769109447ae74cc9ff08734fdcb0e31ac734554a41112bcf326a3fc2e536c5a56717a678fe27a213b2f08c9bcf245581f7cb49228c5f6cf7f9e58339613ea1774a06618e +on 9808.267 9808.267 Transmit 00c00000 cb151c70bc8d6a0e87b63281c2101395e1e283afb7dd6494954be0dc5a06f9f0e52c49dd9de2223e2acbea4b8651c3ff3370880b9422feb98f7def04dcc125aa7168ce4b23bf8d448514977867df40d5224e20318b31161e2bb6ceddfea84a16e58ab1804460b83a57787296a3134b1125fad85af8f44dd9dd399f6fc1a5dcb90f73285d5c973394f982030100019000 +on 9809.578 9809.578 Transmit 0087059a00018a7c82018682008182018068873f220361cb6bd68828485b9f4822e3a4811d90125fd28635fbf10d3ec3b66ecba9dfdefb38b2e55a481716bd6f741ed6fea74779850ff07769dd35b5bd4d421c716a2f80d62cdfb878eb7955bf706ac567d2c3f13dc609a4797b3d8a84b026b362117f22da73638c4e6661cb54124375eb8c7c9af08c22ba9475c1e5aacf7bf65481fd7e7f0c41689b32dcfeded12851b7568892abac08136aafc206aa085689eccf8efff8e78fe054c0abfc52cb56abfea3fd0bf4b9ff3ea0625a95653863d5a25713904da6bb4a571f7c51e668d1838e78cf8ac64454bcdead9cce93d0ad641ce06e24d0ecda4a9f547b33a8559bc5ca49b5802fd6e12d24155b1cee284d3e37e7c481b456548c8f80641bed77013484739ba78b02d606ec6b6f3b50529dcc8659105a4df35c3e4806c84a4e91df905c67ef7d948b68c59841fdc6d73e68d209174f780b89c179498c1fe253a31077ee10a3d80d65c1ae4c91ce98f7d3f03a52a754d0ace10b04b8a6e04d91cf68323a6790aaa4608f7bd3b05dd0946e 7c820184828201800002abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab0068656c6c6f9000 +on 10549.663 10549.663 EndTransaction diff --git a/mockdata/TestDecryptRSA/RSA-4096/yk-5.7.1 b/mockdata/TestDecryptRSA/RSA-4096/yk-5.7.1 new file mode 100644 index 0000000..db7176a --- /dev/null +++ b/mockdata/TestDecryptRSA/RSA-4096/yk-5.7.1 @@ -0,0 +1,25 @@ +mockfile + +file version v3 +file created 2024-06-05T19:11:08+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state specific,present,powered +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.121 0.121 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.020 1.020 Transmit 00fd0000 0507019000 +on 2.300 2.300 Transmit 00f7009b 01010a020200010501019000 +on 3.734 3.734 Transmit 00870a9b047c028000 7c128010cb56a42ce195df2060eb182b04b628739000 +on 5.612 5.612 Transmit 00870a9b267c2480105e28b705ef03f921b447eb3a2dfbee5e8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 7.446 7.446 Transmit 0047009a0bac09800116aa0101ab0101 7f4982020981820200b4573e6c176ea33e02a5b5d228a23e8d59752e670804d7c9fe30b93d26878b24e30c6fc3241e71260dbebd00c03f5c03d664b41fc2e2d41ab1df3ac95ccb94279a0b5b37d8d34b0fcfdd4369654ec2a9e5f0ec4a72e613ce1222f88e305511a470703ff7b7aac76c7f28941db7fcbd648d81fa31d1f7f55e9dd4391b9b8b0a746ecc11c473228a279026d0e9d81bae1ef808756b752c007a744eaab41e174de21b9d26df81f3c95dff5bc7a99530172c9a25085bcda6e32cb2f09a31af2d6a1f264b4b357c659f0a8ec03f64b2e75692d266190bfdb66e64989dbc026f7cf03be3598223e619ae51372cc3f7424d663051d0da2a2331ca6100 +on 66669.646 66669.646 Transmit 00c00000 0e7695664443e82aeebae41ce30a51971a37f5366b46e686779cbd41d8218df7a40bb5acbde52746919342aa24a912d6493849e87f8bc3680f8120596ec56ff025d449d491bebf56c6b9c0f9272306c330bb61bf31b6531c13dcf2fb31678f348a491dfd01361ea47cdc428bfbc2d0e1ac6124eb33a3cd0aca7697c818c93dfdb47ca07bb9aaa766a7d3195d283a9ba51757f6e0998913d05f3015629a536812cb67fde21194e57207f11e00832d47c9a506d7c09e46f861b437267cb2c3645ca7cf2d331a921fb09018f26890c63510e6acc56fdb949b00de06e9b62cd4bd2c188735c66986234643b92fdd25a8f468bf7590098b10f035f15dc112045c85d9610e +on 66671.633 66671.633 Transmit 00c00000 55123399226ceef10782030100019000 +on 66673.257 66673.257 Transmit 0087169a00020a7c82020682008182020076a2b0d0874f6c421e125b5c51e2811971523cd4694f8743b5c0b32d78cbc2fb94b92885b53953ecb0e0714c874f34abd19e324a4ac652da5f87a8ad09b02b93e784e7feecc27f8076396b8138f20543325f8d09670df0fa7614d9fb4348c55914be86a317f0a9c9e937c17c5a8364e749edbcd9a96c940c5f90b8b5b5ec06ce61b0079c42ba0aa54b066b05da12ba3ef746b3087745398e8367c9dca4a391c2365dfd03804389e803f5127562523c8dfb448a5098c1fdcf14855f8be9f6e17a41c731b5ce67d283e115f378798c1ee2513835cb65d446b55a48f97f683ef54748063fe159645c4e75c4bfccc30d88976a02363335461085837bbf4f4e86243e60c9597f02eed96badd514a9e89d57c36c012ec4ec66e39ae397cd00a7414c336abaff8d978334bfa2cb5c6fe36812d6e2ae5665407ad0fe4dc699be9e1d7b535704a095db3bb93192200b01d4392323bd427517cfa33395dc3c66b9279033fc356172c4b2f45802aa59be1205261056d1b84a5bda05c0a54e79093fba35bc7d30198059e3cb9099e0c8d33fbd73357fca3fbf007475da0e41d16ff3fc2cc3bc1f3035546a22f7228feeeadaa9a251a83829cedd2703de7e1fa520430eaac0778824468826182e15147033021d0a9f1532617bd9c6e9aff566a0564efe74eccd98bb0dd15abc4bde6d61b009a20e6e84eba113ba39899a7633572131698ae8bd 7c820204828202000002abababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababababab0068656c6c6f9000 +on 67837.428 67837.428 EndTransaction diff --git a/mockdata/TestDeleteKey/yk-5.7.1 b/mockdata/TestDeleteKey/yk-5.7.1 new file mode 100644 index 0000000..46baff7 --- /dev/null +++ b/mockdata/TestDeleteKey/yk-5.7.1 @@ -0,0 +1,39 @@ +mockfile + +file version v3 +file created 2024-06-11T12:20:49+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state powered,specific,present +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.167 0.167 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.857 1.857 Transmit 00fd0000 0507019000 +on 3.250 3.250 Transmit 00200080083631353832323531 63c2 +on 8.958 8.958 Transmit 00200080083631353832323531 63c1 +on 14.687 14.687 Transmit 00200080083631353832323531 6983 +on 20.569 20.569 Transmit 002400811036313538323235313631353832323531 63c2 +on 26.336 26.336 Transmit 002400811036313538323235313631353832323531 63c1 +on 31.856 31.856 Transmit 002400811036313538323235313631353832323531 6983 +on 37.672 37.672 Transmit 00fb0000 9000 +on 944.691 944.691 Transmit 00f7009b 01010a020200010501019000 +on 946.224 946.224 Transmit 00870a9b047c028000 7c128010f0bd7ad5c8b136505e2caf6feecefe469000 +on 948.161 948.161 Transmit 00870a9b267c248010ee93fcd012a4b10e73b3639cf023238c8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 950.338 950.338 Transmit 00f6ff9a 6a88 +on 951.959 951.959 Transmit 00f7009b 01010a020200010501019000 +on 953.293 953.293 Transmit 00870a9b047c028000 7c1280108a56eb290b3b1bbc4cf910c0862f7fb49000 +on 955.222 955.222 Transmit 00870a9b267c24801028eac647db08b4a14fc49c14bbc375758110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 957.241 957.241 Transmit 0047009a0bac09800106aa0101ab0101 7f498188818180e7b30306e29e316b6455686086ae903ff9f54381567cbe71812e148d2505706abe504c61a7be0bbe8f5942b670baff8285cc6cee2edbc5444f20035c859b26863892f398170fc8c07162afc5b66201b959453781ce8fc65715f468cc117b2ee52ce0f21d1da1739cd531663cdd787a7acdc12a95111ccfc1eba735dc699de8c382030100019000 +on 1489.498 1489.498 Transmit 00f7009a 01010602020101030101048188818180e7b30306e29e316b6455686086ae903ff9f54381567cbe71812e148d2505706abe504c61a7be0bbe8f5942b670baff8285cc6cee2edbc5444f20035c859b26863892f398170fc8c07162afc5b66201b959453781ce8fc65715f468cc117b2ee52ce0f21d1da1739cd531663cdd787a7acdc12a95111ccfc1eba735dc699de8c382030100019000 +on 1492.060 1492.060 Transmit 00f7009b 01010a020200010501019000 +on 1493.773 1493.773 Transmit 00870a9b047c028000 7c12801023513b4be2e32981446aac0027b83e979000 +on 1495.858 1495.858 Transmit 00870a9b267c2480106a743dc95c0f1c337be1e7dbcb9993ac8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 1497.803 1497.803 Transmit 00f6ff9a 9000 +on 1532.605 1532.605 Transmit 00f7009a 6a88 +on 1534.000 1534.000 EndTransaction diff --git a/mockdata/TestGenerateKey/EC/P256/yk-5.4.3 b/mockdata/TestGenerateKey/P-256/yk-5.4.3 similarity index 100% rename from mockdata/TestGenerateKey/EC/P256/yk-5.4.3 rename to mockdata/TestGenerateKey/P-256/yk-5.4.3 diff --git a/mockdata/TestGenerateKey/P-256/yk-5.7.1 b/mockdata/TestGenerateKey/P-256/yk-5.7.1 new file mode 100644 index 0000000..b82d32b --- /dev/null +++ b/mockdata/TestGenerateKey/P-256/yk-5.7.1 @@ -0,0 +1,22 @@ +mockfile + +file version v3 +file created 2024-06-05T19:14:12+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state specific,present,powered +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.154 0.154 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.967 0.967 Transmit 00fd0000 0507019000 +on 2.178 2.178 Transmit 00f7009b 01010a020200010501019000 +on 3.781 3.781 Transmit 00870a9b047c028000 7c1280100000df3555c9c4627a022bfde1703e139000 +on 5.660 5.660 Transmit 00870a9b267c248010eeb0dbab8ababf8d933ae441322850988110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 7.588 7.588 Transmit 0047009a0bac09800111aa0101ab0101 7f4943864104ab9b9e13b3c9e11202aedcd244f83f904819d7d99e2d5b5f9ff021bcf4847368eba4b3709b765d1cb4534fb11d1a9d97178033bfc17c22a8f9af8f02709f04299000 +on 423.939 423.939 EndTransaction diff --git a/mockdata/TestGenerateKey/EC/P384/yk-5.4.3 b/mockdata/TestGenerateKey/P-384/yk-5.4.3 similarity index 100% rename from mockdata/TestGenerateKey/EC/P384/yk-5.4.3 rename to mockdata/TestGenerateKey/P-384/yk-5.4.3 diff --git a/mockdata/TestGenerateKey/P-384/yk-5.7.1 b/mockdata/TestGenerateKey/P-384/yk-5.7.1 new file mode 100644 index 0000000..f4e5778 --- /dev/null +++ b/mockdata/TestGenerateKey/P-384/yk-5.7.1 @@ -0,0 +1,22 @@ +mockfile + +file version v3 +file created 2024-06-11T12:24:24+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.078 0.078 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.639 1.639 Transmit 00fd0000 0507019000 +on 2.949 2.949 Transmit 00f7009b 01010a020200010501019000 +on 4.260 4.260 Transmit 00870a9b047c028000 7c128010fc0073bde07cba58da50abfe97d9dcb39000 +on 6.021 6.021 Transmit 00870a9b267c248010be9cc95e3b2ac4f68efb445d56422b6b8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 7.837 7.837 Transmit 0047009a0bac09800114aa0101ab0101 7f4963866104a39a434a3ef812ee2793bb0a5df9fb65452da4cee3694c8dd4aad16f5b96c2dc9e55e87677dc659658c3ee0f5143dd3ed7f2e3911b520186e5f280e2ab462a1d809f8e79b533aca12234c1b97eab8749d4a371c05fbe3f629a1b75a68dd676689000 +on 744.735 744.735 EndTransaction diff --git a/mockdata/TestGenerateKey/RSA/1024/yk-5.4.3 b/mockdata/TestGenerateKey/RSA-1024/yk-5.4.3 similarity index 100% rename from mockdata/TestGenerateKey/RSA/1024/yk-5.4.3 rename to mockdata/TestGenerateKey/RSA-1024/yk-5.4.3 diff --git a/mockdata/TestGenerateKey/RSA-1024/yk-5.7.1 b/mockdata/TestGenerateKey/RSA-1024/yk-5.7.1 new file mode 100644 index 0000000..2826d4f --- /dev/null +++ b/mockdata/TestGenerateKey/RSA-1024/yk-5.7.1 @@ -0,0 +1,22 @@ +mockfile + +file version v3 +file created 2024-06-11T12:24:25+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.099 0.099 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.574 1.574 Transmit 00fd0000 0507019000 +on 2.893 2.893 Transmit 00f7009b 01010a020200010501019000 +on 4.086 4.086 Transmit 00870a9b047c028000 7c128010055a5a8fbebd507530420e6f122fd3619000 +on 5.771 5.771 Transmit 00870a9b267c2480107fed1018ae91f2561fe9bf10d87dff148110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 7.704 7.704 Transmit 0047009a0bac09800106aa0101ab0101 7f498188818180e38fb930c058961eb173d06297ec87dca0036472f724b3c7524ace575ef48446a3428cb301f115eda5334d101e17ead2c8f30f1917481f8e3350843812006b247ab99991d2d9b77d970b586989fcee4cc6bda06267ec1ccc2e7319bec10b11ead1409c4ed8f12d6bda9be39f1d3865cb78d3798d090e992a6fb0483d51488cc382030100019000 +on 955.774 955.774 EndTransaction diff --git a/mockdata/TestGenerateKey/RSA/2048/yk-5.4.3 b/mockdata/TestGenerateKey/RSA-2048/yk-5.4.3 similarity index 100% rename from mockdata/TestGenerateKey/RSA/2048/yk-5.4.3 rename to mockdata/TestGenerateKey/RSA-2048/yk-5.4.3 diff --git a/mockdata/TestGenerateKey/RSA-2048/yk-5.7.1 b/mockdata/TestGenerateKey/RSA-2048/yk-5.7.1 new file mode 100644 index 0000000..1b80424 --- /dev/null +++ b/mockdata/TestGenerateKey/RSA-2048/yk-5.7.1 @@ -0,0 +1,23 @@ +mockfile + +file version v3 +file created 2024-06-11T12:24:27+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.139 0.139 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.764 1.764 Transmit 00fd0000 0507019000 +on 2.802 2.802 Transmit 00f7009b 01010a020200010501019000 +on 4.231 4.231 Transmit 00870a9b047c028000 7c1280101a0743b722c0f1048bb7559ebe27ac9c9000 +on 6.166 6.166 Transmit 00870a9b267c2480102622bccccd987e3aa5f0c66450317e168110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 8.150 8.150 Transmit 0047009a0bac09800107aa0101ab0101 7f49820109818201009fe3f90f7e4cad74664c355b7b605e5a2b75dc0bf6eff28510a88870c11310ceb2d967de6357efaeb111df9632c60e42afb4ef0516b30e6ad8ecc4143c1d7f365f3b6c06b7096ae91c6912d82326a57f3103a9ea054a1cd13861e97a2653ac7f060a38e3e956c7b63cb2054f3b54bff7fecf20e9c7ca9f01e1698b1be06cdcfb0b1e5bd3bec5e2e23ce3386c86858276da2f930201573fa95bbf7e351bad8f901134e904c81e94d7123348218a5b3657324143b10bb4a7e6c5e321be90eaa8621a701463ab0aef90c8a7cd0e88faa6a0f8199bb289e8bf8cb8c12c45cc614f3121182a0e287f4b4572b40252501f3fae6e06382b257744610e +on 1564.390 1564.390 Transmit 00c00000 14e897a15e3b0ca1bd82030100019000 +on 1568.064 1568.064 EndTransaction diff --git a/mockdata/TestGenerateKey/RSA-3072/yk-5.7.1 b/mockdata/TestGenerateKey/RSA-3072/yk-5.7.1 new file mode 100644 index 0000000..eeaa139 --- /dev/null +++ b/mockdata/TestGenerateKey/RSA-3072/yk-5.7.1 @@ -0,0 +1,23 @@ +mockfile + +file version v3 +file created 2024-06-11T12:24:34+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state specific,present,powered +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.129 0.129 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.772 1.772 Transmit 00fd0000 0507019000 +on 3.331 3.331 Transmit 00f7009b 01010a020200010501019000 +on 4.525 4.525 Transmit 00870a9b047c028000 7c128010575bd83159dbb506cf53d9a135e1bd3f9000 +on 6.340 6.340 Transmit 00870a9b267c248010d362b4d455d21b63828350554ca2741d8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 8.348 8.348 Transmit 0047009a0bac09800105aa0101ab0101 7f4982018981820180a7fab0e1fbc94a2f4765401aa4ecc69c1f5d934868979f868da6b57a0e14965bb1e2cc5ec9e60f014011287e19a170d9130022f864744f510805983cb62c3828fca320ef7a2ef426cd45aaf1696ea6ca3d1f1a7c2c8daafde3d08f9f21be1d94361fe76a38933380feafc7c14ce5aaa571cb93226b5c1f7618ce31224ff073c0fd40b6accf5633e22371ab93ddda99da0e889f651000c2e2eac32b66ae2d333d9fe56378afe7cfc94f18d6f80ee13d4fb8ba59b18246d0d8341d5b404020fea3b6803d2996a09b1dd74f8ad19a00a847e39a648c68136d347b81e7377399beabfe67e59807bbce8e35d78efd6a753e86f76d2e9cc6aa95618e +on 7500.152 7500.152 Transmit 00c00000 c623e3fdc9da18aca79f150130c664dc8dc04e59187dead4ce0f180412476bc14522e51467cb107b45a345d714a0d09e45d713fd2880b55d9715838fd2f28cb17e482194ecdea0ab22049677144ecc4be74456a73f141a9112af58f5f601e456c2e699e2eb5b18480790f04faf7468c995399f6189b9a53301197076e8669e046a436801ac87fa3fc582030100019000 +on 7501.437 7501.437 EndTransaction diff --git a/mockdata/TestGenerateKey/RSA-4096/yk-5.7.1 b/mockdata/TestGenerateKey/RSA-4096/yk-5.7.1 new file mode 100644 index 0000000..c45267c --- /dev/null +++ b/mockdata/TestGenerateKey/RSA-4096/yk-5.7.1 @@ -0,0 +1,24 @@ +mockfile + +file version v3 +file created 2024-06-11T12:25:11+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.129 0.129 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.932 1.932 Transmit 00fd0000 0507019000 +on 3.401 3.401 Transmit 00f7009b 01010a020200010501019000 +on 4.906 4.906 Transmit 00870a9b047c028000 7c128010770a2f9ab9a153e61aa5b5a04389f8399000 +on 6.731 6.731 Transmit 00870a9b267c248010ef08298ce6d794bfae5b19da030352588110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 8.490 8.490 Transmit 0047009a0bac09800116aa0101ab0101 7f4982020981820200d33b2c007935bd0819c284fd4596d081f4e31ad9214eeab092795a929ee31551e51da031775aba61de22013258af50aec583ffef15159f33f56c89577dc7313370330264da4bdb418ee60933226c0e7bd0738af3b536736232e1a9c937248eee3cabdc16be2dcc65f9af13e18b6b4a8ba61f4df73be4780e57ca3b84d809cef77851b699cfca76970d373aafdc7d93d6a14fcbc8651247088f5fe9c60fd0d38776e6ce457222daa3d592ed9aec6c6c89b7468914e5d55f461d0d20bd3f8c1add96fb59aa87207a95003710f2e9ab4060168f90c6d5935efa50bc63e78f7761b1af3ffde6005c774429cc75ed0d8b82984c5dd433a6ff376100 +on 36671.935 36671.935 Transmit 00c00000 57d66aff5bccd98a1e29c402b41e06b06135fad7b71a9b65747f4ecbc2a14322186d591762843df8f905bb9f545cdbe69a4b91cfad2f01150219b3c31a8acbaee094c61e71883a3bb6ca340de5e24cf1f8ccc75345cf0a75c7e60bd6b11d3b9d784bb1ebad4b6c0109b59c2b25d72f01654da64ce69be61f9c3de996f7d20e741aa84fd93350ae2d51d7239f89e930979a70b86a5fed6cbcd7f90f1bea8526e725e208756908dc7009723d66630b32524c9829894ad9c62935f41a9bb4f4eb3b767bc51cbd61a6dcfea1eb01ccdbe2c4f1fe2b5f4b0d202aa9a22236af20449370025132d922a83378401f7bdb08fe1d4ba9bad35d4f204ad508b35d42842f2b610e +on 36673.048 36673.048 Transmit 00c00000 705e64c1540b24b28d82030100019000 +on 36673.672 36673.672 EndTransaction diff --git a/mockdata/TestGetVersion/yk-5.7.1 b/mockdata/TestGetVersion/yk-5.7.1 new file mode 100644 index 0000000..586dd69 --- /dev/null +++ b/mockdata/TestGetVersion/yk-5.7.1 @@ -0,0 +1,18 @@ +mockfile + +file version v3 +file created 2024-06-11T12:21:10+02:00 +file creator stv0g@cam + +meta status.active_protocol any,t1 +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.131 0.131 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.016 1.016 Transmit 00fd0000 0507019000 +on 2.202 2.202 EndTransaction diff --git a/mockdata/TestLogin/yk-5.7.1 b/mockdata/TestLogin/yk-5.7.1 new file mode 100644 index 0000000..2d650b9 --- /dev/null +++ b/mockdata/TestLogin/yk-5.7.1 @@ -0,0 +1,19 @@ +mockfile + +file version v3 +file created 2024-06-05T18:39:22+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state specific,present,powered +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.062 0.062 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.713 0.713 Transmit 00fd0000 0507019000 +on 1.826 1.826 Transmit 0020008008313233343536ffff 9000 +on 11.725 11.725 EndTransaction diff --git a/mockdata/TestLoginNeeded/yk-5.7.1 b/mockdata/TestLoginNeeded/yk-5.7.1 new file mode 100644 index 0000000..986dbaa --- /dev/null +++ b/mockdata/TestLoginNeeded/yk-5.7.1 @@ -0,0 +1,21 @@ +mockfile + +file version v3 +file created 2024-06-05T18:39:22+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.099 0.099 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.651 1.651 Transmit 00fd0000 0507019000 +on 2.718 2.718 Transmit 00200080 63c3 +on 3.989 3.989 Transmit 0020008008313233343536ffff 9000 +on 13.775 13.775 Transmit 00200080 9000 +on 15.276 15.276 EndTransaction diff --git a/mockdata/TestMetadata/EC/P256/Generated/yk-5.4.3 b/mockdata/TestMetadata/ECC/P256/Generated/yk-5.4.3 similarity index 100% rename from mockdata/TestMetadata/EC/P256/Generated/yk-5.4.3 rename to mockdata/TestMetadata/ECC/P256/Generated/yk-5.4.3 diff --git a/mockdata/TestMetadata/ECC/P256/Generated/yk-5.7.1 b/mockdata/TestMetadata/ECC/P256/Generated/yk-5.7.1 new file mode 100644 index 0000000..11454b4 --- /dev/null +++ b/mockdata/TestMetadata/ECC/P256/Generated/yk-5.7.1 @@ -0,0 +1,30 @@ +mockfile + +file version v3 +file created 2024-06-05T18:41:37+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.128 0.128 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.680 1.680 Transmit 00fd0000 0507019000 +on 3.002 3.002 Transmit 00200080083631353832323531 63c2 +on 8.811 8.811 Transmit 00200080083631353832323531 63c1 +on 14.467 14.467 Transmit 00200080083631353832323531 6983 +on 20.277 20.277 Transmit 002400811036313538323235313631353832323531 63c2 +on 26.048 26.048 Transmit 002400811036313538323235313631353832323531 63c1 +on 32.031 32.031 Transmit 002400811036313538323235313631353832323531 6983 +on 37.838 37.838 Transmit 00fb0000 9000 +on 976.918 976.918 Transmit 00f7009b 01010a020200010501019000 +on 978.700 978.700 Transmit 00870a9b047c028000 7c128010b43003115db91dbdb634fabdafed8aa29000 +on 980.706 980.706 Transmit 00870a9b267c24801024996d70eb4a2e0d48149d2ea1f939358110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 982.887 982.887 Transmit 0047009a0bac09800111aa0101ab0101 7f4943864104beee13582040532ac76ed347f9f93077882a2ca4ce80ea44c086e77a2ea32f3db60e576437933a10d684b8ff7d0fc3108646604c87f29c68bed8a1c4f76ebbb19000 +on 1400.074 1400.074 Transmit 00f7009a 010111020201010301010443864104beee13582040532ac76ed347f9f93077882a2ca4ce80ea44c086e77a2ea32f3db60e576437933a10d684b8ff7d0fc3108646604c87f29c68bed8a1c4f76ebbb19000 +on 1402.494 1402.494 EndTransaction diff --git a/mockdata/TestMetadata/EC/P256/Imported/yk-5.4.3 b/mockdata/TestMetadata/ECC/P256/Imported/yk-5.4.3 similarity index 100% rename from mockdata/TestMetadata/EC/P256/Imported/yk-5.4.3 rename to mockdata/TestMetadata/ECC/P256/Imported/yk-5.4.3 diff --git a/mockdata/TestMetadata/ECC/P256/Imported/yk-5.7.1 b/mockdata/TestMetadata/ECC/P256/Imported/yk-5.7.1 new file mode 100644 index 0000000..36a1063 --- /dev/null +++ b/mockdata/TestMetadata/ECC/P256/Imported/yk-5.7.1 @@ -0,0 +1,30 @@ +mockfile + +file version v3 +file created 2024-06-05T18:43:08+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state specific,present,powered +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.118 0.118 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.955 1.955 Transmit 00fd0000 0507019000 +on 3.155 3.155 Transmit 00200080083631353832323531 63c2 +on 9.109 9.109 Transmit 00200080083631353832323531 63c1 +on 14.970 14.970 Transmit 00200080083631353832323531 6983 +on 20.932 20.932 Transmit 002400811036313538323235313631353832323531 63c2 +on 26.930 26.930 Transmit 002400811036313538323235313631353832323531 63c1 +on 32.728 32.728 Transmit 002400811036313538323235313631353832323531 6983 +on 38.614 38.614 Transmit 00fb0000 9000 +on 968.069 968.069 Transmit 00f7009b 01010a020200010501019000 +on 970.908 970.908 Transmit 00870a9b047c028000 7c1280103ce48188833c3461a97b9b933e6be6709000 +on 972.828 972.828 Transmit 00870a9b267c2480101f079c84c48260df79524b7049c206918110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 983.078 983.078 Transmit 00fe119a28aa0101ab01010620abb99aa407630fc409b92395e750daa05936ce1186cdcf33436af8d3e5398b92 9000 +on 1401.462 1401.462 Transmit 00f7009a 010111020201010301020443864104e05229fc45795dbdb2e1863ad6ea701a47c18cc7664d50269b619662643052b1e316c0f31f492ac998b3677262c0c593f47765b6c5ad60b569348e380c1dd5bc9000 +on 1403.825 1403.825 EndTransaction diff --git a/mockdata/TestMetadata/EC/P384/Generated/yk-5.4.3 b/mockdata/TestMetadata/ECC/P384/Generated/yk-5.4.3 similarity index 100% rename from mockdata/TestMetadata/EC/P384/Generated/yk-5.4.3 rename to mockdata/TestMetadata/ECC/P384/Generated/yk-5.4.3 diff --git a/mockdata/TestMetadata/ECC/P384/Generated/yk-5.7.1 b/mockdata/TestMetadata/ECC/P384/Generated/yk-5.7.1 new file mode 100644 index 0000000..06dfe93 --- /dev/null +++ b/mockdata/TestMetadata/ECC/P384/Generated/yk-5.7.1 @@ -0,0 +1,30 @@ +mockfile + +file version v3 +file created 2024-06-05T18:41:38+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state specific,present,powered +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.247 0.247 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 2.222 2.222 Transmit 00fd0000 0507019000 +on 3.776 3.776 Transmit 00200080083631353832323531 63c2 +on 9.780 9.780 Transmit 00200080083631353832323531 63c1 +on 15.830 15.830 Transmit 00200080083631353832323531 6983 +on 21.575 21.575 Transmit 002400811036313538323235313631353832323531 63c2 +on 27.400 27.400 Transmit 002400811036313538323235313631353832323531 63c1 +on 33.211 33.211 Transmit 002400811036313538323235313631353832323531 6983 +on 39.025 39.025 Transmit 00fb0000 9000 +on 917.827 917.827 Transmit 00f7009b 01010a020200010501019000 +on 919.620 919.620 Transmit 00870a9b047c028000 7c128010327ac09ec9a78de5f3a605e41f50f4799000 +on 921.843 921.843 Transmit 00870a9b267c2480103c6453c9a7a7d8a6d3deca9f9de7979b8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 923.923 923.923 Transmit 0047009a0bac09800114aa0101ab0101 7f49638661040d675b1e6068ad5ffa268512d756b759f06cc27c0cc84e0c96c8aa62575ca3888a7026e3a6aa95db1302de8a339c0c0fb158a6abeb7459c0637861435964b0c3a73102361aa25972919c127238ceb8fe1ad298b5883f1934179aa760185f18c89000 +on 1660.148 1660.148 Transmit 00f7009a 0101140202010103010104638661040d675b1e6068ad5ffa268512d756b759f06cc27c0cc84e0c96c8aa62575ca3888a7026e3a6aa95db1302de8a339c0c0fb158a6abeb7459c0637861435964b0c3a73102361aa25972919c127238ceb8fe1ad298b5883f1934179aa760185f18c89000 +on 1662.572 1662.572 EndTransaction diff --git a/mockdata/TestMetadata/EC/P384/Imported/yk-5.4.3 b/mockdata/TestMetadata/ECC/P384/Imported/yk-5.4.3 similarity index 100% rename from mockdata/TestMetadata/EC/P384/Imported/yk-5.4.3 rename to mockdata/TestMetadata/ECC/P384/Imported/yk-5.4.3 diff --git a/mockdata/TestMetadata/ECC/P384/Imported/yk-5.7.1 b/mockdata/TestMetadata/ECC/P384/Imported/yk-5.7.1 new file mode 100644 index 0000000..80c8e72 --- /dev/null +++ b/mockdata/TestMetadata/ECC/P384/Imported/yk-5.7.1 @@ -0,0 +1,30 @@ +mockfile + +file version v3 +file created 2024-06-05T18:43:09+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state specific,present,powered +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.116 0.116 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.854 1.854 Transmit 00fd0000 0507019000 +on 3.083 3.083 Transmit 00200080083631353832323531 63c2 +on 8.897 8.897 Transmit 00200080083631353832323531 63c1 +on 14.873 14.873 Transmit 00200080083631353832323531 6983 +on 20.796 20.796 Transmit 002400811036313538323235313631353832323531 63c2 +on 26.921 26.921 Transmit 002400811036313538323235313631353832323531 63c1 +on 33.370 33.370 Transmit 002400811036313538323235313631353832323531 6983 +on 39.423 39.423 Transmit 00fb0000 9000 +on 998.828 998.828 Transmit 00f7009b 01010a020200010501019000 +on 1000.924 1000.924 Transmit 00870a9b047c028000 7c1280105d1b82eaacb2d4e96ba555dc6a8c17b69000 +on 1007.314 1007.314 Transmit 00870a9b267c248010491edfda7cd92fc52f757d31c97917128110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 1010.304 1010.304 Transmit 00fe149a38aa0101ab01010630fb5db2aebfa6332e48ec2bc6626e9020df45e4374eacc1abe18af7e11325de1e810a6cf7fc2e27dbe4f34f5803fd7f31 9000 +on 1750.418 1750.418 Transmit 00f7009a 01011402020101030102046386610499c2aba7e7d9e8f7aefa05c22f9a09ecd2ef9faedb0b8f155e4924fdad366452b88a49ba2c6af66a3c8720cca0de805f2d756452f19bc4213397308909e18e9dcb041ee4facb9cdab780a87973e84a19960301fe680b8ffcbe571abc9ed5ed189000 +on 1758.542 1758.542 EndTransaction diff --git a/mockdata/TestMetadata/PINPolicy/Always/yk-5.7.1 b/mockdata/TestMetadata/PINPolicy/Always/yk-5.7.1 new file mode 100644 index 0000000..9ca11a2 --- /dev/null +++ b/mockdata/TestMetadata/PINPolicy/Always/yk-5.7.1 @@ -0,0 +1,30 @@ +mockfile + +file version v3 +file created 2024-06-11T12:23:58+02:00 +file creator stv0g@cam + +meta status.active_protocol any,t1 +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state specific,present,powered +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.148 0.148 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.865 1.865 Transmit 00fd0000 0507019000 +on 3.089 3.089 Transmit 00200080083631353832323531 63c2 +on 8.717 8.717 Transmit 00200080083631353832323531 63c1 +on 14.794 14.794 Transmit 00200080083631353832323531 6983 +on 20.899 20.899 Transmit 002400811036313538323235313631353832323531 63c2 +on 26.662 26.662 Transmit 002400811036313538323235313631353832323531 63c1 +on 32.619 32.619 Transmit 002400811036313538323235313631353832323531 6983 +on 38.524 38.524 Transmit 00fb0000 9000 +on 928.887 928.887 Transmit 00f7009b 01010a020200010501019000 +on 930.469 930.469 Transmit 00870a9b047c028000 7c128010e84eed7bb373b15b0ef4fc188f3d17329000 +on 932.741 932.741 Transmit 00870a9b267c2480103b22e9600251778b0e8e2b7ae40ec2168110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 934.694 934.694 Transmit 0047009a0bac09800111aa0103ab0101 7f49438641045d519c853d41f5e1e66bae533a2ebb6a37e58c25a0a715968ebc1f225e681fac8ef9da15a4c08ae0bac3967cead9a375ad2ba486dfb161e8696475e98537c5149000 +on 1351.999 1351.999 Transmit 00f7009a 0101110202030103010104438641045d519c853d41f5e1e66bae533a2ebb6a37e58c25a0a715968ebc1f225e681fac8ef9da15a4c08ae0bac3967cead9a375ad2ba486dfb161e8696475e98537c5149000 +on 1354.108 1354.108 EndTransaction diff --git a/mockdata/TestMetadata/PINPolicy/Once/yk-5.7.1 b/mockdata/TestMetadata/PINPolicy/Once/yk-5.7.1 new file mode 100644 index 0000000..9fcd8da --- /dev/null +++ b/mockdata/TestMetadata/PINPolicy/Once/yk-5.7.1 @@ -0,0 +1,30 @@ +mockfile + +file version v3 +file created 2024-06-11T12:23:57+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.094 0.094 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.719 1.719 Transmit 00fd0000 0507019000 +on 3.047 3.047 Transmit 00200080083631353832323531 63c2 +on 8.749 8.749 Transmit 00200080083631353832323531 63c1 +on 14.692 14.692 Transmit 00200080083631353832323531 6983 +on 20.593 20.593 Transmit 002400811036313538323235313631353832323531 63c2 +on 26.469 26.469 Transmit 002400811036313538323235313631353832323531 63c1 +on 32.480 32.480 Transmit 002400811036313538323235313631353832323531 6983 +on 38.192 38.192 Transmit 00fb0000 9000 +on 903.124 903.124 Transmit 00f7009b 01010a020200010501019000 +on 904.671 904.671 Transmit 00870a9b047c028000 7c128010a9144a4ad631ebfdae8c4c4ddaa41b729000 +on 906.392 906.392 Transmit 00870a9b267c2480100ecee3619dd24148bd75bbe494adfb8f8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 908.139 908.139 Transmit 0047009a0bac09800111aa0102ab0101 7f4943864104bb10a798af68dd03b2d255e4ff4cafe9e062b1513341c82d26b961d44bfe44834e8146e23bd9ae9dc970667ab49d9ff7bbfcbcf7a8a30e5c4940f25fc8e290fc9000 +on 1325.635 1325.635 Transmit 00f7009a 010111020202010301010443864104bb10a798af68dd03b2d255e4ff4cafe9e062b1513341c82d26b961d44bfe44834e8146e23bd9ae9dc970667ab49d9ff7bbfcbcf7a8a30e5c4940f25fc8e290fc9000 +on 1327.906 1327.906 EndTransaction diff --git a/mockdata/TestMetadata/RSA/1024/Generated/yk-5.7.1 b/mockdata/TestMetadata/RSA/1024/Generated/yk-5.7.1 new file mode 100644 index 0000000..1b413a5 --- /dev/null +++ b/mockdata/TestMetadata/RSA/1024/Generated/yk-5.7.1 @@ -0,0 +1,30 @@ +mockfile + +file version v3 +file created 2024-06-05T18:41:40+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state powered,specific,present +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.117 0.117 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.779 1.779 Transmit 00fd0000 0507019000 +on 3.219 3.219 Transmit 00200080083631353832323531 63c2 +on 9.242 9.242 Transmit 00200080083631353832323531 63c1 +on 15.176 15.176 Transmit 00200080083631353832323531 6983 +on 21.221 21.221 Transmit 002400811036313538323235313631353832323531 63c2 +on 27.254 27.254 Transmit 002400811036313538323235313631353832323531 63c1 +on 33.037 33.037 Transmit 002400811036313538323235313631353832323531 6983 +on 39.046 39.046 Transmit 00fb0000 9000 +on 996.084 996.084 Transmit 00f7009b 01010a020200010501019000 +on 998.603 998.603 Transmit 00870a9b047c028000 7c1280108b48109a53526f08becba14d3d6673f29000 +on 1001.028 1001.028 Transmit 00870a9b267c24801017d970fee9f468938b590b368adc7a7a8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 1003.131 1003.131 Transmit 0047009a0bac09800106aa0101ab0101 7f498188818180bfb724058c34006fb09b603cdb43f7560a7531419a77739d8dde3cb3c69e8b3157e86549df3d08daa6a821b7a45fddd10b3ab427cadcb5b1cb65383b7f6794f1175455d39bce8522471a9f461814444ad793e508220cc411fc582fc2892c3be0d30df621fb7ffaf0afa7fb3635756522798024f652a32597aa9b383b0e480b9382030100019000 +on 1531.806 1531.806 Transmit 00f7009a 01010602020101030101048188818180bfb724058c34006fb09b603cdb43f7560a7531419a77739d8dde3cb3c69e8b3157e86549df3d08daa6a821b7a45fddd10b3ab427cadcb5b1cb65383b7f6794f1175455d39bce8522471a9f461814444ad793e508220cc411fc582fc2892c3be0d30df621fb7ffaf0afa7fb3635756522798024f652a32597aa9b383b0e480b9382030100019000 +on 1534.233 1534.233 EndTransaction diff --git a/mockdata/TestMetadata/RSA/1024/Imported/yk-5.7.1 b/mockdata/TestMetadata/RSA/1024/Imported/yk-5.7.1 new file mode 100644 index 0000000..8a32c1a --- /dev/null +++ b/mockdata/TestMetadata/RSA/1024/Imported/yk-5.7.1 @@ -0,0 +1,30 @@ +mockfile + +file version v3 +file created 2024-06-05T18:43:11+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state powered,specific,present +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.142 0.142 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.840 1.840 Transmit 00fd0000 0507019000 +on 3.063 3.063 Transmit 00200080083631353832323531 63c2 +on 8.985 8.985 Transmit 00200080083631353832323531 63c1 +on 15.268 15.268 Transmit 00200080083631353832323531 6983 +on 21.500 21.500 Transmit 002400811036313538323235313631353832323531 63c2 +on 27.443 27.443 Transmit 002400811036313538323235313631353832323531 63c1 +on 33.435 33.435 Transmit 002400811036313538323235313631353832323531 6983 +on 39.333 39.333 Transmit 00fb0000 9000 +on 972.492 972.492 Transmit 00f7009b 01010a020200010501019000 +on 973.905 973.905 Transmit 00870a9b047c028000 7c128010fd290a6ea0a33ff557109e6fb1a9f3049000 +on 975.710 975.710 Transmit 00870a9b267c2480109009f2ad7635a090eb5bd6605686c8b88110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 977.683 977.683 Transmit 00fe069a000150aa0101ab01010140ffd60ad8f3892e7cef1b40ad44cd4d8c47de37bf4171bfe542d6e8b4592ac1312e65a047d2c34741469819435130ae94e0ab4851edd36269ac80582a56c8cb550240d3539bcb1f1cf78744fc744bf7ee4d761454fc8d748cb0364fe669f523eeac962c2a30f677503b3e9e2ec633e508e7d89d0d390ccda34f9148e8c6790e2fa65f034001bab5aa0fc35ea01391b0973b3ed4065db9ffd07825c7b14a095fdb503afcc15359f68265c75224fbd02d638a19f524267ca1e983dd08ee43ef3e29531ada5d0440c497fb4f335a974bd7f9a39728c72078c0e16f318943788a8e3a2448516d30516434bbe80d872e164ac1e8d14e38c2b6d923fbf6d537204660356cae216c62b10540203fe4be8d6a4b9d06a470f0de7ce16d74494eae2cbeed297669cb7fec34834408783372ec518b9b472d7925a2cbe37a11aec3eae39a8a809266f54691104520 9000 +on 1135.584 1135.584 Transmit 00f7009a 01010602020101030102048188818180d330f907eb74da606102eecd191d8c195130136a057f0e83dd04f3e3080e490d3bb89916396348abc2ed46ea71ba1fc49dbc5eb1794490ce2bee9afa27c13e202470b96667ed3d7ab135e7054efec2077588a785c020ef246c81d2ab039f8fcdd4dbce0442d5f70f9e08c5164402cd93972c5eb46e52abe43c84ef2562f7928b82030100019000 +on 1137.864 1137.864 EndTransaction diff --git a/mockdata/TestMetadata/RSA/2048/Generated/yk-5.7.1 b/mockdata/TestMetadata/RSA/2048/Generated/yk-5.7.1 new file mode 100644 index 0000000..65a4d5e --- /dev/null +++ b/mockdata/TestMetadata/RSA/2048/Generated/yk-5.7.1 @@ -0,0 +1,32 @@ +mockfile + +file version v3 +file created 2024-06-05T18:41:49+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.133 0.133 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.775 1.775 Transmit 00fd0000 0507019000 +on 3.196 3.196 Transmit 00200080083631353832323531 63c2 +on 9.091 9.091 Transmit 00200080083631353832323531 63c1 +on 15.091 15.091 Transmit 00200080083631353832323531 6983 +on 21.284 21.284 Transmit 002400811036313538323235313631353832323531 63c2 +on 27.199 27.199 Transmit 002400811036313538323235313631353832323531 63c1 +on 33.118 33.118 Transmit 002400811036313538323235313631353832323531 6983 +on 39.043 39.043 Transmit 00fb0000 9000 +on 902.437 902.437 Transmit 00f7009b 01010a020200010501019000 +on 904.825 904.825 Transmit 00870a9b047c028000 7c128010449e6eeedc7e6faf16c8bea4a9e9f75b9000 +on 907.872 907.872 Transmit 00870a9b267c2480106ac9cc2bdc0413ff2c8b8f3618554dca8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 910.109 910.109 Transmit 0047009a0bac09800107aa0101ab0101 7f4982010981820100b3f540769712960c3d80a14c680a00e5510aa1466df3fb9fe983a59ddcc3568693d6b10b904486596a7b47f52714e0cf6ab037e31e01d0deca159084aef77a54c931e62b7ae47c71c08edf18d296d67ed18ed0e6a642bd85e9cac5b3d6bba94344ac137790cb03118c668ad507bc2002147e165df3cfdb53449863f6ff72866f06b6fe9bcc98e749ec06efc0f18f7e1c47f1b8a2e7f34fba69ea4112b68cf2ad05549e3c355d451d140076d6b9fa7138789e567cb028e255b3085d16daeccf5ab4e6d2509e313720519b05be5d6402a360ef64d75e5482d8d284ef0d3318ec63c517c32783fc6e9f9e7d20862caa1d623a8d7e0b674105610e +on 8828.271 8828.271 Transmit 00c00000 e648946f622e23d65382030100019000 +on 8834.256 8834.256 Transmit 00f7009a 010107020201010301010482010981820100b3f540769712960c3d80a14c680a00e5510aa1466df3fb9fe983a59ddcc3568693d6b10b904486596a7b47f52714e0cf6ab037e31e01d0deca159084aef77a54c931e62b7ae47c71c08edf18d296d67ed18ed0e6a642bd85e9cac5b3d6bba94344ac137790cb03118c668ad507bc2002147e165df3cfdb53449863f6ff72866f06b6fe9bcc98e749ec06efc0f18f7e1c47f1b8a2e7f34fba69ea4112b68cf2ad05549e3c355d451d140076d6b9fa7138789e567cb028e255b3085d16daeccf5ab4e6d2509e313720519b05be5d6402a360ef64d75e5482d8d284ef0d3318ec63c517c32783fc6e9f9e7d20862caa6117 +on 8837.145 8837.145 Transmit 00c00000 1d623a8d7e0b674105e648946f622e23d65382030100019000 +on 8838.060 8838.060 EndTransaction diff --git a/mockdata/TestMetadata/RSA/2048/Imported/yk-5.7.1 b/mockdata/TestMetadata/RSA/2048/Imported/yk-5.7.1 new file mode 100644 index 0000000..3c89e56 --- /dev/null +++ b/mockdata/TestMetadata/RSA/2048/Imported/yk-5.7.1 @@ -0,0 +1,31 @@ +mockfile + +file version v3 +file created 2024-06-05T18:43:12+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state powered,specific,present +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.106 0.106 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.776 1.776 Transmit 00fd0000 0507019000 +on 2.978 2.978 Transmit 00200080083631353832323531 63c2 +on 9.097 9.097 Transmit 00200080083631353832323531 63c1 +on 15.627 15.627 Transmit 00200080083631353832323531 6983 +on 22.021 22.021 Transmit 002400811036313538323235313631353832323531 63c2 +on 27.997 27.997 Transmit 002400811036313538323235313631353832323531 63c1 +on 34.059 34.059 Transmit 002400811036313538323235313631353832323531 6983 +on 39.974 39.974 Transmit 00fb0000 9000 +on 988.662 988.662 Transmit 00f7009b 01010a020200010501019000 +on 994.650 994.650 Transmit 00870a9b047c028000 7c12801029308097804cbb692de0d4d4c9dfe40c9000 +on 997.922 997.922 Transmit 00870a9b267c24801069cc5c966185a6b900a4ae0ff19723188110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 1002.851 1002.851 Transmit 00fe079a000295aa0101ab0101018180fb6e6fb28eac26bea4210e845e53d52091b0ab9a4b97af6c905be0c86f0a0a318886c3f9a3595360d684b1939b15cea5e68113c34e55b0e46c4b3d7dd2fabe17c722fb6e9ffbc32b653f8f0f45a4a685d61290fde90aee719b8d12bda684e3594bc426b7c0af7fbcce0dd7cd2148c8cef8a23baa344c981ec0add40bba86fc7f028180caa226216d2ed38cf1e672761832034aa4a3c29620397da9c9cfef02310f9f40fd7ccbd0ecfe2fe9b639995099f29413a8d20675188979a73077724a47ffca4aac0d4c7e7bb285b73ff3546fd20fdfce62dc42cbf7e5e2831f05e3def26d007201e36718f890d3062876579fada7e1fca08733532b3d2ae53f483329ed72bb43038180569acda2a57e2ac253ea870395322f214ecd99ee45c773c7635a226d27c23f8c9c483f4cc7b54700fe232abf7b15e1de472d82cf2d365afdf3475f60edc12ca52814a6a28e3cbc174082ca162a98f23afb67ddc577f629f7bbeab5dfd971c095cb813f0ce034133dc78401274925b6f583b2edf64c996d747a4de5d23c67aea5048180c50192faeab11d22aa48f7bdd3564496fcacee519130f3f8f06a0620e65c1ee44bcf5a455d34e09664016a0ad031e53f9be1de3f5844c88f00f3109e21941234394490bb643e33fceee2ff93dbf26d10b653196a3f3134e17077048dccbaa735309acbb09e720788b42c2292ef7e0a9bd7e2bac6c0822ec3459c478a1afe720b0581808871ac8792b1a5d54f8f8b5920175d782078ceb7a1ac9f3e220822994eb1796dcf5ce18c99fee4d4f910f7309ce2e1774c9f9f8c79b0ccb60b21b4ab45ecfc03d93c0dda141f8f411fb53d4b4c4726fedffaf453476a02f53d35678babc8ba19c00794eda70fa9aa1abc072957a19bbbaf9d985c29ac7fca2b8f833c5e1653f7 9000 +on 1381.530 1381.530 Transmit 00f7009a 010107020201010301020482010981820100c7046578cc9f09e270f6bac65bf8f7320294e4d490496631828fbe56abe76ccfbc988d3646331fab9ceffeeaf7e35873e9ef6d501ac0b29281bc528811bb97b8da9466881a1b69a28c3ee94187b272e892b9017187075cddddc2922ae805099378d1f3a0908bbde741ddf49c95c5c8f468483f89044b4849d251787db254b38b8a1cddac77984964398843babd873707b2aa8157319058eea191e1bbdddd22d94035699b689e38b8e13c9a51dcf8fffd130e78b0c0adf066ff6d49532f70a9807255faeff8de7c41c78c3957d8c16d519b5fcf7f7e94be08f27a09a86de2d3e005a8f99e29e3b0916de2048c85dd6117 +on 1387.447 1387.447 Transmit 00c00000 e50df9577dea5bf5af41b8eed5876f52da3d82030100019000 +on 1389.782 1389.782 EndTransaction diff --git a/mockdata/TestMetadata/RSA/3072/Generated/yk-5.7.1 b/mockdata/TestMetadata/RSA/3072/Generated/yk-5.7.1 new file mode 100644 index 0000000..bd2a399 --- /dev/null +++ b/mockdata/TestMetadata/RSA/3072/Generated/yk-5.7.1 @@ -0,0 +1,32 @@ +mockfile + +file version v3 +file created 2024-06-05T18:42:07+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state powered,specific,present +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.161 0.161 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.914 1.914 Transmit 00fd0000 0507019000 +on 3.413 3.413 Transmit 00200080083631353832323531 63c2 +on 9.404 9.404 Transmit 00200080083631353832323531 63c1 +on 15.461 15.461 Transmit 00200080083631353832323531 6983 +on 21.289 21.289 Transmit 002400811036313538323235313631353832323531 63c2 +on 27.462 27.462 Transmit 002400811036313538323235313631353832323531 63c1 +on 33.140 33.140 Transmit 002400811036313538323235313631353832323531 6983 +on 38.981 38.981 Transmit 00fb0000 9000 +on 933.670 933.670 Transmit 00f7009b 01010a020200010501019000 +on 935.453 935.453 Transmit 00870a9b047c028000 7c128010c1df9f88cc49d772aa086aa3862956609000 +on 937.579 937.579 Transmit 00870a9b267c248010e08079535455f2686f7da61c01f3489e8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 939.890 939.890 Transmit 0047009a0bac09800105aa0101ab0101 7f4982018981820180ed120a03fceb97b2dde6d1412b0206c0df6abf363f2b6123e8353a376ecb477b3ec870c416939009a90a2fd8be50c6ebb1986bf15777ee0ccf5c85bd81fc3b7d03287b6dc0c5f464843b6a3854103cc735c02e3c9e8b0d4c102727248ceaaa7609c1f05243d644ad873aa7a79e29b08e88c8d99bb4e29b1933214adbd67633f94824d7c343862f13085c480ced26ff3afdf8b7da8a88f89fc7d895f9859d09949724d8d663e880c812f1bb292fbd1faa8c3f60f5225011d79ad37e4ab83fda1c9456d77becd1a9c6c215a51fde74a3fa358aa4411e724b579358320e780edd6d0ce8f949f9c7ba962360f21ec7b8c1e31f4010472263e9618e +on 18020.840 18020.840 Transmit 00c00000 53fb8b6fc0916c947968ab02dea70cbb62db7b57315a3c255ef06da609f33913832b79714a7bd22deb3d92ad84f9fd7e0d2aedb080416ed9f387849d6c8d7421ec26737aa3b9a0e22dcb4afa6c4fed3d36ee6110774018b84963ff5815d631c6ed3c985efaf893757244bd64f4619d0ac94619abceccd20a497580eb6cf923bc68561a6e4287a78b5982030100019000 +on 18022.332 18022.332 Transmit 00f7009a 010105020201010301010482018981820180ed120a03fceb97b2dde6d1412b0206c0df6abf363f2b6123e8353a376ecb477b3ec870c416939009a90a2fd8be50c6ebb1986bf15777ee0ccf5c85bd81fc3b7d03287b6dc0c5f464843b6a3854103cc735c02e3c9e8b0d4c102727248ceaaa7609c1f05243d644ad873aa7a79e29b08e88c8d99bb4e29b1933214adbd67633f94824d7c343862f13085c480ced26ff3afdf8b7da8a88f89fc7d895f9859d09949724d8d663e880c812f1bb292fbd1faa8c3f60f5225011d79ad37e4ab83fda1c9456d77becd1a9c6c215a51fde74a3fa358aa4411e724b579358320e780edd6d0ce8f949f9c7ba962360f21ec7b86197 +on 18025.987 18025.987 Transmit 00c00000 c1e31f4010472263e953fb8b6fc0916c947968ab02dea70cbb62db7b57315a3c255ef06da609f33913832b79714a7bd22deb3d92ad84f9fd7e0d2aedb080416ed9f387849d6c8d7421ec26737aa3b9a0e22dcb4afa6c4fed3d36ee6110774018b84963ff5815d631c6ed3c985efaf893757244bd64f4619d0ac94619abceccd20a497580eb6cf923bc68561a6e4287a78b5982030100019000 +on 18027.105 18027.105 EndTransaction diff --git a/mockdata/TestMetadata/RSA/3072/Imported/yk-5.7.1 b/mockdata/TestMetadata/RSA/3072/Imported/yk-5.7.1 new file mode 100644 index 0000000..8dc8c0c --- /dev/null +++ b/mockdata/TestMetadata/RSA/3072/Imported/yk-5.7.1 @@ -0,0 +1,31 @@ +mockfile + +file version v3 +file created 2024-06-05T18:43:14+02:00 +file creator stv0g@cam + +meta status.active_protocol any,t1 +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.094 0.094 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.675 1.675 Transmit 00fd0000 0507019000 +on 2.980 2.980 Transmit 00200080083631353832323531 63c2 +on 8.990 8.990 Transmit 00200080083631353832323531 63c1 +on 14.837 14.837 Transmit 00200080083631353832323531 6983 +on 20.678 20.678 Transmit 002400811036313538323235313631353832323531 63c2 +on 26.525 26.525 Transmit 002400811036313538323235313631353832323531 63c1 +on 32.303 32.303 Transmit 002400811036313538323235313631353832323531 6983 +on 38.370 38.370 Transmit 00fb0000 9000 +on 937.773 937.773 Transmit 00f7009b 01010a020200010501019000 +on 940.243 940.243 Transmit 00870a9b047c028000 7c1280102a75c29ace39494c40dc48b5cfbd5b139000 +on 944.208 944.208 Transmit 00870a9b267c24801005eb8a3a6706647c04903f7d17b310f88110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 948.501 948.501 Transmit 00fe059a0003d5aa0101ab01010181c0ed76fd4c9382d21f9d6e73fc68e1bf868b365f8f840061dd98bb9b61409ec05c0d194b1306111c00f63596f2d481b89a5f4c33594135c564230856e737c1e4689815d8143069729dbed68d2f856525db0f031655616f0f6796ef87544891188f6833ea2ec8d69bf23cfeab371fd079f989a7b3595e1d2e77a1c708d668c9fd7d41f2214d32af8da54c4c06d12ff8c77375e6116542728d66ad4f8aeb385c9508679efa0a1a819cd318b7c3428477c536844f633136658658639b40d3d41e9e270281c0c9132a712beac81db4466669de9e37a73c32525f6b5a660007f9049600a4b7bcb0b4ec3c5323f1df9cd01126adba6cbb8c3eff20df55ed4215204fa610c3887cc0580a7159114d93a3e09ab2aa0e2981280301af79fb795294365e7b856556c26e20ba09e7ada353aeed41dec50536593aa6b44139e9dec843c14d58582e2e342b81b37e54350937bed7ef28bef1505a9b47b7f4515c26f56cf7e45d4481911a4520147715380ece0f5c5de164caef97f4d009ff30143d4e3dd7db2c1aacf94b0381c042be12eb96fa49fcc0ceeea29f07f440e897dbbc06a9e4d7d7b9c32e4e6f50398f24f0c8e407a30b522835c90299833d4053b68afb9d1561d3c6e0461491d694df4a24756835fb15033262745cd5d51200e22940ce25dcfa8c9dbe379e3dc9dd64b852b5db951637bb9508a271bab2cdc436f25dc7ea03c9741af10cf25ef37465389ccb89d775c463f16a6919469f288096ad84fc6c1dfa21f41d63876fde23829c5842c6b86f4f95bef08e9d94dc453a62e5ca4b33b5d2da0c24e864d246390481c0bc8aa8256e54bc487e1df5321878ab1eb927466e0aafbd2d124cc1ac15f65e03247ec174df50b920405e2976e7380374e8d0b9520d98f8dc1a0b2e243d5bdbc37e680f82b14db43c5851e73cd8906702a08e112a856af41c26b5c46a766ecba78cb44b3db66beed62d1473cb7b5aa3d78f53797a1fdfd7f258f60c9c663307480bf39667427668aa48dd19784f72df31d6a0ad30fe89364eb35ace5b563d57de162b3a855ef42d8db2819dd61738e2e8cdb9b565ffa33ac8fedc44bb5a580f790581c01709c31616445174f742171ba464ebf1eda597c16c02fca893da59a6e2d0fc5f7fb0f12f928a5603fbe7005ae33c2c5c2c26a64eb80ae56a1fe3487d142cbcad4326242355e22fd522374369a63b941d49176850767c5ecf3ad52ae3c248394b5e38d24028719a611fdb62305e8c57fdbefa8f1de104b581167a7b5624d9102c47ebc30168a2ebb3fb6453d72717688a6e72fb49c204606402d6d864c916fa432778c4a8acbdfcde37624439e83aa93d819fa2c094ef4a65c081dad7299e77f2 9000 +on 2047.869 2047.869 Transmit 00f7009a 010105020201010301020482018981820180ba8434146c51cda0e689a379691244307798fe694ebcf651b5ddbcb4e905d2efad8cc7a98767384f690c1e217821a64314e360a6794dab13c981b3697fec2263455d55b06d74c4ee48e5fb6ba5b1f33e1b242d6b799bbd118d297f73167a1ed68987ec20ea7e9c766d68cc1dbad74ade92bda73b736b126907c41cba0d12e6dfe451d96ff0f1fcd1de63159df0209037834dc6c798384751a4b8f46317704ab42bb8ed4fc0c42e17fdffba2c34fecf1e876229278fcf7cc095fc182cfc3a6b4fafcb225123800883ae1f8d2ffe702f6286bfaf923866d095c4cfe3b3ff825cbd6f5469c1c156941d19729b3ed5386197 +on 2050.656 2050.656 Transmit 00c00000 6f265863d078c29ceda7e38cccf09f6b70d6240beb6d7dd6048ce542c1a537dc6d60459f16669efb94eaf1d3609aa457eb43e4654146a8da693fc70efa43b6947fe5914d969b4ea50cdaf0edc95e683cc8c38350748d078254e2db13b775dd0cbc4434b5a7fabd67b66fd3486253bb65b73621e327ecc22ff2c567773672d6fdeb5fe07d95665f914cd306b733b72500446d82030100019000 +on 2054.244 2054.244 EndTransaction diff --git a/mockdata/TestMetadata/RSA/4096/Generated/yk-5.7.1 b/mockdata/TestMetadata/RSA/4096/Generated/yk-5.7.1 new file mode 100644 index 0000000..e4753ef --- /dev/null +++ b/mockdata/TestMetadata/RSA/4096/Generated/yk-5.7.1 @@ -0,0 +1,34 @@ +mockfile + +file version v3 +file created 2024-06-05T18:43:06+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state powered,specific,present +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.182 0.182 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 4.749 4.749 Transmit 00fd0000 0507019000 +on 7.421 7.421 Transmit 00200080083631353832323531 63c2 +on 13.661 13.661 Transmit 00200080083631353832323531 63c1 +on 21.296 21.296 Transmit 00200080083631353832323531 6983 +on 27.917 27.917 Transmit 002400811036313538323235313631353832323531 63c2 +on 34.470 34.470 Transmit 002400811036313538323235313631353832323531 63c1 +on 40.759 40.759 Transmit 002400811036313538323235313631353832323531 6983 +on 47.723 47.723 Transmit 00fb0000 9000 +on 982.704 982.704 Transmit 00f7009b 01010a020200010501019000 +on 985.058 985.058 Transmit 00870a9b047c028000 7c128010f52289a5f479b738f086cb7e0ea9b87f9000 +on 987.354 987.354 Transmit 00870a9b267c2480104f471cb836bcf5d7925d41b51df8970b8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 991.605 991.605 Transmit 0047009a0bac09800116aa0101ab0101 7f4982020981820200d59f057c6abe32d81d7421c9f00bc8587fbbcef1eb7697abf9e75bd79473d167dd02a02f6618bf8ad1009f735403e41ccbae46e788188f8285698d26b37f1313626979818ac4bc7f42e8278c75f43ad143797a5cd101d0942eef6c9c745590dfd3e3219e4672e5216ec59e91d36cfa19e0fea1e90bbab385a291738ddb7e4668cbcca0bbd5a1223046ed05cacce8cfc98b5940099bb9a8bfa5b3179b5ceb3342c7380241b2077122273fd46aae6f8fc2e778d22ad148125ceea4da153ee6663ded8a237e9d8d5cb2420cf341c6519e0c88a20ce80b6ea286a5284cf9401dddec665641fcfca3b466856555365a3e3f27807b5f7e653e786100 +on 59468.311 59468.311 Transmit 00c00000 841c2556ebe8825efdebd4094bf6ac21b5cefc876833d7d5ef39aee10e350c9d1db8cf13790dd19d4b7f1f18e3502e3483a4587894617cb5d2030fe135b7f2177c5c140b87c986a2a02685a33723e9d9fcf8ca1dc10153d55bc9d0e1e416b523da39c268f052405320f07b23dde1683e4054d9e3ac9ae0aed69cf6989ca3ee78f4884b4b7100dcd3f01a8cc932c85e54d4ec145cecb3ab5a0d4db9cbb7b476fd6f8f70f8cd79d07566488da9b6d63eed143cc2f4f8c7cca73b31c1d722afb6a16620131257dfc1a61df2b46249e2b99abc762dd46c5c952fdecdb30eebc662e80943d16cebc41484d53ba32ba37ad189c678eb62692346fe825a1ee3b40a76d6610e +on 59469.608 59469.608 Transmit 00c00000 a4576964c3e5e881bf82030100019000 +on 59471.463 59471.463 Transmit 00f7009a 010116020201010301010482020981820200d59f057c6abe32d81d7421c9f00bc8587fbbcef1eb7697abf9e75bd79473d167dd02a02f6618bf8ad1009f735403e41ccbae46e788188f8285698d26b37f1313626979818ac4bc7f42e8278c75f43ad143797a5cd101d0942eef6c9c745590dfd3e3219e4672e5216ec59e91d36cfa19e0fea1e90bbab385a291738ddb7e4668cbcca0bbd5a1223046ed05cacce8cfc98b5940099bb9a8bfa5b3179b5ceb3342c7380241b2077122273fd46aae6f8fc2e778d22ad148125ceea4da153ee6663ded8a237e9d8d5cb2420cf341c6519e0c88a20ce80b6ea286a5284cf9401dddec665641fcfca3b466856555365a3e6100 +on 59475.550 59475.550 Transmit 00c00000 3f27807b5f7e653e78841c2556ebe8825efdebd4094bf6ac21b5cefc876833d7d5ef39aee10e350c9d1db8cf13790dd19d4b7f1f18e3502e3483a4587894617cb5d2030fe135b7f2177c5c140b87c986a2a02685a33723e9d9fcf8ca1dc10153d55bc9d0e1e416b523da39c268f052405320f07b23dde1683e4054d9e3ac9ae0aed69cf6989ca3ee78f4884b4b7100dcd3f01a8cc932c85e54d4ec145cecb3ab5a0d4db9cbb7b476fd6f8f70f8cd79d07566488da9b6d63eed143cc2f4f8c7cca73b31c1d722afb6a16620131257dfc1a61df2b46249e2b99abc762dd46c5c952fdecdb30eebc662e80943d16cebc41484d53ba32ba37ad189c678eb626923466117 +on 59477.208 59477.208 Transmit 00c00000 fe825a1ee3b40a76d6a4576964c3e5e881bf82030100019000 +on 59479.810 59479.810 EndTransaction diff --git a/mockdata/TestMetadata/RSA/4096/Imported/yk-5.7.1 b/mockdata/TestMetadata/RSA/4096/Imported/yk-5.7.1 new file mode 100644 index 0000000..b0ad61a --- /dev/null +++ b/mockdata/TestMetadata/RSA/4096/Imported/yk-5.7.1 @@ -0,0 +1,32 @@ +mockfile + +file version v3 +file created 2024-06-05T18:43:17+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.083 0.083 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.693 1.693 Transmit 00fd0000 0507019000 +on 2.870 2.870 Transmit 00200080083631353832323531 63c2 +on 8.564 8.564 Transmit 00200080083631353832323531 63c1 +on 14.547 14.547 Transmit 00200080083631353832323531 6983 +on 20.535 20.535 Transmit 002400811036313538323235313631353832323531 63c2 +on 26.588 26.588 Transmit 002400811036313538323235313631353832323531 63c1 +on 32.345 32.345 Transmit 002400811036313538323235313631353832323531 6983 +on 38.018 38.018 Transmit 00fb0000 9000 +on 904.646 904.646 Transmit 00f7009b 01010a020200010501019000 +on 908.070 908.070 Transmit 00870a9b047c028000 7c12801016f426ccd435661dbe02d95c9c9549069000 +on 912.435 912.435 Transmit 00870a9b267c24801070a8634e9ff9e9b9fac34808bda035568110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 916.440 916.440 Transmit 00fe169a00051aaa0101ab010101820100ecbed6dcf079db0c8341f2f1f00737f143016ca012a7df1a72e407f19341ce1c188b4625c32ea5f14de9c5b184aaa4942b35eb4e99fd119136955897857174f81e3543ed8b53bacf505b187a634260923381802fd74496e495ac98147864ecdbf49eb8b96c55766ec0c5ab6a5ae86b0ef329f3bad414966ed91670a873c419473dda0adc90e70d91abab43dc94d8fa4a368fbd435a84ce42c4e038194bf420e0ccf47503a5277948513853d2359b689e305c6e2a7a4c2d908aab31919645d28d6619690ccbd86c0f6c20c62714e2ea3b7b421931e517ca6a96eb1ac12dd848e81d3d1a5b4fe06a7ce2189dc31aadae04ac97847483f0114e9e01c576b7e0c6c302820100f6bd575b264cd169e806cb77e7c428710f5582007e427d2ae6cf9791fa092702f45b3a4a17cd86571bb7b66417e64114e5ccef3c6382b71aa43882060003616dcd3770518a497a6a1158023528715a0062a94ce877884b7518aaf4e8e5b046babdc08a8171decd1105c0ef38db53ba5af923841276bdcbe9688bdbb0fe6f7dbdb0722cc14b952b7648d64d5cd90686ff6ec34ea065ae7b09703f7ba07efcd9f6be9c40b10d83dbdf003cba515b88ae93846fe2f558f5a99ecd7e31fb3d669a486ad73957a490254e724f27a5c30585738bad3dd31a2496712693b97e5ac20d5dc0f6d955c1938b539d4e454f97a92a7078404f60e16c8c70fb31c58d8e37fa2f03820100d8aa06e608c6dcabe4ec54350b20f017c2e4e8cece8407f0a2b9027419fa9d70a51dc1430a10051a83ddb069b82a9b9866bb5ff07d8957ac7831d1f449d1fde49d70ce0bf5f8d8fca663d85119ca43ab49abf8eecfaa1c1672cc941a17dcf5d08f5d3b5da741c7b3b084b74e0c88ac81f014b2d48707986d360c0d6a7d1838b2346efa85c5af4f81c3846804d5cc85b3a99f7eecc748c7a3df9dfc795a43c05b3bf775a7b25c1fe9093bedaa72191a73bb7abbeff0210b8a3efe51cd15a42cffef32ce2b41db7d79d7d15ec7a19bd21641c5ca5d1976de6f12537416dba817812651276fedf84a3ca48736cab9fdbd46d5d58d093d3e55f8872ec3d2d491c815048201002c08be7e55e77fb816e09f8f569d7b5a3212609115f767bf3051fc0ae144a0e1b61a51dcc742b6a6f51b644198c24efb1bc7e72a2fd834355cf978baf965a10da7822d5960049d0430f433f0a8b71208df92b757057e1d79585daa37a6463f5934641853e1ae918a682c7684ff1f82329a23ec7e1f12e04157971e2e083a7d864ce71375abb7837a28a59648ebb26e85478f33890c9c86f8b83f9c209889279d1187714427d550780be2ca9d9a685a3f99731e5e0af24cc33a893b024b82f425d86b70a0638e161a59ec26773ec6cd7a41833975634504544d3e2fec8ce5f4dcb68357662695de579dcb4a335a2da6954be0ae49ebf1235f46752b7c87d515a105820100a5575a20d66de2a378b04dc1b87722ebd6d64f98806d925d4430dacb37e832835d6e84a9e84ffac9067148b7bbc6320185afee8484d196997070c3762a2189d014fd3e2207a2a1d36d292c85e8e2965bc23d7201358c6ee40f1ea6ee72ac62c604192e5aa0889e5c3e7814678605c803b5f2a4e4f5cfbe6f4ee4b36dae956fa310a19064b462738b81c6077b299c7d81b891e344c227667b5aee5799102bf1be2c6fe8f6250a3feca0c20d558dae2e05cc45eecd40e74cef600e870dc2b384415fe24900ee423471899791a51c9f496ce6f252d3fabd59f7df9d6211e18d19dd0893d684890b298af764336225237dcb683a3ba6b3ccf3b7519319cc594d2479 9000 +on 2642.045 2642.045 Transmit 00f7009a 010116020201010301020482020981820200e42e7c26167976edf6ad9c3166d24abec1a87d732e964f4c9e0ac7896a6201b12a82a4b479e09a58de74cf11377059c33bd50c3155a603dc527b5da1455d253fdd1eba7cef5540775d62af6aebc75bdc9153b58e721c6986efeb1e1e1e4d700e4a85912330e9f322f2b69cdf8162a08d8368c39a9798ddd64564379687dda56aab8fa49eed530e4418170cf88383ebdb56b0ed598aa35694a22357fc8ed2527552c4920a2e0a314ceb82200938e1a0b80d8df4883baf1ee5ad7fde9937e6105a14bfcf9d121182bbd998b469a4700ff5a0568fdc473d3b10b63688f8b569f156f8217234f65b8e3fe6c86b1709aa6100 +on 2648.485 2648.485 Transmit 00c00000 fe73079f6155c72f015cace8f59a0eaddb9489ec9d1040fd2849befadac0f145cc6cdc6a9638c93a46a88a3a66a180ea51c32eed3395742b2c70966a0318b1b2c0e358c982fc45240e051dd3e6861b6871219fb633da395a4e77885d6a4f62421fe0d30de1ad154ada30751f5365fc723fe56a199fe4dcaa196d8722b08ce320ccbdec1ca8cfbfd241076e9c401a71c46b791b54787c05542855c797d167fbaf2c305ac94d2133eef8418697ad727489cb10c05587afcc4bf05c83b623e43cb549a1116a015004a348f2de967867e869b19095ff44197c81d0eb01db05a1762d1858bc61841102ed9fec66f98bd694048ee6ef2ba7283dd4ee719344bebe844b6117 +on 2657.652 2657.652 Transmit 00c00000 a318b3bbc7652fc12dc07fbde84f2243ebcd82030100019000 +on 2660.549 2660.549 EndTransaction diff --git a/mockdata/TestMetadata/SlotCardAuthentication/yk-5.7.1 b/mockdata/TestMetadata/SlotCardAuthentication/yk-5.7.1 new file mode 100644 index 0000000..4fffeaa --- /dev/null +++ b/mockdata/TestMetadata/SlotCardAuthentication/yk-5.7.1 @@ -0,0 +1,30 @@ +mockfile + +file version v3 +file created 2024-06-11T12:24:04+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state powered,specific,present +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.107 0.107 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.784 1.784 Transmit 00fd0000 0507019000 +on 3.022 3.022 Transmit 00200080083631353832323531 63c2 +on 9.031 9.031 Transmit 00200080083631353832323531 63c1 +on 15.261 15.261 Transmit 00200080083631353832323531 6983 +on 21.306 21.306 Transmit 002400811036313538323235313631353832323531 63c2 +on 27.174 27.174 Transmit 002400811036313538323235313631353832323531 63c1 +on 32.914 32.914 Transmit 002400811036313538323235313631353832323531 6983 +on 38.764 38.764 Transmit 00fb0000 9000 +on 926.436 926.436 Transmit 00f7009b 01010a020200010501019000 +on 928.188 928.188 Transmit 00870a9b047c028000 7c1280101dd59f166fc82ca18243641dc882904c9000 +on 930.384 930.384 Transmit 00870a9b267c2480102168baa409e0679f510b9e39d90c60f08110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 932.507 932.507 Transmit 0047009e0bac09800111aa0101ab0103 7f4943864104ae8fb09e77288edb9b045f0ee589e2e46ad97025d38cd513be8dccf219595e62e9b02ac92e2d8368995cad8d839a355f456cdcb3ebb8903762cfd866eee2a09e9000 +on 1350.420 1350.420 Transmit 00f7009e 010111020201030301010443864104ae8fb09e77288edb9b045f0ee589e2e46ad97025d38cd513be8dccf219595e62e9b02ac92e2d8368995cad8d839a355f456cdcb3ebb8903762cfd866eee2a09e9000 +on 1352.875 1352.875 EndTransaction diff --git a/mockdata/TestMetadata/SlotKeyManagement/yk-5.7.1 b/mockdata/TestMetadata/SlotKeyManagement/yk-5.7.1 new file mode 100644 index 0000000..b1361ae --- /dev/null +++ b/mockdata/TestMetadata/SlotKeyManagement/yk-5.7.1 @@ -0,0 +1,30 @@ +mockfile + +file version v3 +file created 2024-06-11T12:24:05+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state powered,specific,present +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.155 0.155 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.986 1.986 Transmit 00fd0000 0507019000 +on 3.446 3.446 Transmit 00200080083631353832323531 63c2 +on 9.475 9.475 Transmit 00200080083631353832323531 63c1 +on 15.710 15.710 Transmit 00200080083631353832323531 6983 +on 21.539 21.539 Transmit 002400811036313538323235313631353832323531 63c2 +on 27.234 27.234 Transmit 002400811036313538323235313631353832323531 63c1 +on 33.163 33.163 Transmit 002400811036313538323235313631353832323531 6983 +on 39.061 39.061 Transmit 00fb0000 9000 +on 920.132 920.132 Transmit 00f7009b 01010a020200010501019000 +on 921.621 921.621 Transmit 00870a9b047c028000 7c1280108f002ebaed8cd73814c6538353cc5a669000 +on 923.331 923.331 Transmit 00870a9b267c248010be150f070674c055f17db25752d56ed78110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 925.415 925.415 Transmit 0047009d0bac09800111aa0101ab0103 7f4943864104ea70827ae3b9a0aaef6b10efe8e8329f7f9c7e9e8d34501a36adfe5bfa224fa018597fb6a79663e62be2b1cfbf7ec5cba092d0b5a790b2e98b6a76340b1380d79000 +on 1345.019 1345.019 Transmit 00f7009d 010111020201030301010443864104ea70827ae3b9a0aaef6b10efe8e8329f7f9c7e9e8d34501a36adfe5bfa224fa018597fb6a79663e62be2b1cfbf7ec5cba092d0b5a790b2e98b6a76340b1380d79000 +on 1347.407 1347.407 EndTransaction diff --git a/mockdata/TestMetadata/SlotSignature/yk-5.7.1 b/mockdata/TestMetadata/SlotSignature/yk-5.7.1 new file mode 100644 index 0000000..8eeb652 --- /dev/null +++ b/mockdata/TestMetadata/SlotSignature/yk-5.7.1 @@ -0,0 +1,30 @@ +mockfile + +file version v3 +file created 2024-06-11T12:24:03+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state specific,present,powered +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.146 0.146 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.804 1.804 Transmit 00fd0000 0507019000 +on 3.216 3.216 Transmit 00200080083631353832323531 63c2 +on 9.292 9.292 Transmit 00200080083631353832323531 63c1 +on 15.513 15.513 Transmit 00200080083631353832323531 6983 +on 21.898 21.898 Transmit 002400811036313538323235313631353832323531 63c2 +on 27.794 27.794 Transmit 002400811036313538323235313631353832323531 63c1 +on 33.865 33.865 Transmit 002400811036313538323235313631353832323531 6983 +on 39.918 39.918 Transmit 00fb0000 9000 +on 921.944 921.944 Transmit 00f7009b 01010a020200010501019000 +on 923.466 923.466 Transmit 00870a9b047c028000 7c128010ca366c6f139021c7c462ef182ed3ce899000 +on 925.309 925.309 Transmit 00870a9b267c24801002a78e4e4c5339b326a33885492bda398110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 927.208 927.208 Transmit 0047009c0bac09800111aa0101ab0103 7f4943864104ce1e2c8916d32418ccedf8b80d2a9c93d80d5ed822083ce47380f22100ec55a0de3691203c09057362db2d2162263b9a5e66d6c7a7c61431375a80ad003cf2b89000 +on 1344.133 1344.133 Transmit 00f7009c 010111020201030301010443864104ce1e2c8916d32418ccedf8b80d2a9c93d80d5ed822083ce47380f22100ec55a0de3691203c09057362db2d2162263b9a5e66d6c7a7c61431375a80ad003cf2b89000 +on 1346.127 1346.127 EndTransaction diff --git a/mockdata/TestMetadata/TouchPolicy/Always/yk-5.7.1 b/mockdata/TestMetadata/TouchPolicy/Always/yk-5.7.1 new file mode 100644 index 0000000..6959530 --- /dev/null +++ b/mockdata/TestMetadata/TouchPolicy/Always/yk-5.7.1 @@ -0,0 +1,30 @@ +mockfile + +file version v3 +file created 2024-06-11T12:24:00+02:00 +file creator stv0g@cam + +meta status.active_protocol any,t1 +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state powered,specific,present +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.127 0.127 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.790 1.790 Transmit 00fd0000 0507019000 +on 3.175 3.175 Transmit 00200080083631353832323531 63c2 +on 8.956 8.956 Transmit 00200080083631353832323531 63c1 +on 14.824 14.824 Transmit 00200080083631353832323531 6983 +on 20.934 20.934 Transmit 002400811036313538323235313631353832323531 63c2 +on 26.705 26.705 Transmit 002400811036313538323235313631353832323531 63c1 +on 32.488 32.488 Transmit 002400811036313538323235313631353832323531 6983 +on 38.379 38.379 Transmit 00fb0000 9000 +on 924.478 924.478 Transmit 00f7009b 01010a020200010501019000 +on 926.247 926.247 Transmit 00870a9b047c028000 7c128010fc4beeccbce405421ffcb5f368a6b1359000 +on 928.126 928.126 Transmit 00870a9b267c2480100652b2d9942567bfe738af5dac98c1448110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 930.038 930.038 Transmit 0047009a0bac09800111aa0101ab0102 7f4943864104f261d07b6347763f36b96f02edded1c3e346a7ceb02999918ff065a59eac2de66d8ff0cf9abd2c3af24a42f7acfa5e1666c09772f983f4113ab1a19693d390069000 +on 1348.017 1348.017 Transmit 00f7009a 010111020201020301010443864104f261d07b6347763f36b96f02edded1c3e346a7ceb02999918ff065a59eac2de66d8ff0cf9abd2c3af24a42f7acfa5e1666c09772f983f4113ab1a19693d390069000 +on 1354.157 1354.157 EndTransaction diff --git a/mockdata/TestMetadata/TouchPolicy/Cached/yk-5.7.1 b/mockdata/TestMetadata/TouchPolicy/Cached/yk-5.7.1 new file mode 100644 index 0000000..4e9d3e5 --- /dev/null +++ b/mockdata/TestMetadata/TouchPolicy/Cached/yk-5.7.1 @@ -0,0 +1,30 @@ +mockfile + +file version v3 +file created 2024-06-11T12:24:01+02:00 +file creator stv0g@cam + +meta status.active_protocol any,t1 +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state specific,present,powered +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.157 0.157 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.875 1.875 Transmit 00fd0000 0507019000 +on 3.430 3.430 Transmit 00200080083631353832323531 63c2 +on 9.394 9.394 Transmit 00200080083631353832323531 63c1 +on 15.333 15.333 Transmit 00200080083631353832323531 6983 +on 21.263 21.263 Transmit 002400811036313538323235313631353832323531 63c2 +on 27.397 27.397 Transmit 002400811036313538323235313631353832323531 63c1 +on 33.169 33.169 Transmit 002400811036313538323235313631353832323531 6983 +on 38.957 38.957 Transmit 00fb0000 9000 +on 915.337 915.337 Transmit 00f7009b 01010a020200010501019000 +on 917.019 917.019 Transmit 00870a9b047c028000 7c1280101821b8982c7f159c338f96676ab185849000 +on 918.975 918.975 Transmit 00870a9b267c248010f17f02097ebed39156edb99289dd68af8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 921.157 921.157 Transmit 0047009a0bac09800111aa0101ab0103 7f494386410487866cf23e105f0e30ea0cf0d9816d442483d3fe84b4bc73c2faf15518bf7e7aff99ad835af29e98eab8970761cca8018d96bba1376efd36fab0d5ce75be7faa9000 +on 1338.136 1338.136 Transmit 00f7009a 01011102020103030101044386410487866cf23e105f0e30ea0cf0d9816d442483d3fe84b4bc73c2faf15518bf7e7aff99ad835af29e98eab8970761cca8018d96bba1376efd36fab0d5ce75be7faa9000 +on 1340.553 1340.553 EndTransaction diff --git a/mockdata/TestMetadataCardManagement/yk-5.4.3 b/mockdata/TestMetadataCardManagement/yk-5.4.3 new file mode 100644 index 0000000..63e4b89 --- /dev/null +++ b/mockdata/TestMetadataCardManagement/yk-5.4.3 @@ -0,0 +1,26 @@ +mockfile + +file version v3 +file created 2024-06-05T20:59:51+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state specific,present,powered +meta yubikey.serial 23852774 +meta yubikey.version 5.4.3 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.104 0.104 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.686 1.686 Transmit 00fd0000 0504039000 +on 2.345 2.345 Transmit 00200080083631353832323531 63c2 +on 7.555 7.555 Transmit 00200080083631353832323531 63c1 +on 12.772 12.772 Transmit 00200080083631353832323531 6983 +on 17.929 17.929 Transmit 002400811036313538323235313631353832323531 63c2 +on 22.935 22.935 Transmit 002400811036313538323235313631353832323531 63c1 +on 28.034 28.034 Transmit 002400811036313538323235313631353832323531 6983 +on 33.120 33.120 Transmit 00fb0000 9000 +on 536.242 536.242 Transmit 00f7009b 010103020200010501019000 +on 537.918 537.918 EndTransaction diff --git a/mockdata/TestMetadataCardManagement/yk-5.7.1 b/mockdata/TestMetadataCardManagement/yk-5.7.1 new file mode 100644 index 0000000..ed52e40 --- /dev/null +++ b/mockdata/TestMetadataCardManagement/yk-5.7.1 @@ -0,0 +1,26 @@ +mockfile + +file version v3 +file created 2024-06-11T12:24:08+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.121 0.121 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.786 1.786 Transmit 00fd0000 0507019000 +on 3.160 3.160 Transmit 00200080083631353832323531 63c2 +on 8.976 8.976 Transmit 00200080083631353832323531 63c1 +on 14.892 14.892 Transmit 00200080083631353832323531 6983 +on 20.831 20.831 Transmit 002400811036313538323235313631353832323531 63c2 +on 26.751 26.751 Transmit 002400811036313538323235313631353832323531 63c1 +on 32.831 32.831 Transmit 002400811036313538323235313631353832323531 6983 +on 38.707 38.707 Transmit 00fb0000 9000 +on 948.248 948.248 Transmit 00f7009b 01010a020200010501019000 +on 949.870 949.870 EndTransaction diff --git a/mockdata/TestMetadataPINPUK/PIN/yk-5.4.3 b/mockdata/TestMetadataPINPUK/PIN/yk-5.4.3 new file mode 100644 index 0000000..112e00e --- /dev/null +++ b/mockdata/TestMetadataPINPUK/PIN/yk-5.4.3 @@ -0,0 +1,26 @@ +mockfile + +file version v3 +file created 2024-06-05T21:00:13+02:00 +file creator stv0g@cam + +meta status.active_protocol any,t1 +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state specific,present,powered +meta yubikey.serial 23852774 +meta yubikey.version 5.4.3 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.099 0.099 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.698 1.698 Transmit 00fd0000 0504039000 +on 2.446 2.446 Transmit 00200080083631353832323531 63c2 +on 7.753 7.753 Transmit 00200080083631353832323531 63c1 +on 13.116 13.116 Transmit 00200080083631353832323531 6983 +on 18.448 18.448 Transmit 002400811036313538323235313631353832323531 63c2 +on 23.587 23.587 Transmit 002400811036313538323235313631353832323531 63c1 +on 28.791 28.791 Transmit 002400811036313538323235313631353832323531 6983 +on 33.888 33.888 Transmit 00fb0000 9000 +on 547.578 547.578 Transmit 00f70080 0101ff050101060203039000 +on 552.110 552.110 EndTransaction diff --git a/mockdata/TestMetadataPINPUK/PIN/yk-5.7.1 b/mockdata/TestMetadataPINPUK/PIN/yk-5.7.1 new file mode 100644 index 0000000..2560328 --- /dev/null +++ b/mockdata/TestMetadataPINPUK/PIN/yk-5.7.1 @@ -0,0 +1,26 @@ +mockfile + +file version v3 +file created 2024-06-11T12:24:06+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state specific,present,powered +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.132 0.132 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.929 1.929 Transmit 00fd0000 0507019000 +on 3.155 3.155 Transmit 00200080083631353832323531 63c2 +on 9.029 9.029 Transmit 00200080083631353832323531 63c1 +on 15.076 15.076 Transmit 00200080083631353832323531 6983 +on 20.930 20.930 Transmit 002400811036313538323235313631353832323531 63c2 +on 26.843 26.843 Transmit 002400811036313538323235313631353832323531 63c1 +on 33.027 33.027 Transmit 002400811036313538323235313631353832323531 6983 +on 39.056 39.056 Transmit 00fb0000 9000 +on 921.596 921.596 Transmit 00f70080 0101ff050101060203039000 +on 923.377 923.377 EndTransaction diff --git a/mockdata/TestMetadataPINPUK/PUK/yk-5.4.3 b/mockdata/TestMetadataPINPUK/PUK/yk-5.4.3 new file mode 100644 index 0000000..0ac2e77 --- /dev/null +++ b/mockdata/TestMetadataPINPUK/PUK/yk-5.4.3 @@ -0,0 +1,26 @@ +mockfile + +file version v3 +file created 2024-06-05T21:00:14+02:00 +file creator stv0g@cam + +meta status.active_protocol any,t1 +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 23852774 +meta yubikey.version 5.4.3 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.183 0.183 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.801 1.801 Transmit 00fd0000 0504039000 +on 2.529 2.529 Transmit 00200080083631353832323531 63c2 +on 7.799 7.799 Transmit 00200080083631353832323531 63c1 +on 13.404 13.404 Transmit 00200080083631353832323531 6983 +on 18.622 18.622 Transmit 002400811036313538323235313631353832323531 63c2 +on 23.767 23.767 Transmit 002400811036313538323235313631353832323531 63c1 +on 28.997 28.997 Transmit 002400811036313538323235313631353832323531 6983 +on 34.348 34.348 Transmit 00fb0000 9000 +on 537.019 537.019 Transmit 00f70081 0101ff050101060203039000 +on 537.847 537.847 EndTransaction diff --git a/mockdata/TestMetadataPINPUK/PUK/yk-5.7.1 b/mockdata/TestMetadataPINPUK/PUK/yk-5.7.1 new file mode 100644 index 0000000..fc45afe --- /dev/null +++ b/mockdata/TestMetadataPINPUK/PUK/yk-5.7.1 @@ -0,0 +1,26 @@ +mockfile + +file version v3 +file created 2024-06-11T12:24:07+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.134 0.134 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.765 1.765 Transmit 00fd0000 0507019000 +on 3.222 3.222 Transmit 00200080083631353832323531 63c2 +on 9.165 9.165 Transmit 00200080083631353832323531 63c1 +on 15.236 15.236 Transmit 00200080083631353832323531 6983 +on 21.415 21.415 Transmit 002400811036313538323235313631353832323531 63c2 +on 27.616 27.616 Transmit 002400811036313538323235313631353832323531 63c1 +on 33.577 33.577 Transmit 002400811036313538323235313631353832323531 6983 +on 39.602 39.602 Transmit 00fb0000 9000 +on 949.258 949.258 Transmit 00f70081 0101ff050101060203039000 +on 951.419 951.419 EndTransaction diff --git a/mockdata/TestMoveKey/yk-5.7.1 b/mockdata/TestMoveKey/yk-5.7.1 new file mode 100644 index 0000000..48a7a5b --- /dev/null +++ b/mockdata/TestMoveKey/yk-5.7.1 @@ -0,0 +1,40 @@ +mockfile + +file version v3 +file created 2024-06-11T12:20:38+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.196 0.196 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.859 1.859 Transmit 00fd0000 0507019000 +on 3.054 3.054 Transmit 00200080083631353832323531 63c2 +on 8.660 8.660 Transmit 00200080083631353832323531 63c1 +on 14.366 14.366 Transmit 00200080083631353832323531 6983 +on 20.359 20.359 Transmit 002400811036313538323235313631353832323531 63c2 +on 26.153 26.153 Transmit 002400811036313538323235313631353832323531 63c1 +on 32.048 32.048 Transmit 002400811036313538323235313631353832323531 6983 +on 37.912 37.912 Transmit 00fb0000 9000 +on 962.804 962.804 Transmit 00f7009b 01010a020200010501019000 +on 964.462 964.462 Transmit 00870a9b047c028000 7c1280100ead714d43edac7cc312f8e5568fb66d9000 +on 966.583 966.583 Transmit 00870a9b267c24801086f496a710545cdc455dc8fceb221b228110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 968.476 968.476 Transmit 00f69e9a 6a88 +on 969.899 969.899 Transmit 00f7009b 01010a020200010501019000 +on 971.259 971.259 Transmit 00870a9b047c028000 7c1280106ab834e28c2b495688d01351813cffd49000 +on 973.006 973.006 Transmit 00870a9b267c248010dcf652a3a533a85d778e4561a070af7c8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 975.038 975.038 Transmit 0047009a0bac09800106aa0101ab0101 7f498188818180b2299d8e3567318bdfb4fda382b9d2830b8ea85d753af99e1bd5e4c4804c5c52e95851216322b7b3f81f52a4aa601821c61ac56f365646967da9ad0c95c9daf4af5434808acaf7380f5dc822ed9457c1ee41cedcc5e0cf1ec1dfd8f58e1f14ea7a78d7888ecfe3abfd6da5876ab9e24e6517ad166db46813df27d54e8cafae3f82030100019000 +on 1451.819 1451.819 Transmit 00f7009a 01010602020101030101048188818180b2299d8e3567318bdfb4fda382b9d2830b8ea85d753af99e1bd5e4c4804c5c52e95851216322b7b3f81f52a4aa601821c61ac56f365646967da9ad0c95c9daf4af5434808acaf7380f5dc822ed9457c1ee41cedcc5e0cf1ec1dfd8f58e1f14ea7a78d7888ecfe3abfd6da5876ab9e24e6517ad166db46813df27d54e8cafae3f82030100019000 +on 1454.404 1454.404 Transmit 00f7009b 01010a020200010501019000 +on 1456.053 1456.053 Transmit 00870a9b047c028000 7c1280105e21e72f8a87710fdb6e8b5f3ee1cf189000 +on 1458.025 1458.025 Transmit 00870a9b267c248010d7713b869d5926689ad77909b47fee6e8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 1459.991 1459.991 Transmit 00f69e9a 9000 +on 1527.628 1527.628 Transmit 00f7009a 6a88 +on 1528.941 1528.941 Transmit 00f7009e 01010602020101030101048188818180b2299d8e3567318bdfb4fda382b9d2830b8ea85d753af99e1bd5e4c4804c5c52e95851216322b7b3f81f52a4aa601821c61ac56f365646967da9ad0c95c9daf4af5434808acaf7380f5dc822ed9457c1ee41cedcc5e0cf1ec1dfd8f58e1f14ea7a78d7888ecfe3abfd6da5876ab9e24e6517ad166db46813df27d54e8cafae3f82030100019000 +on 1530.987 1530.987 EndTransaction diff --git a/mockdata/TestNewCard/yk-5.7.1 b/mockdata/TestNewCard/yk-5.7.1 new file mode 100644 index 0000000..a36d28f --- /dev/null +++ b/mockdata/TestNewCard/yk-5.7.1 @@ -0,0 +1,18 @@ +mockfile + +file version v3 +file created 2024-06-11T12:21:10+02:00 +file creator stv0g@cam + +meta status.active_protocol any,t1 +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.074 0.074 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.766 0.766 Transmit 00fd0000 0507019000 +on 1.906 1.906 EndTransaction diff --git a/mockdata/TestPINPolicy/yk-5.7.1 b/mockdata/TestPINPolicy/yk-5.7.1 new file mode 100644 index 0000000..534c38f --- /dev/null +++ b/mockdata/TestPINPolicy/yk-5.7.1 @@ -0,0 +1,30 @@ +mockfile + +file version v3 +file created 2024-06-11T12:21:17+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state specific,present,powered +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.089 0.089 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.698 1.698 Transmit 00fd0000 0507019000 +on 2.826 2.826 Transmit 00200080083631353832323531 63c2 +on 9.090 9.090 Transmit 00200080083631353832323531 63c1 +on 14.935 14.935 Transmit 00200080083631353832323531 6983 +on 20.700 20.700 Transmit 002400811036313538323235313631353832323531 63c2 +on 26.664 26.664 Transmit 002400811036313538323235313631353832323531 63c1 +on 32.722 32.722 Transmit 002400811036313538323235313631353832323531 6983 +on 38.351 38.351 Transmit 00fb0000 9000 +on 917.838 917.838 Transmit 00f7009b 01010a020200010501019000 +on 919.255 919.255 Transmit 00870a9b047c028000 7c12801040fb1d5de640f50bf6b1dc5d88a502af9000 +on 920.895 920.895 Transmit 00870a9b267c2480106dc8f4875b986e69d44c289da3543ae28110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 922.571 922.571 Transmit 00fe119a28aa0101ab01010620abb99aa407630fc409b92395e750daa05936ce1186cdcf33436af8d3e5398b92 9000 +on 1339.545 1339.545 Transmit 00f7009a 010111020201010301020443864104e05229fc45795dbdb2e1863ad6ea701a47c18cc7664d50269b619662643052b1e316c0f31f492ac998b3677262c0c593f47765b6c5ad60b569348e380c1dd5bc9000 +on 1342.490 1342.490 EndTransaction diff --git a/mockdata/TestPINPrompt/Always/yk-5.7.1 b/mockdata/TestPINPrompt/Always/yk-5.7.1 new file mode 100644 index 0000000..a9660c1 --- /dev/null +++ b/mockdata/TestPINPrompt/Always/yk-5.7.1 @@ -0,0 +1,26 @@ +mockfile + +file version v3 +file created 2024-06-05T18:45:18+02:00 +file creator stv0g@cam + +meta status.active_protocol any,t1 +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.097 0.097 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.913 0.913 Transmit 00fd0000 0507019000 +on 2.162 2.162 Transmit 00f7009b 01010a020200010501019000 +on 3.533 3.533 Transmit 00870a9b047c028000 7c1280105e73f963a4abf6f4822b122f26624a9a9000 +on 5.554 5.554 Transmit 00870a9b267c2480109c428c41f4f6ac25d3e8a2f93f39f7fe8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 7.526 7.526 Transmit 0047009a0bac09800111aa0103ab0101 7f4943864104bb57fb237697f55ed31a60640b8cc956425b474bcd0ec5646283ac9931e5b315dd8253fee465134647e2d585ac1ee684dcec06c0143485ec642f0b5c88c8beec9000 +on 424.681 424.681 Transmit 0020008008313233343536ffff 9000 +on 435.074 435.074 Transmit 0087119a267c24820081202c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae 7c4982473045022100e0ef72184e97bcc6bc33c2d2d606261774a7f9fa0fb88d9d0d97860caef0761202207ee77f47c5117cbf11f02bc4046531cc2d03a5ace886d0fbd45d66644b503b1a9000 +on 510.785 510.785 Transmit 0020008008313233343536ffff 9000 +on 520.704 520.704 Transmit 0087119a267c24820081202c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae 7c4882463044022061292a39ecf5fde0714ff624272330b5dbdd40e1da2e442183c7d5d1ddb49c22022057548a6e77cc26188782a8e39e353d27d34462e5e3b82a14a43a6d62d1050cd39000 +on 596.582 596.582 EndTransaction diff --git a/mockdata/TestPINPrompt/Never/yk-5.7.1 b/mockdata/TestPINPrompt/Never/yk-5.7.1 new file mode 100644 index 0000000..12cde72 --- /dev/null +++ b/mockdata/TestPINPrompt/Never/yk-5.7.1 @@ -0,0 +1,24 @@ +mockfile + +file version v3 +file created 2024-06-05T18:45:16+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.135 0.135 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.862 0.862 Transmit 00fd0000 0507019000 +on 2.180 2.180 Transmit 00f7009b 01010a020200010501019000 +on 3.435 3.435 Transmit 00870a9b047c028000 7c128010e424a14db74df5660a9edccb8abaaf599000 +on 5.163 5.163 Transmit 00870a9b267c2480107e17529e9e01fc50dd873418812a4d2e8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 7.244 7.244 Transmit 0047009a0bac09800111aa0101ab0101 7f49438641042b64de647d070f5f236b6a105944fd58ae4b2e1e11336bd413c45b5e6e3f07126e317d0609b1fedc05a0e9c98c31ad8b32701326f753c4437117b15fe3bd04909000 +on 422.792 422.792 Transmit 0087119a267c24820081202c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae 7c4982473045022100bc6d7228bed8233c0a4c57ed2bea655c816ff88fc5770fa2ccb1edbadd6085350220475089c5e115a82a538add5a93b40224d5f266003761881bf91d59c1ed6a24df9000 +on 498.387 498.387 Transmit 0087119a267c24820081202c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae 7c4a8248304602210090f60be7faa683db2a68d3d49c95fbdb1379329bb3a0f171cc236adec658e729022100971ac33258dc68ab894567ce9f260eb63116b16d57d3e612257562bc42649d719000 +on 574.356 574.356 EndTransaction diff --git a/mockdata/TestPINPrompt/Once/yk-5.7.1 b/mockdata/TestPINPrompt/Once/yk-5.7.1 new file mode 100644 index 0000000..a8132c1 --- /dev/null +++ b/mockdata/TestPINPrompt/Once/yk-5.7.1 @@ -0,0 +1,27 @@ +mockfile + +file version v3 +file created 2024-06-05T18:45:17+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.171 0.171 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.153 1.153 Transmit 00fd0000 0507019000 +on 2.371 2.371 Transmit 00f7009b 01010a020200010501019000 +on 3.708 3.708 Transmit 00870a9b047c028000 7c1280105afb31c36b8abbbca771863a57f5245d9000 +on 5.558 5.558 Transmit 00870a9b267c248010867cd56edd0bc780bd6d4d7e6658662e8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 7.597 7.597 Transmit 0047009a0bac09800111aa0102ab0101 7f49438641049304f4300997af5fd13e798c3cf8c4d5d25250c4bef6024d225e0d2f22a585873f5586a2f8e6f6ea1a8445c2cd599b0ded05a6864d8d424a599c75a7515c9f519000 +on 424.162 424.162 Transmit 00200080 63c3 +on 425.556 425.556 Transmit 0020008008313233343536ffff 9000 +on 435.330 435.330 Transmit 0087119a267c24820081202c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae 7c498247304502200ccc48646ceb9238e9446332454532003e75ebec710edc1d7ff53661cfd7460e022100ab40d3da29e1058c8740ee157d14b97198f7fafc52e800eecf0c037b49f07a4d9000 +on 511.257 511.257 Transmit 00200080 9000 +on 512.763 512.763 Transmit 0087119a267c24820081202c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae 7c498247304502207f44e867c9762f69fb76fac518cc33ac7ddde15a17dede32e3f348ae459d6b0b0221008ed9da1357aff05ed1e51f7961f5ff3e21e24519ac0a6eb2d7a78517f7409d6a9000 +on 588.795 588.795 EndTransaction diff --git a/mockdata/TestPINRetries/yk-5.7.1 b/mockdata/TestPINRetries/yk-5.7.1 new file mode 100644 index 0000000..5e42e87 --- /dev/null +++ b/mockdata/TestPINRetries/yk-5.7.1 @@ -0,0 +1,19 @@ +mockfile + +file version v3 +file created 2024-06-05T18:39:22+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state specific,present,powered +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.120 0.120 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.864 0.864 Transmit 00fd0000 0507019000 +on 2.116 2.116 Transmit 00200080 63c3 +on 3.399 3.399 EndTransaction diff --git a/mockdata/TestPinProtected/yk-5.7.1 b/mockdata/TestPinProtected/yk-5.7.1 new file mode 100644 index 0000000..439268b --- /dev/null +++ b/mockdata/TestPinProtected/yk-5.7.1 @@ -0,0 +1,33 @@ +mockfile + +file version v3 +file created 2024-06-11T12:21:14+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.104 0.104 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.861 0.861 Transmit 00fd0000 0507019000 +on 1.825 1.825 Transmit 00200080083631353832323531 63c2 +on 7.669 7.669 Transmit 00200080083631353832323531 63c1 +on 13.556 13.556 Transmit 00200080083631353832323531 6983 +on 19.301 19.301 Transmit 002400811036313538323235313631353832323531 63c2 +on 25.080 25.080 Transmit 002400811036313538323235313631353832323531 63c1 +on 31.149 31.149 Transmit 002400811036313538323235313631353832323531 6983 +on 37.158 37.158 Transmit 00fb0000 9000 +on 898.954 898.954 Transmit 0020008008313233343536ffff 9000 +on 909.313 909.313 Transmit 00cb3fff055c035fc109 6a82 +on 911.328 911.328 Transmit 00f7009b 01010a020200010501019000 +on 913.156 913.156 Transmit 00870a9b047c028000 7c1280109e68dd38f440c93d67ca45c6c424aa5a9000 +on 915.286 915.286 Transmit 00870a9b267c248010cfa7d2d4be1515dcb431e559935fd0bf8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 917.163 917.163 Transmit 00db3fff235c035fc109531c881a891809d98781fbdcc9b691a205806ec0ba8431ac0d9f59a500ad 9000 +on 934.881 934.881 Transmit 0020008008313233343536ffff 9000 +on 944.995 944.995 Transmit 00cb3fff055c035fc109 531c881a891809d98781fbdcc9b691a205806ec0ba8431ac0d9f59a500ad9000 +on 946.940 946.940 EndTransaction diff --git a/mockdata/TestPrivateKey/yk-5.7.1 b/mockdata/TestPrivateKey/yk-5.7.1 new file mode 100644 index 0000000..cfa7881 --- /dev/null +++ b/mockdata/TestPrivateKey/yk-5.7.1 @@ -0,0 +1,24 @@ +mockfile + +file version v3 +file created 2024-06-11T12:24:22+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.108 0.108 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.913 0.913 Transmit 00fd0000 0507019000 +on 1.998 1.998 Transmit 00f7009b 01010a020200010501019000 +on 3.275 3.275 Transmit 00870a9b047c028000 7c1280101db707cc08970521148ba396545e1cae9000 +on 4.890 4.890 Transmit 00870a9b267c248010a966fb9d885171fb9e824a58b5c435758110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 6.608 6.608 Transmit 0047009a0bac09800111aa0101ab0101 7f49438641046aa3580cda613c8a46b0eb1ae2bfe175947df61c2b7ec3b015b2e7fc92848e1b35dc70e955452a7989f30f64284248372471223d0f27581387cf18ce10ad83629000 +on 424.169 424.169 Transmit 00f7009a 0101110202010103010104438641046aa3580cda613c8a46b0eb1ae2bfe175947df61c2b7ec3b015b2e7fc92848e1b35dc70e955452a7989f30f64284248372471223d0f27581387cf18ce10ad83629000 +on 426.150 426.150 Transmit 0087119a267c24820081202cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 7c4982473045022053e4403de4f22e7a5fc59bb17b7f6ceae4b82990b33612bef76438cdea3e1e5f0221009bca86cb13face6e55fb2b66986b3227ecd9be2c293e541fc6cfaf99c84736d29000 +on 502.537 502.537 EndTransaction diff --git a/mockdata/TestPrivateKeyPINError/yk-5.7.1 b/mockdata/TestPrivateKeyPINError/yk-5.7.1 new file mode 100644 index 0000000..770b0b3 --- /dev/null +++ b/mockdata/TestPrivateKeyPINError/yk-5.7.1 @@ -0,0 +1,23 @@ +mockfile + +file version v3 +file created 2024-06-11T12:24:20+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state powered,specific,present +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.079 0.079 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.804 0.804 Transmit 00fd0000 0507019000 +on 2.040 2.040 Transmit 00f7009b 01010a020200010501019000 +on 3.256 3.256 Transmit 00870a9b047c028000 7c12801070803907eb048b156ee5fcd01a6334059000 +on 5.079 5.079 Transmit 00870a9b267c2480100184fb834f673e6a1178bb1706e30e2d8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 6.937 6.937 Transmit 0047009a0bac09800111aa0103ab0101 7f4943864104247a159116f7924af43626f87bafdad8c4a22c9c8b996dda37b0924c01c282ec667e396789015a482c1ae68dbc413fe34408edb2ecf3ebe1e729812a525a1ed39000 +on 423.070 423.070 Transmit 00f7009a 010111020203010301010443864104247a159116f7924af43626f87bafdad8c4a22c9c8b996dda37b0924c01c282ec667e396789015a482c1ae68dbc413fe34408edb2ecf3ebe1e729812a525a1ed39000 +on 425.224 425.224 EndTransaction diff --git a/mockdata/TestReset/yk-5.7.1 b/mockdata/TestReset/yk-5.7.1 new file mode 100644 index 0000000..bdf18d4 --- /dev/null +++ b/mockdata/TestReset/yk-5.7.1 @@ -0,0 +1,26 @@ +mockfile + +file version v3 +file created 2024-06-11T12:21:11+02:00 +file creator stv0g@cam + +meta status.active_protocol any,t1 +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state powered,specific,present +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.101 0.101 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.849 0.849 Transmit 00fd0000 0507019000 +on 2.161 2.161 Transmit 00200080083631353832323531 63c2 +on 8.027 8.027 Transmit 00200080083631353832323531 63c1 +on 13.964 13.964 Transmit 00200080083631353832323531 6983 +on 19.851 19.851 Transmit 002400811036313538323235313631353832323531 63c2 +on 25.697 25.697 Transmit 002400811036313538323235313631353832323531 63c1 +on 31.701 31.701 Transmit 002400811036313538323235313631353832323531 6983 +on 37.349 37.349 Transmit 00fb0000 9000 +on 912.991 912.991 Transmit 0020008008313233343536ffff 9000 +on 922.848 922.848 EndTransaction diff --git a/mockdata/TestSerial/yk-5.7.1 b/mockdata/TestSerial/yk-5.7.1 new file mode 100644 index 0000000..6288575 --- /dev/null +++ b/mockdata/TestSerial/yk-5.7.1 @@ -0,0 +1,19 @@ +mockfile + +file version v3 +file created 2024-06-11T12:21:10+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.083 0.083 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.833 0.833 Transmit 00fd0000 0507019000 +on 1.995 1.995 Transmit 00f80000 01bd27a99000 +on 3.334 3.334 EndTransaction diff --git a/mockdata/TestSetManagementKey/yk-5.7.1 b/mockdata/TestSetManagementKey/yk-5.7.1 new file mode 100644 index 0000000..cc2ecd5 --- /dev/null +++ b/mockdata/TestSetManagementKey/yk-5.7.1 @@ -0,0 +1,29 @@ +mockfile + +file version v3 +file created 2024-06-05T18:39:22+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.050 0.050 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.771 0.771 Transmit 00fd0000 0507019000 +on 1.928 1.928 Transmit 00f7009b 01010a020200010501019000 +on 3.125 3.125 Transmit 00870a9b047c028000 7c128010b6afd3d019c0bae32e382972be46ca8e9000 +on 4.893 4.893 Transmit 00870a9b267c248010d4c0e4bfef210c8be099ad159dc3cc7d8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 6.701 6.701 Transmit 00ffffff1b039b18abababababababababababababababababababababababab 9000 +on 20.071 20.071 Transmit 00f7009b 010103020200010501009000 +on 21.483 21.483 Transmit 0087039b047c028000 7c0a800891c38f145fabe7089000 +on 23.263 23.263 Transmit 0087039b167c148008f7d2ae9ea01c8bd88108abababababababab 7c0a8208ace41a06bfa258ea9000 +on 24.967 24.967 Transmit 00f7009b 010103020200010501009000 +on 26.173 26.173 Transmit 0087039b047c028000 7c0a8008ca984b9bc8f1be059000 +on 27.843 27.843 Transmit 0087039b167c148008698138c340a7aaf18108abababababababab 7c0a8208ace41a06bfa258ea9000 +on 29.467 29.467 Transmit 00ffffff1b039b18010203040506070801020304050607080102030405060708 9000 +on 39.160 39.160 EndTransaction diff --git a/mockdata/TestSetECCPPrivateKey/EC/P224/yk-5.4.3 b/mockdata/TestSetPrivateKeyECC/P-224/yk-5.4.3 similarity index 100% rename from mockdata/TestSetECCPPrivateKey/EC/P224/yk-5.4.3 rename to mockdata/TestSetPrivateKeyECC/P-224/yk-5.4.3 diff --git a/mockdata/TestSetPrivateKeyECC/P-224/yk-5.7.1 b/mockdata/TestSetPrivateKeyECC/P-224/yk-5.7.1 new file mode 100644 index 0000000..d795346 --- /dev/null +++ b/mockdata/TestSetPrivateKeyECC/P-224/yk-5.7.1 @@ -0,0 +1,21 @@ +mockfile + +file version v3 +file created 2024-06-05T19:16:57+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state powered,specific,present +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.129 0.129 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.947 0.947 Transmit 00fd0000 0507019000 +on 2.645 2.645 Transmit 00f7009b 01010a020200010501019000 +on 4.091 4.091 Transmit 00870a9b047c028000 7c12801038d6b766bb9eed4e9ea6b600caf9d93f9000 +on 5.901 5.901 Transmit 00870a9b267c2480102ca16c9e836b122a6f2776e5991462a38110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 7.744 7.744 EndTransaction diff --git a/mockdata/TestSetECCPPrivateKey/EC/P256/yk-5.4.3 b/mockdata/TestSetPrivateKeyECC/P-256/yk-5.4.3 similarity index 100% rename from mockdata/TestSetECCPPrivateKey/EC/P256/yk-5.4.3 rename to mockdata/TestSetPrivateKeyECC/P-256/yk-5.4.3 diff --git a/mockdata/TestSetPrivateKeyECC/P-256/yk-5.7.1 b/mockdata/TestSetPrivateKeyECC/P-256/yk-5.7.1 new file mode 100644 index 0000000..1565796 --- /dev/null +++ b/mockdata/TestSetPrivateKeyECC/P-256/yk-5.7.1 @@ -0,0 +1,23 @@ +mockfile + +file version v3 +file created 2024-06-05T19:16:56+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state powered,specific,present +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.146 0.146 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.974 0.974 Transmit 00fd0000 0507019000 +on 2.361 2.361 Transmit 00f7009b 01010a020200010501019000 +on 3.770 3.770 Transmit 00870a9b047c028000 7c12801062886988c403031de7812fcce38efeea9000 +on 5.609 5.609 Transmit 00870a9b267c248010978dff4b3404c96f86d5fc2218cc3fb88110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 7.390 7.390 Transmit 00fe119c28aa0101ab01010620abb99aa407630fc409b92395e750daa05936ce1186cdcf33436af8d3e5398b92 9000 +on 424.208 424.208 Transmit 0087119c177c158200811154657374206461746120746f207369676e 7c4982473045022100c071c6c7ee0a6de8f237defcf5185d4c9e3964c359b8e589de33cdffd93560c7022055042ad3cc99cb4c41729eefb3d0a75f304361c49e89cedb39e93109643de23b9000 +on 500.219 500.219 EndTransaction diff --git a/mockdata/TestSetECCPPrivateKey/EC/P384/yk-5.4.3 b/mockdata/TestSetPrivateKeyECC/P-384/yk-5.4.3 similarity index 100% rename from mockdata/TestSetECCPPrivateKey/EC/P384/yk-5.4.3 rename to mockdata/TestSetPrivateKeyECC/P-384/yk-5.4.3 diff --git a/mockdata/TestSetPrivateKeyECC/P-384/yk-5.7.1 b/mockdata/TestSetPrivateKeyECC/P-384/yk-5.7.1 new file mode 100644 index 0000000..7758ec8 --- /dev/null +++ b/mockdata/TestSetPrivateKeyECC/P-384/yk-5.7.1 @@ -0,0 +1,23 @@ +mockfile + +file version v3 +file created 2024-06-05T19:16:57+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state powered,specific,present +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.093 0.093 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.888 0.888 Transmit 00fd0000 0507019000 +on 2.390 2.390 Transmit 00f7009b 01010a020200010501019000 +on 3.710 3.710 Transmit 00870a9b047c028000 7c1280101a543a1d8cfb5fb139237641d4ea37b59000 +on 5.636 5.636 Transmit 00870a9b267c248010e52a936624ba618f6efe59ee1e292bfc8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 7.674 7.674 Transmit 00fe149e38aa0101ab01010630fb5db2aebfa6332e48ec2bc6626e9020df45e4374eacc1abe18af7e11325de1e810a6cf7fc2e27dbe4f34f5803fd7f31 9000 +on 744.700 744.700 Transmit 0087149e177c158200811154657374206461746120746f207369676e 7c6882663064023062b5df76119b36e8fb5bbf29f78dda898b322afa8dbf867183c602fb2ab8919fbd1afda325baf91aab8b4d2062553b44023068ef31ac878286dac22f4956cf5585e3d2d817c32821c908798c9a90711f00d5c686f9affd87a26625e4c180060134c39000 +on 888.517 888.517 EndTransaction diff --git a/mockdata/TestSetECCPPrivateKey/EC/P521/yk-5.4.3 b/mockdata/TestSetPrivateKeyECC/P-521/yk-5.4.3 similarity index 100% rename from mockdata/TestSetECCPPrivateKey/EC/P521/yk-5.4.3 rename to mockdata/TestSetPrivateKeyECC/P-521/yk-5.4.3 diff --git a/mockdata/TestSetPrivateKeyECC/P-521/yk-5.7.1 b/mockdata/TestSetPrivateKeyECC/P-521/yk-5.7.1 new file mode 100644 index 0000000..a60a7b0 --- /dev/null +++ b/mockdata/TestSetPrivateKeyECC/P-521/yk-5.7.1 @@ -0,0 +1,21 @@ +mockfile + +file version v3 +file created 2024-06-05T19:16:57+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state powered,specific,present +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.062 0.062 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.764 0.764 Transmit 00fd0000 0507019000 +on 5.799 5.799 Transmit 00f7009b 01010a020200010501019000 +on 7.350 7.350 Transmit 00870a9b047c028000 7c1280107cc72b3caca7accb25aa03c416bdb62b9000 +on 9.108 9.108 Transmit 00870a9b267c248010ea1598ef7ae47ad2b3ea33adcb5618018110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 10.901 10.901 EndTransaction diff --git a/mockdata/TestSetRSAPrivateKey/RSA/1024/yk-5.4.3 b/mockdata/TestSetPrivateKeyRSA/RSA-1024/yk-5.4.3 similarity index 100% rename from mockdata/TestSetRSAPrivateKey/RSA/1024/yk-5.4.3 rename to mockdata/TestSetPrivateKeyRSA/RSA-1024/yk-5.4.3 diff --git a/mockdata/TestSetRSAPrivateKey/RSA/2048/yk-5.4.3 b/mockdata/TestSetPrivateKeyRSA/RSA-2048/yk-5.4.3 similarity index 100% rename from mockdata/TestSetRSAPrivateKey/RSA/2048/yk-5.4.3 rename to mockdata/TestSetPrivateKeyRSA/RSA-2048/yk-5.4.3 diff --git a/mockdata/TestSetRSAPrivateKey/RSA/4096/yk-5.4.3 b/mockdata/TestSetPrivateKeyRSA/RSA-4096/yk-5.4.3 similarity index 100% rename from mockdata/TestSetRSAPrivateKey/RSA/4096/yk-5.4.3 rename to mockdata/TestSetPrivateKeyRSA/RSA-4096/yk-5.4.3 diff --git a/mockdata/TestSetRSAPrivateKey/RSA/512/yk-5.4.3 b/mockdata/TestSetPrivateKeyRSA/RSA-512/yk-5.4.3 similarity index 100% rename from mockdata/TestSetRSAPrivateKey/RSA/512/yk-5.4.3 rename to mockdata/TestSetPrivateKeyRSA/RSA-512/yk-5.4.3 diff --git a/mockdata/TestSetPrivateKeyRSA/RSA-512/yk-5.7.1 b/mockdata/TestSetPrivateKeyRSA/RSA-512/yk-5.7.1 new file mode 100644 index 0000000..c086cef --- /dev/null +++ b/mockdata/TestSetPrivateKeyRSA/RSA-512/yk-5.7.1 @@ -0,0 +1,21 @@ +mockfile + +file version v3 +file created 2024-06-05T18:54:34+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.188 0.188 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.218 1.218 Transmit 00fd0000 0507019000 +on 2.686 2.686 Transmit 00f7009b 01010a020200010501019000 +on 4.336 4.336 Transmit 00870a9b047c028000 7c12801075d5aa697359b492291f6891548edd939000 +on 6.236 6.236 Transmit 00870a9b267c248010c482df89ed381dadc0ec2f7025a2c7388110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 8.842 8.842 EndTransaction diff --git a/mockdata/TestSetRetries/yk-5.4.3 b/mockdata/TestSetRetries/yk-5.4.3 new file mode 100644 index 0000000..1e65635 --- /dev/null +++ b/mockdata/TestSetRetries/yk-5.4.3 @@ -0,0 +1,42 @@ +mockfile + +file version v3 +file created 2024-06-05T21:00:27+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 23852774 +meta yubikey.version 5.4.3 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.138 0.138 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.579 1.579 Transmit 00fd0000 0504039000 +on 2.256 2.256 Transmit 00200080083631353832323531 63c2 +on 7.382 7.382 Transmit 00200080083631353832323531 63c1 +on 12.788 12.788 Transmit 00200080083631353832323531 6983 +on 17.968 17.968 Transmit 002400811036313538323235313631353832323531 63c2 +on 22.955 22.955 Transmit 002400811036313538323235313631353832323531 63c1 +on 27.945 27.945 Transmit 002400811036313538323235313631353832323531 6983 +on 33.177 33.177 Transmit 00fb0000 9000 +on 537.346 537.346 Transmit 00f70080 0101ff050101060203039000 +on 539.340 539.340 Transmit 00f70081 0101ff050101060203039000 +on 540.795 540.795 Transmit 0020008008313233343536ffff 9000 +on 550.234 550.234 Transmit 00f7009b 010103020200010501019000 +on 551.240 551.240 Transmit 0087039b047c028000 7c0a80082be171482013eb049000 +on 552.804 552.804 Transmit 0087039b167c1480083b8d1e42d99399af8108abababababababab 7c0a8208b4e0e48bf8e2d06a9000 +on 554.008 554.008 Transmit 00fa050a 9000 +on 570.621 570.621 Transmit 00f70080 0101ff050101060205059000 +on 571.442 571.442 Transmit 00f70081 0101ff05010106020a0a9000 +on 572.211 572.211 Transmit 00200080083932383337343932 63c4 +on 577.762 577.762 Transmit 002c00801039323833373439323132333435363738 63c9 +on 583.199 583.199 Transmit 00f70080 0101ff050101060205049000 +on 584.605 584.605 Transmit 00f70081 0101ff05010106020a099000 +on 586.216 586.216 Transmit 0024008010313233343536ffff393831323131ffff 9000 +on 600.259 600.259 Transmit 00240081103132333435363738393831323131ffff 9000 +on 613.619 613.619 Transmit 00f70080 0101ff050100060205059000 +on 614.708 614.708 Transmit 00f70081 0101ff05010006020a0a9000 +on 616.149 616.149 EndTransaction diff --git a/mockdata/TestSetRetries/yk-5.7.1 b/mockdata/TestSetRetries/yk-5.7.1 new file mode 100644 index 0000000..65d4af1 --- /dev/null +++ b/mockdata/TestSetRetries/yk-5.7.1 @@ -0,0 +1,51 @@ +mockfile + +file version v3 +file created 2024-06-05T20:46:29+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state powered,specific,present +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.101 0.101 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.880 0.880 Transmit 00fd0000 0507019000 +on 2.110 2.110 Transmit 00200080083631353832323531 63c4 +on 7.662 7.662 Transmit 00200080083631353832323531 63c3 +on 13.536 13.536 Transmit 00200080083631353832323531 63c2 +on 19.349 19.349 Transmit 00200080083631353832323531 63c1 +on 25.356 25.356 Transmit 00200080083631353832323531 6983 +on 31.124 31.124 Transmit 002400811036313538323235313631353832323531 63c9 +on 36.895 36.895 Transmit 002400811036313538323235313631353832323531 63c8 +on 42.633 42.633 Transmit 002400811036313538323235313631353832323531 63c7 +on 48.149 48.149 Transmit 002400811036313538323235313631353832323531 63c6 +on 53.760 53.760 Transmit 002400811036313538323235313631353832323531 63c5 +on 59.723 59.723 Transmit 002400811036313538323235313631353832323531 63c4 +on 65.379 65.379 Transmit 002400811036313538323235313631353832323531 63c3 +on 70.992 70.992 Transmit 002400811036313538323235313631353832323531 63c2 +on 76.681 76.681 Transmit 002400811036313538323235313631353832323531 63c1 +on 82.493 82.493 Transmit 002400811036313538323235313631353832323531 6983 +on 88.398 88.398 Transmit 00fb0000 9000 +on 1030.660 1030.660 Transmit 00f70080 0101ff050101060203039000 +on 1034.466 1034.466 Transmit 00f70081 0101ff050101060203039000 +on 1036.969 1036.969 Transmit 0020008008313233343536ffff 9000 +on 1047.988 1047.988 Transmit 00f7009b 01010a020200010501019000 +on 1050.016 1050.016 Transmit 00870a9b047c028000 7c1280102714235f1b780dd47f344bab623b48679000 +on 1052.464 1052.464 Transmit 00870a9b267c248010bb65ef29ca9ea3ba4610871d53b61cda8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 1054.864 1054.864 Transmit 00fa050a 9000 +on 1072.623 1072.623 Transmit 00f70080 0101ff050101060205059000 +on 1074.353 1074.353 Transmit 00f70081 0101ff05010106020a0a9000 +on 1076.041 1076.041 Transmit 00200080083932383337343932 63c4 +on 1082.120 1082.120 Transmit 002c00801039323833373439323132333435363738 63c9 +on 1088.074 1088.074 Transmit 00f70080 0101ff050101060205049000 +on 1089.594 1089.594 Transmit 00f70081 0101ff05010106020a099000 +on 1090.845 1090.845 Transmit 0024008010313233343536ffff393831323131ffff 9000 +on 1116.500 1116.500 Transmit 00240081103132333435363738393831323131ffff 9000 +on 1142.079 1142.079 Transmit 00f70080 0101ff050100060205059000 +on 1143.534 1143.534 Transmit 00f70081 0101ff05010006020a0a9000 +on 1144.840 1144.840 EndTransaction diff --git a/mockdata/TestECCPSharedKey/yk-5.4.3 b/mockdata/TestSharedKeyECC/yk-5.4.3 similarity index 100% rename from mockdata/TestECCPSharedKey/yk-5.4.3 rename to mockdata/TestSharedKeyECC/yk-5.4.3 diff --git a/mockdata/TestSharedKeyECC/yk-5.7.1 b/mockdata/TestSharedKeyECC/yk-5.7.1 new file mode 100644 index 0000000..f924863 --- /dev/null +++ b/mockdata/TestSharedKeyECC/yk-5.7.1 @@ -0,0 +1,23 @@ +mockfile + +file version v3 +file created 2024-06-05T19:16:55+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.185 0.185 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.956 0.956 Transmit 00fd0000 0507019000 +on 2.211 2.211 Transmit 00f7009b 01010a020200010501019000 +on 3.611 3.611 Transmit 00870a9b047c028000 7c12801031d37f2f7462a96135ea2f36a20d955a9000 +on 5.325 5.325 Transmit 00870a9b267c24801015e6fbe2a429b817b4641daafb664db68110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 7.206 7.206 Transmit 0047009a0bac09800111aa0101ab0101 7f4943864104e282a509ac499152d6754fc1f58d81b8f81ef5489cf83406fddd649bde178a5ca9114af62c829c0db59136c6d9d9d44ea07d7061486aa9ca01c7785bf8c6bc029000 +on 425.410 425.410 Transmit 0087119a477c458200854104e05229fc45795dbdb2e1863ad6ea701a47c18cc7664d50269b619662643052b1e316c0f31f492ac998b3677262c0c593f47765b6c5ad60b569348e380c1dd5bc 7c228220ffc95ce9b76ee3e9539986a507a7628b7d1c649899b25f3c7ac8da60b5059dac9000 +on 576.128 576.128 EndTransaction diff --git a/mockdata/TestSignECC/P-256/yk-5.4.3 b/mockdata/TestSignECC/P-256/yk-5.4.3 new file mode 100644 index 0000000..b991e20 --- /dev/null +++ b/mockdata/TestSignECC/P-256/yk-5.4.3 @@ -0,0 +1,30 @@ +mockfile + +file version v3 +file created 2024-06-11T13:00:16+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state powered,specific,present +meta yubikey.serial 23852774 +meta yubikey.version 5.4.3 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.111 0.111 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.546 1.546 Transmit 00fd0000 0504039000 +on 2.193 2.193 Transmit 00200080083631353832323531 63c2 +on 7.307 7.307 Transmit 00200080083631353832323531 63c1 +on 12.478 12.478 Transmit 00200080083631353832323531 6983 +on 17.688 17.688 Transmit 002400811036313538323235313631353832323531 63c2 +on 22.699 22.699 Transmit 002400811036313538323235313631353832323531 63c1 +on 27.874 27.874 Transmit 002400811036313538323235313631353832323531 6983 +on 32.858 32.858 Transmit 00fb0000 9000 +on 533.400 533.400 Transmit 00f7009b 010103020200010501019000 +on 534.209 534.209 Transmit 0087039b047c028000 7c0a8008f650cd6d15249f9b9000 +on 535.388 535.388 Transmit 0087039b167c1480081872c629cd7119248108abababababababab 7c0a8208b4e0e48bf8e2d06a9000 +on 536.426 536.426 Transmit 0047009a0bac09800111aa0101ab0101 7f49438641043b1da929543184f59be51ff2e41ecba6b1b9d7a47621fba8dd816565e080f9ad191509038e3cfcb4d01512ca2ef9fc2af9ad6b2329edda44ada288e943af2bce9000 +on 799.468 799.468 Transmit 0087119a267c24820081202cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 7c49824730450220258304900d1800377b9cb7a1c7f96d85249f733b264fc92a4ed24bcf947e0140022100bf2c1aecf4064a6cd44d54234b422d349e4291ed23a0f0e62729e1b8b186a35c9000 +on 871.885 871.885 EndTransaction diff --git a/mockdata/TestSignECC/P-256/yk-5.7.1 b/mockdata/TestSignECC/P-256/yk-5.7.1 new file mode 100644 index 0000000..5bd3d2a --- /dev/null +++ b/mockdata/TestSignECC/P-256/yk-5.7.1 @@ -0,0 +1,30 @@ +mockfile + +file version v3 +file created 2024-06-11T13:00:06+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state specific,present,powered +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.082 0.082 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.837 0.837 Transmit 00fd0000 0507019000 +on 2.035 2.035 Transmit 00200080083631353832323531 63c2 +on 7.961 7.961 Transmit 00200080083631353832323531 63c1 +on 13.806 13.806 Transmit 00200080083631353832323531 6983 +on 19.630 19.630 Transmit 002400811036313538323235313631353832323531 63c2 +on 25.553 25.553 Transmit 002400811036313538323235313631353832323531 63c1 +on 31.387 31.387 Transmit 002400811036313538323235313631353832323531 6983 +on 37.134 37.134 Transmit 00fb0000 9000 +on 935.057 935.057 Transmit 00f7009b 01010a020200010501019000 +on 936.441 936.441 Transmit 00870a9b047c028000 7c12801027c0fd162936304241c847910b4519ea9000 +on 938.242 938.242 Transmit 00870a9b267c248010eec4e2f74885aee40f937700a786fcb18110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 940.065 940.065 Transmit 0047009a0bac09800111aa0101ab0101 7f4943864104aee1fd8a648d042a55c6f19f8ffa09b36332647410080dd217c30b04adbe471dd851e3275daab289bf03698dd1505fc8d517e907956dbb2a6d2941b8350b6f799000 +on 1622.884 1622.884 Transmit 0087119a267c24820081202cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 7c488246304402202643297238c166994237aebd9148f931c4e54309f0e04269b6fab013f04752290220560e9daf91fff375ff0aaf7b05782c361e88e617804593f7c23ea40f3cc56afd9000 +on 1698.550 1698.550 EndTransaction diff --git a/mockdata/TestSignECC/P-384/yk-5.4.3 b/mockdata/TestSignECC/P-384/yk-5.4.3 new file mode 100644 index 0000000..6108ebe --- /dev/null +++ b/mockdata/TestSignECC/P-384/yk-5.4.3 @@ -0,0 +1,30 @@ +mockfile + +file version v3 +file created 2024-06-11T13:00:18+02:00 +file creator stv0g@cam + +meta status.active_protocol any,t1 +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 23852774 +meta yubikey.version 5.4.3 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.159 0.159 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.681 1.681 Transmit 00fd0000 0504039000 +on 2.558 2.558 Transmit 00200080083631353832323531 63c2 +on 7.935 7.935 Transmit 00200080083631353832323531 63c1 +on 13.258 13.258 Transmit 00200080083631353832323531 6983 +on 18.698 18.698 Transmit 002400811036313538323235313631353832323531 63c2 +on 23.865 23.865 Transmit 002400811036313538323235313631353832323531 63c1 +on 29.059 29.059 Transmit 002400811036313538323235313631353832323531 6983 +on 34.242 34.242 Transmit 00fb0000 9000 +on 627.993 627.993 Transmit 00f7009b 010103020200010501019000 +on 628.869 628.869 Transmit 0087039b047c028000 7c0a80084cacc13dda8f53ab9000 +on 630.441 630.441 Transmit 0087039b167c1480084ac83be983e3d1a28108abababababababab 7c0a8208b4e0e48bf8e2d06a9000 +on 632.016 632.016 Transmit 0047009a0bac09800114aa0101ab0101 7f4963866104bf1e0f311bb7615c4131d77144eaf3d4d9e8818b21ec3238b9334ea2803c31edf3011636c9f426ce219d99e7068fff40984bd2b8f78340dc9e75c5229193bc263558e5497b34221cd8a474daa11235bf349d77287ee3ec644277d02398198b979000 +on 1067.874 1067.874 Transmit 0087149a267c24820081202cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 7c688266306402305dd56e11bc4ba1c4df4f8e71e4dfab7e6df999746aceecb80c1061102da3037a9aa7d2ce6b691daf07bfa688ec357d250230536b2f631d7d92300db4158c358b94b508640884a772e5045b7706feb4ed2ac108a5f764f0f48e15d7cb34b065734ab89000 +on 1189.738 1189.738 EndTransaction diff --git a/mockdata/TestSignECC/P-384/yk-5.7.1 b/mockdata/TestSignECC/P-384/yk-5.7.1 new file mode 100644 index 0000000..767ebe5 --- /dev/null +++ b/mockdata/TestSignECC/P-384/yk-5.7.1 @@ -0,0 +1,30 @@ +mockfile + +file version v3 +file created 2024-06-11T13:00:08+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state powered,specific,present +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.089 0.089 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.927 0.927 Transmit 00fd0000 0507019000 +on 2.159 2.159 Transmit 00200080083631353832323531 63c2 +on 7.841 7.841 Transmit 00200080083631353832323531 63c1 +on 13.766 13.766 Transmit 00200080083631353832323531 6983 +on 19.597 19.597 Transmit 002400811036313538323235313631353832323531 63c2 +on 26.072 26.072 Transmit 002400811036313538323235313631353832323531 63c1 +on 32.580 32.580 Transmit 002400811036313538323235313631353832323531 6983 +on 39.002 39.002 Transmit 00fb0000 9000 +on 979.070 979.070 Transmit 00f7009b 01010a020200010501019000 +on 980.817 980.817 Transmit 00870a9b047c028000 7c1280103e71d1fadb5dca9d05700ebb4aecceeb9000 +on 982.981 982.981 Transmit 00870a9b267c248010610f02264ea71f5d7e67deaa41d39a328110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 984.978 984.978 Transmit 0047009a0bac09800114aa0101ab0101 7f4963866104c8ab2e5ac0fe8dacb19e51948f143d3a0a078e3e2b11c3493d7fa03a27aadef3e1bbfc16b80abbd4274d0641e569116675878754b85b575647424f11d31eb374567ad48fe0581223ddadb455e6c5800f7371f721a2d244a732201db298d8d5929000 +on 1720.075 1720.075 Transmit 0087149a267c24820081202cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 7c698267306502300d1199d633cd919693a40ceac8b307ffa4c66246e2238d5a8c42b9112f5051955c890643b597d8821030ba999bb46753023100b05772ef08ac3f3fd60a699c431edadd175b71994e06f1ecf0368217f3a5e016f307a89097b02684ac966921eca7c48d9000 +on 1869.224 1869.224 EndTransaction diff --git a/mockdata/TestSignECCP/yk-5.4.3 b/mockdata/TestSignECCP/yk-5.4.3 deleted file mode 100644 index 8872bd4..0000000 --- a/mockdata/TestSignECCP/yk-5.4.3 +++ /dev/null @@ -1,37 +0,0 @@ -mockfile - -file.version v2 -file.created 2023-12-29T13:09:34Z -file.creator stv0g@pim - -meta attr.channel.type usb -meta attr.channel.usb.addr 3 -meta attr.channel.usb.bus 3 -meta attr.ifd.serial -meta attr.ifd.version 5.67.0 -meta attr.name.friendly Yubico YubiKey OTP+FIDO+CCID 00 00 -meta attr.name.system Yubico YubiKey OTP+FIDO+CCID 00 00 -meta attr.name.vendor Yubico -meta status.active_protocol t1,any -meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 -meta status.reader Yubico YubiKey OTP+FIDO+CCID 00 00 -meta status.state powered,negotiable,present -meta yubikey.serial 23852774 -meta yubikey.version 5.4.3 - -# start end method -on 0.000 0.000 BeginTransaction -on 0.053 0.053 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 -on 1.938 1.938 Transmit 00fd0000 0504039000 -on 2.946 2.946 Transmit 00200080083631353832323531 63c2 -on 7.948 7.948 Transmit 00200080083631353832323531 63c1 -on 12.944 12.944 Transmit 00200080083631353832323531 6983 -on 17.964 17.964 Transmit 002400811036313538323235313631353832323531 63c2 -on 22.944 22.944 Transmit 002400811036313538323235313631353832323531 63c1 -on 27.943 27.943 Transmit 002400811036313538323235313631353832323531 6983 -on 32.945 32.945 Transmit 00fb0000 9000 -on 534.990 534.990 Transmit 0087039b047c028000 7c0a8008e0e3a8b69524fedb9000 -on 535.969 535.969 Transmit 0087039b167c1480087a3b349cc72f29f58108abababababababab 7c0a8208b4e0e48bf8e2d06a9000 -on 536.962 536.962 Transmit 0047009a0bac09800111aa0101ab0101 7f494386410422ff060b091873a2117cb1ac1e8a4f3d20ba9b785382b04528ea4044b55e40aa0df6a05aeb321ae52bbe31db983b6c3e548cb2bbbc609a6102dc4b5333c6f33a9000 -on 883.021 883.021 Transmit 0087119a267c24820081202cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 7c4982473045022100c0e7cf63d6837fcb43174de4470bbca91aa91a67bd2a0c0e72df6901300153f2022023c9f41a912c91c1cb851247d5afc06198fbb935bef555091f4060c8aa4f9e0f9000 -on 955.255 955.255 EndTransaction diff --git a/mockdata/TestSignRSA/RSA-1024/yk-5.4.3 b/mockdata/TestSignRSA/RSA-1024/yk-5.4.3 new file mode 100644 index 0000000..5b05ae3 --- /dev/null +++ b/mockdata/TestSignRSA/RSA-1024/yk-5.4.3 @@ -0,0 +1,23 @@ +mockfile + +file version v3 +file created 2024-06-05T21:17:38+02:00 +file creator stv0g@cam + +meta status.active_protocol any,t1 +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 23852774 +meta yubikey.version 5.4.3 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.163 0.163 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.533 1.533 Transmit 00fd0000 0504039000 +on 2.188 2.188 Transmit 00f7009b 010103020200010501019000 +on 2.866 2.866 Transmit 0087039b047c028000 7c0a8008ed3786e4df2938729000 +on 4.010 4.010 Transmit 0087039b167c14800829f53a58a29e5e728108abababababababab 7c0a8208b4e0e48bf8e2d06a9000 +on 5.133 5.133 Transmit 0047009a0bac09800106aa0101ab0101 7f498188818180b9e097d74be131764fad9079c99939ccc82794cac3bca44c4b8764c8016d2e13ce028450ab1c1f05ef92c07715df41dbf859cc65af11d35d42a035780adf23ac98761c298a707a71f61714cff5af78c5762784d620c5c828c787733ce4860883ae3318c74345fc64ec3d3668aa8277d98537289883bdd08e2cf7e7497201deb782030100019000 +on 684.832 684.832 Transmit 0087069a887c818582008181800001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d0609608648016503040201050004202cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 7c8183828180b41cfbb93efa19a271c60e8adb17ba587fa91b9287ab4ff309c350f99d7c6327692b16100413e45dab3f406c901989f9becd83a80db9a8bd874fa3f8bb4022ca092532f620972e6602e77936b5134216c3b7c1b6bd040588476a4c856b487b436288590ff0beb6f815ee50ac67329706db29665a56f3409f7cf23e5f2970da0b9000 +on 738.937 738.937 EndTransaction diff --git a/mockdata/TestSignRSA/RSA-2048/yk-5.4.3 b/mockdata/TestSignRSA/RSA-2048/yk-5.4.3 new file mode 100644 index 0000000..965d5e9 --- /dev/null +++ b/mockdata/TestSignRSA/RSA-2048/yk-5.4.3 @@ -0,0 +1,24 @@ +mockfile + +file version v3 +file created 2024-06-05T21:17:41+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 23852774 +meta yubikey.version 5.4.3 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.210 0.210 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 1.755 1.755 Transmit 00fd0000 0504039000 +on 2.497 2.497 Transmit 00f7009b 010103020200010501019000 +on 3.433 3.433 Transmit 0087039b047c028000 7c0a8008be33c84119e53d5a9000 +on 4.737 4.737 Transmit 0087039b167c148008cb8496877f9e4df28108abababababababab 7c0a8208b4e0e48bf8e2d06a9000 +on 5.969 5.969 Transmit 0047009a0bac09800107aa0101ab0101 7f4982010981820100cf1512bd82a438c424b76304f462cfdb8760748a09231e81a43ceb092d2d4c7e381c4daa8cc6bd12c3fbdc6919c0e563bfc4ae45654cd4255e633b3096e9e1f7e17ff62d2195c33b0e12bbec8f5dba977df01c1340a13ee3dfdedcc505d9b6dada42f88f0a2a297fbc7f3b4bf6663ff3720a96bdfff0cc377d3c88dc7298c5c94c69db1a038a87b7a4fb846f430726b9e876b3846a6718fe632befe74faa9c530405ee36a6274c31fa726b849aa873ab6a310fc0aa11ebe6ec40bbb1673e86c5553c70cb543367fd4618dd22e759eaa0cf90898384d933127125b65c053c8b54cc8359688a60c4e55314f973278242a7f650bda5ad219f610e +on 2997.314 2997.314 Transmit 00c00000 a73c748e682aad006782030100019000 +on 2998.310 2998.310 Transmit 0087079a00010a7c8201068200818201000001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d0609608648016503040201050004202cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 7c820104828201006299480969985d5c73ff248b660f2cb9bac8769bad220c87d2d1ef6c3f2e26b0b7de37f8a0c1bfa7e78d7b845ef6d7d5a62c5e56fc2bf7f3156d3a9a028cbc73c4a063317df38c1c41ff7929b5bf9f0903f79035fd0f2b01cc4c03ecf389f0ce99c332dcda26de1e5781eb727a7af3d56294ada34f1613bf3e99073b75a6055fa88ba3c5f9a59981233ba855691746e2c07b4e4c66d2177495a2a7de5ae8de34fb628b53f76e3f1de2d800901fa14aac5321cdc33333a83ffcab2aa1f09a249312ab474c2caa77ea7238eb54a0ed5fcc6bc285ca352fed2de794c075654f33b408ad8daa933244bab688dc5d89baba22dae1f4e756e7a7619ba1931edff97e9c9000 +on 3136.024 3136.024 EndTransaction diff --git a/mockdata/TestSignRSA/RSA/1024/yk-5.4.3 b/mockdata/TestSignRSA/RSA/1024/yk-5.4.3 deleted file mode 100644 index cd901b7..0000000 --- a/mockdata/TestSignRSA/RSA/1024/yk-5.4.3 +++ /dev/null @@ -1,30 +0,0 @@ -mockfile - -file.version v2 -file.created 2023-12-29T13:09:34Z -file.creator stv0g@pim - -meta attr.channel.type usb -meta attr.channel.usb.addr 3 -meta attr.channel.usb.bus 3 -meta attr.ifd.serial -meta attr.ifd.version 5.67.0 -meta attr.name.friendly Yubico YubiKey OTP+FIDO+CCID 00 00 -meta attr.name.system Yubico YubiKey OTP+FIDO+CCID 00 00 -meta attr.name.vendor Yubico -meta status.active_protocol t1,any -meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 -meta status.reader Yubico YubiKey OTP+FIDO+CCID 00 00 -meta status.state powered,negotiable,present -meta yubikey.serial 23852774 -meta yubikey.version 5.4.3 - -# start end method -on 0.000 0.000 BeginTransaction -on 0.049 0.049 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 -on 1.938 1.938 Transmit 00fd0000 0504039000 -on 2.934 2.934 Transmit 0087039b047c028000 7c0a8008546c0e80f542a6379000 -on 3.949 3.949 Transmit 0087039b167c148008c2ccea7d50b080568108abababababababab 7c0a8208b4e0e48bf8e2d06a9000 -on 4.941 4.941 Transmit 0047009a0bac09800106aa0101ab0101 7f498188818180c7d7d044a83c70ee2cebd324e78edec87bfaf69dcd668250e0185690538513c24b913fe4516bd6ba1543cea086eae4204e85d673c87836c8bf802ca0209b5a53ab804f00769d1db226d2bf57de6e45e292f7674f0fb99b13c055b8917666878a51de940e7dfd26795789e3e3902bef729ce6a55e9119dd6c2c102492130d81df82030100019000 -on 503.169 503.169 Transmit 0087069a887c818582008181800001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d0609608648016503040201050004202cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 7c818382818041ba0e42b5be6577a7a312cd580e6f9aa6330e6fb176071597d5e9283ae438224b09da5d20f279e75eea883a83b669826fc291529733e0e9ee85777cdebbcb6c766908571f965cfa813bac343b2596b9bb68c45edcb4aba38c5beeb0da57b282103f7e9bee5d3d8e6dd3c31661c4f775f5c845f6f0e2e5e13763747105fbc2189000 -on 563.171 563.171 EndTransaction diff --git a/mockdata/TestSignRSA/RSA/2048/yk-5.4.3 b/mockdata/TestSignRSA/RSA/2048/yk-5.4.3 deleted file mode 100644 index 98332c0..0000000 --- a/mockdata/TestSignRSA/RSA/2048/yk-5.4.3 +++ /dev/null @@ -1,31 +0,0 @@ -mockfile - -file.version v2 -file.created 2023-12-29T13:09:38Z -file.creator stv0g@pim - -meta attr.channel.type usb -meta attr.channel.usb.addr 3 -meta attr.channel.usb.bus 3 -meta attr.ifd.serial -meta attr.ifd.version 5.67.0 -meta attr.name.friendly Yubico YubiKey OTP+FIDO+CCID 00 00 -meta attr.name.system Yubico YubiKey OTP+FIDO+CCID 00 00 -meta attr.name.vendor Yubico -meta status.active_protocol t1,any -meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 -meta status.reader Yubico YubiKey OTP+FIDO+CCID 00 00 -meta status.state present,powered,negotiable -meta yubikey.serial 23852774 -meta yubikey.version 5.4.3 - -# start end method -on 0.000 0.000 BeginTransaction -on 0.049 0.049 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 -on 1.932 1.932 Transmit 00fd0000 0504039000 -on 2.924 2.924 Transmit 0087039b047c028000 7c0a8008ff62517bdfe88fe09000 -on 3.936 3.936 Transmit 0087039b167c148008f62579d2061b007f8108abababababababab 7c0a8208b4e0e48bf8e2d06a9000 -on 4.928 4.928 Transmit 0047009a0bac09800107aa0101ab0101 7f4982010981820100c04317e33dd1d06cc2cf5bf0594befd8ad4d4c0e39449b0fcd866d227b8c620eaffcacc05d1e8428a0a7b5c5124aa16295440c93ee8c6df45fa4893944c7522176a2e1579f0cefca9626cf50b14cbeab6c88da1cf579f440a7c114b4f15aebe363d4d9b997c0bbfb904fcfb12eb4bce3d88107135fb6beed469608015871686fda5e870b7eacedec16a221192de683c979ae2b50fcdf4f408cdd1b60d8af4293c1f5ea9e679e9006153cdb5c8c882051ceee7edd3dfe9f77a897d4f37b9fc150947a60a22a50a946e77b62f545b148f0a895da5037b097b8a458b19cbe6f945fe6d9cdf31dd17dac5bbc9b2586d4b9d226772b0018df8e610e -on 3656.160 3656.160 Transmit 00c00000 fe468723d2418595a182030100019000 -on 3658.017 3658.017 Transmit 0087079a00010a7c8201068200818201000001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d0609608648016503040201050004202cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 7c820104828201004ef9420d16da2629ef058bb58b2771cc3a1cfb2cfd893b5c41a54c32768abef6fe8e0b8a9fe86c644d30c207ebda1dd38dc75ba621246129155af6228b75d4a0b5748dbae3f7a9f645622a5b0fd731bb36a8292fce3960c3cf7b25575c09e7d535b5b7c39d4c7b14838eebf52631e59e81cabd9ce155e6ed5fa3e32211cf3a5905b7b6a391bfba41fa04b3ddb08113aba93cdfcd0611eb48993a12be8d73e6b760e1fb14153fbfd618b3b96c07a2d13e69c4bccdec7c2f48de385c72e08273003187107683e7d77fa4064f5fa3b78a1ce035a894e544c17f6f803d4b59f623a9f0a8daaa121b6c7e4ab6a634438a699de7a6d04443fd9ba2588a886fcd4d46699000 -on 3797.498 3797.498 EndTransaction diff --git a/mockdata/TestSignRSAPSS/RSA/1024/yk-5.4.3 b/mockdata/TestSignRSAPSS/RSA-1024/yk-5.4.3 similarity index 100% rename from mockdata/TestSignRSAPSS/RSA/1024/yk-5.4.3 rename to mockdata/TestSignRSAPSS/RSA-1024/yk-5.4.3 diff --git a/mockdata/TestSignRSAPSS/RSA/2048/yk-5.4.3 b/mockdata/TestSignRSAPSS/RSA-2048/yk-5.4.3 similarity index 100% rename from mockdata/TestSignRSAPSS/RSA/2048/yk-5.4.3 rename to mockdata/TestSignRSAPSS/RSA-2048/yk-5.4.3 diff --git a/mockdata/TestSlots/Authentication/yk-5.7.1 b/mockdata/TestSlots/Authentication/yk-5.7.1 new file mode 100644 index 0000000..53dd8cd --- /dev/null +++ b/mockdata/TestSlots/Authentication/yk-5.7.1 @@ -0,0 +1,38 @@ +mockfile + +file version v3 +file created 2024-06-11T12:21:01+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state powered,specific,present +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.095 0.095 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.867 0.867 Transmit 00fd0000 0507019000 +on 2.042 2.042 Transmit 00200080083631353832323531 63c2 +on 7.931 7.931 Transmit 00200080083631353832323531 63c1 +on 13.962 13.962 Transmit 00200080083631353832323531 6983 +on 19.759 19.759 Transmit 002400811036313538323235313631353832323531 63c2 +on 25.505 25.505 Transmit 002400811036313538323235313631353832323531 63c1 +on 31.303 31.303 Transmit 002400811036313538323235313631353832323531 6983 +on 37.022 37.022 Transmit 00fb0000 9000 +on 953.842 953.842 Transmit 00f7009b 01010a020200010501019000 +on 955.616 955.616 Transmit 00870a9b047c028000 7c1280106ab59cbcf8cfa4fa904a79b1dc09ceca9000 +on 957.540 957.540 Transmit 00870a9b267c248010bc7b142fb99976fc2192dcde8523e0a28110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 959.398 959.398 Transmit 0047009a0bac09800111aa0101ab0101 7f4943864104df79c10269bb85b8e32ce3820d67686a23a507b1ce264d1d0e38b1d835f5500b4fe73b7397b22592ec667d7363a7b7f68a8f721ca32183b554e564e37ff7e6f89000 +on 1642.754 1642.754 Transmit 00f7009a 010111020201010301010443864104df79c10269bb85b8e32ce3820d67686a23a507b1ce264d1d0e38b1d835f5500b4fe73b7397b22592ec667d7363a7b7f68a8f721ca32183b554e564e37ff7e6f89000 +on 1645.123 1645.123 Transmit 0087119a267c2482008120af6d4386299726f7acffa3b7ec024df186a2fdc9ab134ddc7b2ce2af28e6a262 7c4982473045022100b0b24ecb5bcaf027e536601be9b8293a13008ff1917edabd33c894004531fea602206ed7459776698823666df41f1021ad088deb5a166337670e284cf104235227869000 +on 1721.079 1721.079 Transmit 00cb3fff055c035fc105 6a82 +on 1722.533 1722.533 Transmit 00f7009b 01010a020200010501019000 +on 1723.824 1723.824 Transmit 00870a9b047c028000 7c1280104d76be4af47cca1c7e396abd61978c579000 +on 1725.615 1725.615 Transmit 00870a9b267c2480103c44e2e648c08fea68a525aace3ff20d8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 1727.197 1727.197 Transmit 00db3fff0001525c035fc10553820149708201413082013d3081e4a003020102020101300a06082a8648ce3d040302301431123010060355040313096d792d636c69656e74301e170d3230303130313030303030305a170d3330303130313030303030305a301431123010060355040313096d792d636c69656e743059301306072a8648ce3d020106082a8648ce3d03010703420004df79c10269bb85b8e32ce3820d67686a23a507b1ce264d1d0e38b1d835f5500b4fe73b7397b22592ec667d7363a7b7f68a8f721ca32183b554e564e37ff7e6f8a3273025300e0603551d0f0101ff0404030205a030130603551d25040c300a06082b06010505070302300a06082a8648ce3d0403020348003045022100b0b24ecb5bcaf027e536601be9b8293a13008ff1917edabd33c894004531fea602206ed7459776698823666df41f1021ad088deb5a166337670e284cf104235227867100fe00 9000 +on 1749.271 1749.271 Transmit 00cb3fff055c035fc105 53820149708201413082013d3081e4a003020102020101300a06082a8648ce3d040302301431123010060355040313096d792d636c69656e74301e170d3230303130313030303030305a170d3330303130313030303030305a301431123010060355040313096d792d636c69656e743059301306072a8648ce3d020106082a8648ce3d03010703420004df79c10269bb85b8e32ce3820d67686a23a507b1ce264d1d0e38b1d835f5500b4fe73b7397b22592ec667d7363a7b7f68a8f721ca32183b554e564e37ff7e6f8a3273025300e0603551d0f0101ff0404030205a030130603551d25040c300a06082b06010505070302300a06082a8648ce3d04030203614d +on 1751.218 1751.218 Transmit 00c00000 48003045022100b0b24ecb5bcaf027e536601be9b8293a13008ff1917edabd33c894004531fea602206ed7459776698823666df41f1021ad088deb5a166337670e284cf104235227867100fe009000 +on 1751.906 1751.906 EndTransaction diff --git a/mockdata/TestSlots/CardAuthentication/yk-5.7.1 b/mockdata/TestSlots/CardAuthentication/yk-5.7.1 new file mode 100644 index 0000000..931459f --- /dev/null +++ b/mockdata/TestSlots/CardAuthentication/yk-5.7.1 @@ -0,0 +1,38 @@ +mockfile + +file version v3 +file created 2024-06-11T12:21:03+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state specific,present,powered +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.170 0.170 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.948 0.948 Transmit 00fd0000 0507019000 +on 2.284 2.284 Transmit 00200080083631353832323531 63c2 +on 8.149 8.149 Transmit 00200080083631353832323531 63c1 +on 14.061 14.061 Transmit 00200080083631353832323531 6983 +on 19.849 19.849 Transmit 002400811036313538323235313631353832323531 63c2 +on 25.517 25.517 Transmit 002400811036313538323235313631353832323531 63c1 +on 31.451 31.451 Transmit 002400811036313538323235313631353832323531 6983 +on 37.226 37.226 Transmit 00fb0000 9000 +on 946.711 946.711 Transmit 00f7009b 01010a020200010501019000 +on 952.019 952.019 Transmit 00870a9b047c028000 7c1280100b050f7a7aca8c63525597936219e71a9000 +on 954.313 954.313 Transmit 00870a9b267c24801064f99c63e2e3f2df217323a34cb86e4e8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 956.367 956.367 Transmit 0047009e0bac09800111aa0101ab0101 7f4943864104e4d4b4ef2de91437bd1c5c266e351374d60301377200beb5fa66176d339c2ea2c02cd427ca8bee1035a45b512dd01549fcff845d251208edc316af2eda9ce7559000 +on 1373.326 1373.326 Transmit 00f7009e 010111020201010301010443864104e4d4b4ef2de91437bd1c5c266e351374d60301377200beb5fa66176d339c2ea2c02cd427ca8bee1035a45b512dd01549fcff845d251208edc316af2eda9ce7559000 +on 1376.314 1376.314 Transmit 0087119e267c24820081200bc0b3ebe4af36c3a9df6c634decc5ee0eb8a8e6586dd43a2b1029e81652e91f 7c4a82483046022100ae98b327426a6634911011bacf9cbc17242614ff399644c52632cae784ded11e0221008dfa82b858e02b55dcdd3ebd3316a0f1b5f561d10ecf6b18e6965f19816fdd499000 +on 1452.268 1452.268 Transmit 00cb3fff055c035fc101 6a82 +on 1453.489 1453.489 Transmit 00f7009b 01010a020200010501019000 +on 1454.920 1454.920 Transmit 00870a9b047c028000 7c128010466ae0d9816a437adc750a962711761e9000 +on 1456.624 1456.624 Transmit 00870a9b267c248010ca4113257950c69f95a1f35bf300ed058110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 1458.594 1458.594 Transmit 00db3fff0001535c035fc1015382014a708201423082013e3081e4a003020102020101300a06082a8648ce3d040302301431123010060355040313096d792d636c69656e74301e170d3230303130313030303030305a170d3330303130313030303030305a301431123010060355040313096d792d636c69656e743059301306072a8648ce3d020106082a8648ce3d03010703420004e4d4b4ef2de91437bd1c5c266e351374d60301377200beb5fa66176d339c2ea2c02cd427ca8bee1035a45b512dd01549fcff845d251208edc316af2eda9ce755a3273025300e0603551d0f0101ff0404030205a030130603551d25040c300a06082b06010505070302300a06082a8648ce3d0403020349003046022100ae98b327426a6634911011bacf9cbc17242614ff399644c52632cae784ded11e0221008dfa82b858e02b55dcdd3ebd3316a0f1b5f561d10ecf6b18e6965f19816fdd497100fe00 9000 +on 1480.726 1480.726 Transmit 00cb3fff055c035fc101 5382014a708201423082013e3081e4a003020102020101300a06082a8648ce3d040302301431123010060355040313096d792d636c69656e74301e170d3230303130313030303030305a170d3330303130313030303030305a301431123010060355040313096d792d636c69656e743059301306072a8648ce3d020106082a8648ce3d03010703420004e4d4b4ef2de91437bd1c5c266e351374d60301377200beb5fa66176d339c2ea2c02cd427ca8bee1035a45b512dd01549fcff845d251208edc316af2eda9ce755a3273025300e0603551d0f0101ff0404030205a030130603551d25040c300a06082b06010505070302300a06082a8648ce3d04030203614e +on 1482.854 1482.854 Transmit 00c00000 49003046022100ae98b327426a6634911011bacf9cbc17242614ff399644c52632cae784ded11e0221008dfa82b858e02b55dcdd3ebd3316a0f1b5f561d10ecf6b18e6965f19816fdd497100fe009000 +on 1483.628 1483.628 EndTransaction diff --git a/mockdata/TestSlots/KeyManagement/yk-5.7.1 b/mockdata/TestSlots/KeyManagement/yk-5.7.1 new file mode 100644 index 0000000..fe8f234 --- /dev/null +++ b/mockdata/TestSlots/KeyManagement/yk-5.7.1 @@ -0,0 +1,38 @@ +mockfile + +file version v3 +file created 2024-06-11T12:21:04+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.077 0.077 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.809 0.809 Transmit 00fd0000 0507019000 +on 1.884 1.884 Transmit 00200080083631353832323531 63c2 +on 7.728 7.728 Transmit 00200080083631353832323531 63c1 +on 13.773 13.773 Transmit 00200080083631353832323531 6983 +on 19.729 19.729 Transmit 002400811036313538323235313631353832323531 63c2 +on 25.629 25.629 Transmit 002400811036313538323235313631353832323531 63c1 +on 31.356 31.356 Transmit 002400811036313538323235313631353832323531 6983 +on 37.230 37.230 Transmit 00fb0000 9000 +on 912.518 912.518 Transmit 00f7009b 01010a020200010501019000 +on 914.464 914.464 Transmit 00870a9b047c028000 7c1280101433c1065dbfc5b20c8767d5f262a6269000 +on 916.483 916.483 Transmit 00870a9b267c248010cb2af5d80f1d9794ab54d291ff68da438110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 918.466 918.466 Transmit 0047009d0bac09800111aa0101ab0101 7f4943864104ffe31591f82a32be23931bf041b7bf32929774551e8445231cc7b5a88081673cc59a75eaf7866e8a3aa889c963d59d64c3b680b30dbfc828fe7119d56bcf3de09000 +on 1335.688 1335.688 Transmit 00f7009d 010111020201010301010443864104ffe31591f82a32be23931bf041b7bf32929774551e8445231cc7b5a88081673cc59a75eaf7866e8a3aa889c963d59d64c3b680b30dbfc828fe7119d56bcf3de09000 +on 1340.209 1340.209 Transmit 0087119d267c24820081205255448615133235c968c319509ea06910ef312e9a121e05f6430991f3e56d2b 7c4882463044022078968e4099aaa9cb57408a015a8fd0f81dc808551013ab95ba59f7bd86aecd940220709cc93521f9936f946cf481d273802156a5a52ca72ba52677a44978e8020a2e9000 +on 1416.680 1416.680 Transmit 00cb3fff055c035fc10b 6a82 +on 1418.195 1418.195 Transmit 00f7009b 01010a020200010501019000 +on 1419.796 1419.796 Transmit 00870a9b047c028000 7c128010a619c2e1d0364cb0bde1d49dca323a139000 +on 1421.652 1421.652 Transmit 00870a9b267c24801094608057ad6bee99b59478657b47d3f48110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 1423.560 1423.560 Transmit 00db3fff0001515c035fc10b53820148708201403082013c3081e4a003020102020101300a06082a8648ce3d040302301431123010060355040313096d792d636c69656e74301e170d3230303130313030303030305a170d3330303130313030303030305a301431123010060355040313096d792d636c69656e743059301306072a8648ce3d020106082a8648ce3d03010703420004ffe31591f82a32be23931bf041b7bf32929774551e8445231cc7b5a88081673cc59a75eaf7866e8a3aa889c963d59d64c3b680b30dbfc828fe7119d56bcf3de0a3273025300e0603551d0f0101ff0404030205a030130603551d25040c300a06082b06010505070302300a06082a8648ce3d0403020347003044022078968e4099aaa9cb57408a015a8fd0f81dc808551013ab95ba59f7bd86aecd940220709cc93521f9936f946cf481d273802156a5a52ca72ba52677a44978e8020a2e7100fe00 9000 +on 1445.708 1445.708 Transmit 00cb3fff055c035fc10b 53820148708201403082013c3081e4a003020102020101300a06082a8648ce3d040302301431123010060355040313096d792d636c69656e74301e170d3230303130313030303030305a170d3330303130313030303030305a301431123010060355040313096d792d636c69656e743059301306072a8648ce3d020106082a8648ce3d03010703420004ffe31591f82a32be23931bf041b7bf32929774551e8445231cc7b5a88081673cc59a75eaf7866e8a3aa889c963d59d64c3b680b30dbfc828fe7119d56bcf3de0a3273025300e0603551d0f0101ff0404030205a030130603551d25040c300a06082b06010505070302300a06082a8648ce3d04030203614c +on 1448.064 1448.064 Transmit 00c00000 47003044022078968e4099aaa9cb57408a015a8fd0f81dc808551013ab95ba59f7bd86aecd940220709cc93521f9936f946cf481d273802156a5a52ca72ba52677a44978e8020a2e7100fe009000 +on 1448.826 1448.826 EndTransaction diff --git a/mockdata/TestSlots/Signature/yk-5.7.1 b/mockdata/TestSlots/Signature/yk-5.7.1 new file mode 100644 index 0000000..2806a9a --- /dev/null +++ b/mockdata/TestSlots/Signature/yk-5.7.1 @@ -0,0 +1,38 @@ +mockfile + +file version v3 +file created 2024-06-11T12:21:06+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state present,powered,specific +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.083 0.083 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.827 0.827 Transmit 00fd0000 0507019000 +on 2.043 2.043 Transmit 00200080083631353832323531 63c2 +on 7.837 7.837 Transmit 00200080083631353832323531 63c1 +on 13.886 13.886 Transmit 00200080083631353832323531 6983 +on 19.813 19.813 Transmit 002400811036313538323235313631353832323531 63c2 +on 25.631 25.631 Transmit 002400811036313538323235313631353832323531 63c1 +on 31.419 31.419 Transmit 002400811036313538323235313631353832323531 6983 +on 37.332 37.332 Transmit 00fb0000 9000 +on 912.277 912.277 Transmit 00f7009b 01010a020200010501019000 +on 913.981 913.981 Transmit 00870a9b047c028000 7c12801048e3b33aeffaef8e88107e65c6ad19589000 +on 915.863 915.863 Transmit 00870a9b267c2480102dc647fcb3a10dec4f33371a432617ea8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 917.804 917.804 Transmit 0047009c0bac09800111aa0101ab0101 7f4943864104cb961a725a5ff7103f75437fd57e3c7fda1a427aa04ce3c90936aa177484a91c3e377aaaf36534560ea78798cbd9a83039653045fc46648201b5d45a5a49b1679000 +on 1333.673 1333.673 Transmit 00f7009c 010111020201010301010443864104cb961a725a5ff7103f75437fd57e3c7fda1a427aa04ce3c90936aa177484a91c3e377aaaf36534560ea78798cbd9a83039653045fc46648201b5d45a5a49b1679000 +on 1336.091 1336.091 Transmit 0087119c267c2482008120dad38ba32533e7d13d5b9eec682c72f2eff37bfbd296fded938fbd0b1b2f59d5 7c48824630440220414a8b17efd491c6b44cabaa973475bbe78bb7e37565d60e33a1ddcd6d0e28b902205fdd95b611842436d1e2862f3ce19c208542fb6ae68b942d4b6415d04f9409359000 +on 1411.679 1411.679 Transmit 00cb3fff055c035fc10a 6a82 +on 1412.953 1412.953 Transmit 00f7009b 01010a020200010501019000 +on 1414.388 1414.388 Transmit 00870a9b047c028000 7c128010afc88034a337b3e22b32284b839bc6199000 +on 1416.205 1416.205 Transmit 00870a9b267c2480101ea084aeaa8496fcbf27e5595dddd2ca8110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 1418.100 1418.100 Transmit 00db3fff0001515c035fc10a53820148708201403082013c3081e4a003020102020101300a06082a8648ce3d040302301431123010060355040313096d792d636c69656e74301e170d3230303130313030303030305a170d3330303130313030303030305a301431123010060355040313096d792d636c69656e743059301306072a8648ce3d020106082a8648ce3d03010703420004cb961a725a5ff7103f75437fd57e3c7fda1a427aa04ce3c90936aa177484a91c3e377aaaf36534560ea78798cbd9a83039653045fc46648201b5d45a5a49b167a3273025300e0603551d0f0101ff0404030205a030130603551d25040c300a06082b06010505070302300a06082a8648ce3d04030203470030440220414a8b17efd491c6b44cabaa973475bbe78bb7e37565d60e33a1ddcd6d0e28b902205fdd95b611842436d1e2862f3ce19c208542fb6ae68b942d4b6415d04f9409357100fe00 9000 +on 1440.342 1440.342 Transmit 00cb3fff055c035fc10a 53820148708201403082013c3081e4a003020102020101300a06082a8648ce3d040302301431123010060355040313096d792d636c69656e74301e170d3230303130313030303030305a170d3330303130313030303030305a301431123010060355040313096d792d636c69656e743059301306072a8648ce3d020106082a8648ce3d03010703420004cb961a725a5ff7103f75437fd57e3c7fda1a427aa04ce3c90936aa177484a91c3e377aaaf36534560ea78798cbd9a83039653045fc46648201b5d45a5a49b167a3273025300e0603551d0f0101ff0404030205a030130603551d25040c300a06082b06010505070302300a06082a8648ce3d04030203614c +on 1442.296 1442.296 Transmit 00c00000 470030440220414a8b17efd491c6b44cabaa973475bbe78bb7e37565d60e33a1ddcd6d0e28b902205fdd95b611842436d1e2862f3ce19c208542fb6ae68b942d4b6415d04f9409357100fe009000 +on 1442.972 1442.972 EndTransaction diff --git a/mockdata/TestStoreCertificate/yk-5.7.1 b/mockdata/TestStoreCertificate/yk-5.7.1 new file mode 100644 index 0000000..72271b1 --- /dev/null +++ b/mockdata/TestStoreCertificate/yk-5.7.1 @@ -0,0 +1,28 @@ +mockfile + +file version v3 +file created 2024-06-05T18:47:27+02:00 +file creator stv0g@cam + +meta status.active_protocol any,t1 +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state specific,present,powered +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.159 0.159 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 2.499 2.499 Transmit 00fd0000 0507019000 +on 4.301 4.301 Transmit 00f7009b 01010a020200010501019000 +on 5.553 5.553 Transmit 00870a9b047c028000 7c128010cb14dec3e0897b14a198626070419bb59000 +on 7.305 7.305 Transmit 00870a9b267c2480102941b57e36c81b5a805503a876d136758110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 9.210 9.210 Transmit 0047009a0bac09800111aa0101ab0101 7f4943864104f7c009e33a8ff5c16b79e87cb529f01980e7fe99246258de023470a7dc0c20fb4950319f66ace7e1b72022a8d91f18301dea6d39567fa085bde6359efef45ece9000 +on 427.462 427.462 Transmit 00f7009b 01010a020200010501019000 +on 428.910 428.910 Transmit 00870a9b047c028000 7c128010a12d72c24c43dfa59670f503ae187ce39000 +on 431.003 431.003 Transmit 00870a9b267c248010ce718258f23215e248e9a0a778fd3dd08110abababababababababababababababab 7c12821040e0910c0a9420eb12ba9efcb51c48829000 +on 432.904 432.904 Transmit 00db3fff0001715c035fc10553820168708201603082015c30820101a003020102020165300a06082a8648ce3d0403023010310e300c060355040313056d792d6361301e170d3230303130313030303030305a170d3330303130313030303030305a301431123010060355040313096d792d636c69656e743059301306072a8648ce3d020106082a8648ce3d03010703420004f7c009e33a8ff5c16b79e87cb529f01980e7fe99246258de023470a7dc0c20fb4950319f66ace7e1b72022a8d91f18301dea6d39567fa085bde6359efef45ecea3483046300e0603551d0f0101ff0404030205a030130603551d25040c300a06082b06010505070302301f0603551d23041830168014c6e63d8027b141fa6329f4b13d6dddfdf1c0637b300a06082a8648ce3d0403020349003046022100d9c65174a8726ac75fde9eb435416e1a0ce5230c5e4ee4e604b4d27c9d87eb00022100eb57ce24d91b296ff30d66c76c2a9e555783b4acf4fe6a0e8bd3064a4d039c907100fe00 9000 +on 455.702 455.702 Transmit 00cb3fff055c035fc105 53820168708201603082015c30820101a003020102020165300a06082a8648ce3d0403023010310e300c060355040313056d792d6361301e170d3230303130313030303030305a170d3330303130313030303030305a301431123010060355040313096d792d636c69656e743059301306072a8648ce3d020106082a8648ce3d03010703420004f7c009e33a8ff5c16b79e87cb529f01980e7fe99246258de023470a7dc0c20fb4950319f66ace7e1b72022a8d91f18301dea6d39567fa085bde6359efef45ecea3483046300e0603551d0f0101ff0404030205a030130603551d25040c300a06082b06010505070302301f0603551d23041830168014c6e63d616c +on 458.434 458.434 Transmit 00c00000 8027b141fa6329f4b13d6dddfdf1c0637b300a06082a8648ce3d0403020349003046022100d9c65174a8726ac75fde9eb435416e1a0ce5230c5e4ee4e604b4d27c9d87eb00022100eb57ce24d91b296ff30d66c76c2a9e555783b4acf4fe6a0e8bd3064a4d039c907100fe009000 +on 459.272 459.272 EndTransaction diff --git a/mockdata/TestUnblockPIN/yk-5.7.1 b/mockdata/TestUnblockPIN/yk-5.7.1 new file mode 100644 index 0000000..5491fde --- /dev/null +++ b/mockdata/TestUnblockPIN/yk-5.7.1 @@ -0,0 +1,23 @@ +mockfile + +file version v3 +file created 2024-06-05T18:39:22+02:00 +file creator stv0g@cam + +meta status.active_protocol t1,any +meta status.atr 3bfd1300008131fe158073c021c057597562694b657940 +meta status.reader Yubico YubiKey OTP+FIDO+CCID +meta status.state powered,specific,present +meta yubikey.serial 29173673 +meta yubikey.version 5.7.1 + +# start end method +on 0.000 0.000 BeginTransaction +on 0.061 0.061 Transmit 00a4040009a0000003080000100000 61114f0600001000010079074f05a0000003089000 +on 0.692 0.692 Transmit 00fd0000 0507019000 +on 1.703 1.703 Transmit 002000800830ffffffffffffff 63c2 +on 7.360 7.360 Transmit 002000800830ffffffffffffff 63c1 +on 12.988 12.988 Transmit 002000800830ffffffffffffff 6983 +on 18.803 18.803 Transmit 002c0080103132333435363738313233343536ffff 9000 +on 48.357 48.357 Transmit 0020008008313233343536ffff 9000 +on 58.051 58.051 EndTransaction diff --git a/object.go b/object.go index 6bb8897..f151cef 100644 --- a/object.go +++ b/object.go @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2023 Steffen Vogel +// SPDX-FileCopyrightText: 2023-2024 Steffen Vogel // SPDX-License-Identifier: Apache-2.0 package piv diff --git a/pin_policy.go b/pin_policy.go index 63da224..7145648 100644 --- a/pin_policy.go +++ b/pin_policy.go @@ -58,7 +58,7 @@ func pinPolicy(c *Card, slot Slot) (PINPolicy, error) { // Attestation cert command not supported, probably an older YubiKey. // Guess PINPolicyAlways. // - // See https://cunicu.li/go-piv/issues/55 + // https://github.com/go-piv/piv-go/issues/55 return PINPolicyAlways, nil } diff --git a/pin_policy_test.go b/pin_policy_test.go index 33881dc..c50ab2e 100644 --- a/pin_policy_test.go +++ b/pin_policy_test.go @@ -16,7 +16,7 @@ func TestPINPolicy(t *testing.T) { withCard(t, true, false, SupportsMetadata, func(t *testing.T, c *Card) { // for imported keys, using the attestation certificate to derive the PIN // policy fails. So we check that pinPolicy succeeds with imported keys. - priv := testKey(t, AlgTypeECCP, 256) + priv := testKey(t, AlgECCP256) err := c.SetPrivateKeyInsecure(DefaultManagementKey, SlotAuthentication, priv, Key{ Algorithm: AlgECCP256, diff --git a/pin_protected.go b/pin_protected.go index 2c763ff..a80560a 100644 --- a/pin_protected.go +++ b/pin_protected.go @@ -7,7 +7,7 @@ import ( "errors" "fmt" - "cunicu.li/go-iso7816" + iso "cunicu.li/go-iso7816" "cunicu.li/go-iso7816/encoding/tlv" ) @@ -48,7 +48,7 @@ func (d *PinProtectedData) SetManagementKey(key ManagementKey) error { if tvs := d.PopAll(0x88); len(tvs) == 0 { tvYubico = tlv.New(0x88) } else if len(tvs) > 1 { - return fmt.Errorf("%w: found more then one YubiKey pin protected tag value", errUnmarshal) + return fmt.Errorf("%w: found more then one YubiKey PIN protected tag value", errUnmarshal) } else { tvYubico = tvs[0] } @@ -83,7 +83,7 @@ func (c *Card) PinProtectedData(pin string) (*PinProtectedData, error) { resp, err := sendTLV(c.tx, insGetData, 0x3f, 0xff, doPrinted.TagValue()) if err != nil { - if errors.Is(err, iso7816.ErrFileOrAppNotFound) { + if errors.Is(err, iso.ErrFileOrAppNotFound) { return nil, ErrNotFound } return nil, fmt.Errorf("failed to execute command: %w", err) diff --git a/piv.go b/piv.go index ed520ad..18ce22c 100644 --- a/piv.go +++ b/piv.go @@ -14,14 +14,14 @@ import ( "math/big" iso "cunicu.li/go-iso7816" - "cunicu.li/go-iso7816/devices/yubikey" + yk "cunicu.li/go-iso7816/devices/yubikey" "cunicu.li/go-iso7816/encoding/tlv" ) var ( errChallengeFailed = errors.New("challenge failed") errExpectedError = errors.New("expected error") - errInvalidPinLength = errors.New("invalid pin length") + errInvalidPinLength = errors.New("invalid PIN length") ) const ( @@ -54,6 +54,8 @@ const ( tagAlg = 0x80 // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-78-4.pdf#page=16 + keyPIN = 0x80 + keyPUK = 0x81 keyAuthentication = 0x9a keyCardManagement = 0x9b keySignature = 0x9c @@ -61,16 +63,15 @@ const ( keyCardAuthentication = 0x9e keyAttestation = 0xf9 - // TODO: Figure out why these are different from iso7816 ins. + // TODO: Figure out why these are different from iso7816 instructions. insGenerateAsymmetric = 0x47 insGetData = 0xcb insPutData = 0xdb // Yubico PIV extensions // - // See: - // - https://developers.yubico.com/PIV/Introduction/Yubico_extensions.html - // - https://github.com/Yubico/yubico-piv-tool/blob/yubico-piv-tool-1.7.0/lib/ykpiv.h#L656 + // https://developers.yubico.com/PIV/Introduction/Yubico_extensions.html + // https://github.com/Yubico/yubico-piv-tool/blob/yubico-piv-tool-1.7.0/lib/ykpiv.h#L656 insSetManagementKey = 0xff insImportKey = 0xfe insGetVersion = 0xfd @@ -79,6 +80,7 @@ const ( insAttest = 0xf9 insGetSerial = 0xf8 insGetMetadata = 0xf7 + insMoveDeleteKey = 0xf6 ) // Card is an exclusive open connection to a Card smart card. While open, @@ -154,8 +156,8 @@ func (c *Card) Serial() (uint32, error) { defer c.Select(iso.AidPIV) //nolint:errcheck - yk := yubikey.NewCard(c) - return yk.SerialNumber() + yc := yk.NewCard(c) + return yc.SerialNumber() } resp, err := send(c.tx, insGetSerial, 0, 0, nil) diff --git a/piv_test.go b/piv_test.go index 06bc8ff..a6a32df 100644 --- a/piv_test.go +++ b/piv_test.go @@ -26,7 +26,7 @@ func TestGetVersion(t *testing.T) { // as we need a deterministic test outputs to satisfy // the expected method call by your mocked smart-card. // -// See: https://github.com/golang/go/issues/38548 +// https://github.com/golang/go/issues/38548 type constReader struct{} func (r *constReader) Read(p []byte) (int, error) { @@ -76,8 +76,10 @@ func TestNewCard(t *testing.T) { func TestMultipleConnections(t *testing.T) { require := require.New(t) - if !test.DangerousWipeRealCard || runtime.GOOS == "darwin" { + if !test.DangerousWipeRealCard { t.Skip("not running test that accesses card, please set env var TEST_DANGEROUS_WIPE_REAL_CARD=1") + } else if runtime.GOOS == "darwin" { + t.Skip("Test is broken on macOS") } ctx, err := scard.EstablishContext() diff --git a/slot.go b/slot.go index aafd37c..41f2b7e 100644 --- a/slot.go +++ b/slot.go @@ -8,6 +8,19 @@ import ( "strings" ) +// Slot is a private key and certificate combination managed by the security key. +type Slot struct { + // Key is a reference for a key type. + // + // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=32 + Key byte + + // Object is a reference for data object. + // + // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=30 + Object Object +} + func parseSlot(commonName string) (Slot, bool) { if !strings.HasPrefix(commonName, yubikeySubjectCNPrefix) { return Slot{}, false @@ -52,7 +65,11 @@ var ( SlotKeyManagement = Slot{keyKeyManagement, doCertKeyManagement} // YubiKey specific - SlotAttestation = Slot{keyAttestation, doCertAttestation} + SlotAttestation = Slot{keyAttestation, doCertAttestation} + SlotPIN = Slot{Key: keyPIN} + SlotPUK = Slot{Key: keyPUK} + SlotCardManagement = Slot{Key: keyCardManagement} + SlotGraveyard = Slot{Key: 0xff} // Moving a key to this slot will destroy it ) // SlotRetiredKeyManagement provides access to "retired" slots. Slots meant for old Key Management diff --git a/tag.go b/tag.go index 8f0a396..5ae159d 100644 --- a/tag.go +++ b/tag.go @@ -1,9 +1,10 @@ -// SPDX-FileCopyrightText: 2023 Steffen Vogel +// SPDX-FileCopyrightText: 2023-2024 Steffen Vogel // SPDX-License-Identifier: Apache-2.0 package piv // Appendix A––PIV Data Mode +// // https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=37 // //nolint:unused @@ -90,4 +91,15 @@ const ( tagPINPolicy = 0xaa tagTouchPolicy = 0xab tagErrorDetectionCode = 0xfe + + // Yubikey extensions + + tagMetadataAlgo = 0x01 + tagMetadataPolicy = 0x02 + tagMetadataOrigin = 0x03 + tagMetadataPublicKey = 0x04 + tagMetadataIsDefault = 0x05 + tagMetadataRetries = 0x06 + tagMetadataBioConfigured = 0x07 + tagMetadataTemporaryPin = 0x08 ) diff --git a/testdata/Ed25519.key b/testdata/Ed25519.key new file mode 100644 index 0000000..3b7b6bd --- /dev/null +++ b/testdata/Ed25519.key @@ -0,0 +1,3 @@ +-----BEGIN PRIVATE KEY----- +MC4CAQAwBQYDK2VwBCIEIEkoWdK5hDarLbdmYr9d+eDSLqr7To3cc52lkTaEG+dV +-----END PRIVATE KEY----- diff --git a/testdata/RSA_3072.key b/testdata/RSA_3072.key new file mode 100644 index 0000000..cb412d5 --- /dev/null +++ b/testdata/RSA_3072.key @@ -0,0 +1,39 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIG4wIBAAKCAYEAuoQ0FGxRzaDmiaN5aRJEMHeY/mlOvPZRtd28tOkF0u+tjMep +h2c4T2kMHiF4IaZDFONgpnlNqxPJgbNpf+wiY0VdVbBtdMTuSOX7a6Wx8z4bJC1r +eZu9EY0pf3MWeh7WiYfsIOp+nHZtaMwdutdK3pK9pztzaxJpB8Qcug0S5t/kUdlv +8PH80d5jFZ3wIJA3g03Gx5g4R1GkuPRjF3BKtCu47U/AxC4X/f+6LDT+zx6HYikn +j898wJX8GCz8OmtPr8siUSOACIOuH40v/nAvYoa/r5I4ZtCVxM/js/+CXL1vVGnB +wVaUHRlymz7VOG8mWGPQeMKc7afjjMzwn2tw1iQL62191gSM5ULBpTfcbWBFnxZm +nvuU6vHTYJqkV+tD5GVBRqjaaT/HDvpDtpR/5ZFNlptOpQza8O3JXmg8yMODUHSN +B4JU4tsTt3XdDLxENLWn+r1ntm/TSGJTu2W3NiHjJ+zCL/LFZ3c2ctb961/gfZVm +X5FM0wa3M7clAERtAgMBAAECggGAGkBRNC6qtM5YpDal9+viPRAYMHaR5nakuXwj ++zJw52dkfdP8QFp+ym52jicXyWSlPGNkTwnzrIh0bBTcXGzXyjERGeZjAXRWNVxp +LpV7nki3eTgLUGpjCf1cQdvo5fdBKso+qcNXXp4sd/uCk7GJkBoHJ2purDtDHRy1 +DlqYtnX8pKh94OOuObubJoe8LFkf9xMTTzRVd3Q+QuniqIHdgc5FkOEQuIvkRJOh +mGc9FdmuJFq2fr8tR83UVXK/bVl89//1RJlpHqw4hav0SBM3VfU4QSqiNVdk03Ai +8IW2RGgJtGGVSKKvSgWBgBdYvrmE5Ez4r8YPtsZdYRMmGCz3kQSXkZlUAyRz3MPZ +OGIOqXLYux/Skrvvg03zTL0Pv1i6kNA1yqmRNwc7mItaT5MTlA3WPL9U9JftMoVs +2OAqABFzkkHJ8lhBToAdtpXCxo1vM0EETJqWNnygJUoP4xUhjiOGmS1Sx+LrbyB6 +90jueJeufMocDpsJa341P0FCF9fhAoHBAO12/UyTgtIfnW5z/Gjhv4aLNl+PhABh +3Zi7m2FAnsBcDRlLEwYRHAD2NZby1IG4ml9MM1lBNcVkIwhW5zfB5GiYFdgUMGly +nb7WjS+FZSXbDwMWVWFvD2eW74dUSJEYj2gz6i7I1pvyPP6rNx/QefmJp7NZXh0u +d6HHCNZoyf19QfIhTTKvjaVMTAbRL/jHc3XmEWVCco1mrU+K6zhclQhnnvoKGoGc +0xi3w0KEd8U2hE9jMTZlhlhjm0DT1B6eJwKBwQDJEypxK+rIHbRGZmnenjenPDJS +X2taZgAH+QSWAKS3vLC07DxTI/HfnNARJq26bLuMPv8g31XtQhUgT6YQw4h8wFgK +cVkRTZOj4Jqyqg4pgSgDAa95+3lSlDZee4VlVsJuILoJ562jU67tQd7FBTZZOqa0 +QTnp3shDwU1YWC4uNCuBs35UNQk3vtfvKL7xUFqbR7f0UVwm9Wz35F1EgZEaRSAU +dxU4Ds4PXF3hZMrvl/TQCf8wFD1OPdfbLBqs+UsCgcBCvhLrlvpJ/MDO7qKfB/RA +6JfbvAap5NfXucMuTm9QOY8k8MjkB6MLUig1yQKZgz1AU7aK+50VYdPG4EYUkdaU +30okdWg1+xUDMmJ0XNXVEgDiKUDOJdz6jJ2+N549yd1kuFK125UWN7uVCKJxurLN +xDbyXcfqA8l0GvEM8l7zdGU4nMuJ13XEY/FqaRlGnyiAlq2E/Gwd+iH0HWOHb94j +gpxYQsa4b0+VvvCOnZTcRTpi5cpLM7XS2gwk6GTSRjkCgcEAvIqoJW5UvEh+HfUy +GHirHrknRm4Kr70tEkzBrBX2XgMkfsF031C5IEBeKXbnOAN06NC5Ug2Y+NwaCy4k +PVvbw35oD4KxTbQ8WFHnPNiQZwKgjhEqhWr0HCa1xGp2bsunjLRLPbZr7tYtFHPL +e1qj149TeXof39fyWPYMnGYzB0gL85ZnQnZoqkjdGXhPct8x1qCtMP6JNk6zWs5b +Vj1X3hYrOoVe9C2NsoGd1hc44ujNubVl/6M6yP7cRLtaWA95AoHAFwnDFhZEUXT3 +QhcbpGTr8e2ll8FsAvyok9pZpuLQ/F9/sPEvkopWA/vnAFrjPCxcLCamTrgK5Wof +40h9FCy8rUMmJCNV4i/VIjdDaaY7lB1JF2hQdnxezzrVKuPCSDlLXjjSQChxmmEf +22IwXoxX/b76jx3hBLWBFnp7ViTZECxH68MBaKLrs/tkU9cnF2iKbnL7ScIEYGQC +1thkyRb6Qyd4xKisvfzeN2JEOeg6qT2Bn6LAlO9KZcCB2tcpnnfy +-----END RSA PRIVATE KEY----- diff --git a/testdata/X25519.key b/testdata/X25519.key new file mode 100644 index 0000000..6ac9cb6 --- /dev/null +++ b/testdata/X25519.key @@ -0,0 +1,3 @@ +-----BEGIN PRIVATE KEY----- +MC4CAQAwBQYDK2VuBCIEICCahkCOPJix6W3aRzgwhYZ6BRYdXx5s+HaZ0aynHApb +-----END PRIVATE KEY----- diff --git a/yubico_ca.go b/yubico_ca.go index eeb811b..2e3dee3 100644 --- a/yubico_ca.go +++ b/yubico_ca.go @@ -19,8 +19,10 @@ import ( var yubicoPIVCAPEMAfter2018 string // YubiKeys manufactured sometime in 2018 and prior to mid-2017 -// were certified using the U2F root CA with serial number 457200631 -// See https://github.com/Yubico/developers.yubico.com/pull/392/commits/a58f1003f003e04fc9baf09cad9f64f0c284fd47 +// were certified using the U2F root CA with serial number 457200631. +// +// https://github.com/Yubico/developers.yubico.com/pull/392/commits/a58f1003f003e04fc9baf09cad9f64f0c284fd47 +// // Cert available at https://developers.yubico.com/U2F/yubico-u2f-ca-certs.txt // //go:embed certs/yubico_u2f.crt @@ -49,7 +51,7 @@ func yubicoCAs() (*x509.CertPool, error) { // want to use the device attestation cert as intermediate cert in // the chain. To make this work, set pathlen of the U2F root to 1. // - // See https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.9 + // https://datatracker.ietf.org/doc/html/rfc5280#section-4.2.1.9 certU2F.MaxPathLen = 1 certPool.AddCert(certU2F)