emv

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNonCompliantIAD = errors.New("non compliant IAD")

Functions

func ComputeARPCMethod1

func ComputeARPCMethod1(sessionKey, arqc []byte, responseCode string) ([]byte, error)

func ComputeRawARQC

func ComputeRawARQC(sessionKey, data []byte) ([]byte, error)

func DeriveCommonSessionKey

func DeriveCommonSessionKey(masterkey, diversificationValue []byte) ([]byte, error)

DeriveCommonSessionKey always sets the parity to odd

func DeriveMasterKeyOptionA

func DeriveMasterKeyOptionA(mdk []byte, pan string, psn string) ([]byte, error)

DeriveMasterKeyOptionA always sets the parity to odd

func FormatPANAndPSNForDerivation

func FormatPANAndPSNForDerivation(pan string, psn string) ([]byte, error)

func RawDeriveCommonSessionKey

func RawDeriveCommonSessionKey(masterkey, diversificationValue []byte) ([]byte, error)

RawDeriveCommonSessionKey derives a Common Session Key as specified in EMV 4.x Book 2

func RawDeriveMasterKeyOptionA

func RawDeriveMasterKeyOptionA(mdk, panAndPSN []byte) ([]byte, error)

Types

type CVR added in v0.0.3

type CVR []byte

func (CVR) Explain added in v0.0.3

func (cvr CVR) Explain() string

type IssuerApplicationData added in v0.0.3

type IssuerApplicationData struct {
	CCI                     byte
	DKI                     byte
	CVR                     CVR
	Counters                []byte
	IssuerDiscretionaryData []byte
}

func ParseIAD added in v0.0.3

func ParseIAD(iad []byte) (IssuerApplicationData, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL