Skip to content

Commit

Permalink
Rename skSignEd25519 to ykSignEd25519 since it now targets YubiKeys
Browse files Browse the repository at this point in the history
  • Loading branch information
AGWA authored and ericchiang committed Oct 9, 2024
1 parent 8f5413e commit bc889e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions v2/piv/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ func (k *keyEd25519) Public() crypto.PublicKey {

func (k *keyEd25519) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error) {
return k.auth.do(k.yk, k.pp, func(tx *scTx) ([]byte, error) {
return skSignEd25519(tx, k.slot, k.pub, digest)
return ykSignEd25519(tx, k.slot, k.pub, digest)
})
}

Expand Down Expand Up @@ -1400,7 +1400,7 @@ func ykECDHX25519(tx *scTx, slot Slot, pub *ecdh.PublicKey, peer *ecdh.PublicKey
return sharedSecret, nil
}

func skSignEd25519(tx *scTx, slot Slot, pub ed25519.PublicKey, digest []byte) ([]byte, error) {
func ykSignEd25519(tx *scTx, slot Slot, pub ed25519.PublicKey, digest []byte) ([]byte, error) {
// Adaptation of
// https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-73-4.pdf#page=118
cmd := apdu{
Expand Down

0 comments on commit bc889e4

Please sign in to comment.