Versions in this module Expand all Collapse all v0 v0.1.6 Nov 6, 2024 v0.1.5 Apr 12, 2024 v0.1.4 Aug 17, 2022 v0.1.3 Aug 17, 2022 v0.1.2 Aug 5, 2022 v0.1.1 Jun 23, 2022 v0.1.0 Jun 23, 2022 Changes in this version + func ApduActivateOfflineKey(keyNo, keyVer int, divInput []byte) []byte + func ApduChangeKeyEntryFullMode(keyNbr, proMax, cmdCtr int, keyVA, keyVB, keyVC []byte, ...) ([]byte, error) + func ApduChangeKeyEntryMacMode(keyNbr, proMax, cmdCtr int, keyVA, keyVB, keyVC []byte, ...) ([]byte, error) + func ApduChangeKeyEntryOffline(keyNbr, proMax, changeCtr int, keyVA, keyVB, keyVC []byte, ...) ([]byte, error) + func ApduChangeKeyEntryPlainMode(keyNbr, proMax int, keyVA, keyVB, keyVC []byte, ...) ([]byte, error) + func ApduDecipherOffline_Data(last bool, cipher []byte) []byte + func ApduDecipher_Data(last bool, mifare int, cipher []byte) []byte + func ApduDumpSecretKey(keyNo, keyVer int, divInput []byte) []byte + func ApduDumpSessionKey() []byte + func ApduEncipherOffline_Data(last bool, dataPlain []byte) []byte + func ApduEncipher_Data(last bool, offset int, dataPlain []byte) []byte + func ApduGenerateCmac_Data(last bool, dataPlain []byte) []byte + func ApduGetVersion() []byte + func ApduLockUnlock(keyNr, keyVr, unlockKeyNo, unlockKeyVer, p1 int, maxchainBlocks []byte) []byte + func ApduLockUnlockPart2(cmacb, rnd []byte) []byte + func ApduNonXauthMFPf1(first bool, sl, keyNo, keyVer int, data, dataDiv []byte) []byte + func ApduNonXauthMFPf2(data []byte) []byte + func ApduPKIExportPublicKey(pkiKeyNo int) []byte + func ApduPKIGenerateKeyPair(pkiE []byte, pkiSET []byte, ...) [][]byte + func ApduPKIImportKey(pkiKeyNo, pkiKeyNoCEK, pkiKeyVCEK, pkiRefNoKUC int, ...) [][]byte + func ApduPKIUpdateKeyEntries(hashing HashingAlgorithm, keyEntrysNo int, pkiKeyNoEnc, pkiKeyNoSign int, ...) [][]byte + func ApduSAMCombinedReadMFP(typeMFPdata TypeMFPdata, isLastFrame bool, data []byte) []byte + func ApduSAMCombinedWriteMFP(typeMFPdata TypeMFPdata, data []byte) []byte + func ApduSamKillAuthPICC() []byte + func ExtSETConfigurationSettings(keyClass KeyClass, allowDumpSecretKey bool, restrictToDiversifiedUse bool) byte + func SETConfigurationSettings(allowDumpSessionKey bool, keepIV bool, keyType KeyType, authKey bool, ...) []byte + func SETConfigurationSettingsPKI(privKeyInclude bool, allowPrivKeyExport bool, disableKeyEntry bool, ...) []byte + type CrytoAlgorithm int + const AES_ALG + const DES_ALG + type EntryKey struct + DfAID []byte + DfKeyNo byte + ExtSet byte + KeyNoCEK byte + KeyVA []byte + KeyVB []byte + KeyVC []byte + KeyVCEK byte + RefNoKUC byte + Set []byte + Va byte + Vb byte + Vc byte + func NewEntryKey(data []byte, alg KeyType) *EntryKey + func (ek *EntryKey) Bytes() []byte + type EntryKeyData struct + DfAID []byte + DfKeyNo byte + KeyNoCEK byte + KeyVCEK byte + RefNoKUC byte + Set []byte + Va byte + Vb byte + Vc byte + func NewEntryKeyData(data []byte, alg KeyType) *EntryKeyData + type HashingAlgorithm int + const RFU + const SHA1 + const SHA224 + const SHA256 + type KeyClass int + const HOST_KEY + const OfflineChange_KEY + const OfflineCrypto_KEY + const PICC_KEY + func KeyClassByName(v string) KeyClass + type KeyType int + const AES_128 + const AES_192 + const MIFARE + const TDEA_DESFire_4 + const TDEA_ISO_10116 + const TDEA_ISO_10116__32CRC_8byteMAC + const TripleTDEA_ISO_10116 + type PKIPubKey struct + PKIKeyNoCEK int + PKIKeyVCEK int + PKIN *big.Int + PKINLen int + PKIRefNoKUC int + PKISet []byte + PKIe int + PKIeLen int + func ParseResponseToPKIPubKey(data []byte) (*PKIPubKey, error) + type ProMasEntryKey byte + func (p ProMasEntryKey) UpdateAll() ProMasEntryKey + func (p ProMasEntryKey) UpdateDFAidDFKey() ProMasEntryKey + func (p ProMasEntryKey) UpdateKeyNoCEJKeyVCEK() ProMasEntryKey + func (p ProMasEntryKey) UpdateKeyVa() ProMasEntryKey + func (p ProMasEntryKey) UpdateKeyVb() ProMasEntryKey + func (p ProMasEntryKey) UpdateKeyVc() ProMasEntryKey + func (p ProMasEntryKey) UpdateKeyVerSentSep() ProMasEntryKey + func (p ProMasEntryKey) UpdateRefKUC() ProMasEntryKey + func (p ProMasEntryKey) UpdateSET() ProMasEntryKey + type SamAv2 interface + ActivateOfflineKey func(keyNo, keyVer int, divInput []byte) ([]byte, error) + AuthHostAV1 func(block cipher.Block, keyNo, keyVer, authMode int) ([]byte, error) + AuthHostAV2 func(key []byte, keyNo, keyVr, hostMode int) ([]byte, error) + ChangeKeyEntry func(keyNbr, proMax int, keyVA, keyVB, keyVC []byte, ...) ([]byte, error) + ChangeKeyEntryAv1 func(keyNbr, proMax int, keyVA, keyVB, keyVC []byte, ...) ([]byte, error) + ChangeKeyEntryOffline func(keyNbr, proMax, changeCtr int, keyVA, keyVB, keyVC []byte, ...) ([]byte, error) + DumpSecretKey func(keyNo, keyVer int, divInput []byte) ([]byte, error) + DumpSessionKey func() ([]byte, error) + GetVersion func() ([]byte, error) + LockUnlock func(key, maxchainBlocks []byte, keyNr, keyVr, unlockKeyNo, unlockKeyVer, p1 int) ([]byte, error) + NonXauthMFPf1 func(first bool, sl, keyNo, keyVer int, data, dataDiv []byte) ([]byte, error) + NonXauthMFPf2 func(data []byte) ([]byte, error) + PKIExportPublicKey func(pkiKeyNo int) ([]byte, error) + PKIGenerateKeyPair func(pkiE []byte, pkiSET []byte, ...) ([]byte, error) + PKIImportKey func(pkiKeyNo, pkiKeyNoCEK, pkiKeyVCEK, pkiRefNoKUC int, ...) ([]byte, error) + PKIUpdateKeyEntries func(hashing HashingAlgorithm, keyEntrysNo int, pkiKeyNoEnc, pkiKeyNoSign int, ...) ([]byte, error) + SAMCombinedReadMFP func(typeMFPdata TypeMFPdata, isLastFrame bool, data []byte) ([]byte, error) + SAMCombinedWriteMFP func(typeMFPdata TypeMFPdata, data []byte) ([]byte, error) + SAMDecipherData func(alg CrytoAlgorithm, data []byte) ([]byte, error) + SAMDecipherOfflineData func(alg CrytoAlgorithm, data []byte) ([]byte, error) + SAMEncipherData func(alg CrytoAlgorithm, data []byte) ([]byte, error) + SAMEncipherOfflineData func(alg CrytoAlgorithm, data []byte) ([]byte, error) + SAMGenerateMAC func(alg CrytoAlgorithm, data []byte) ([]byte, error) + SAMGetKeyEntry func(keyNo int) ([]byte, error) + SAMLoadInitVector func(alg CrytoAlgorithm, data []byte) ([]byte, error) + SwitchToAV2 func(key []byte, keyNr, keyVr int) ([]byte, error) + func ConnectSam(r smartcard.IReader) (SamAv2, error) + func ConnectSamAv2(r smartcard.IReader) (SamAv2, error) + func SamAV2(c smartcard.ICard) SamAv2 + type TypeMFPdata int + const MFP_Command + const MFP_CommandResponse + const MFP_Response