Documentation ¶
Index ¶
- Constants
- Variables
- func CalculateMac(meta []byte, data []byte, macKey []byte) ([]byte, error)
- func DecryptData(data []byte, encKey []byte, iv []byte) ([]byte, error)
- func DeriveSessionKeys(secret, pairingKey, cardData []byte) ([]byte, []byte, []byte)
- func EncryptData(data []byte, encKey []byte, iv []byte) ([]byte, error)
- func GenerateECDHSharedSecret(priv *ecdsa.PrivateKey, pub *ecdsa.PublicKey) []byte
- func OneShotEncrypt(pubKeyData, secret, data []byte) ([]byte, error)
- func VerifyCryptogram(challenge []byte, pairingPass string, cardCryptogram []byte) ([]byte, error)
Constants ¶
View Source
const PairingTokenSalt = "Keycard Pairing Password Salt"
Variables ¶
View Source
var ErrInvalidCardCryptogram = errors.New("invalid card cryptogram")
Functions ¶
func DeriveSessionKeys ¶
func GenerateECDHSharedSecret ¶
func GenerateECDHSharedSecret(priv *ecdsa.PrivateKey, pub *ecdsa.PublicKey) []byte
func OneShotEncrypt ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.