Documentation ¶
Index ¶
- Variables
- func BuildTdesKey(key []byte) []byte
- func CalculateKcv(key []byte) ([]byte, error)
- func DeriveIpekFromBdk(bdk []byte, ksn []byte) ([]byte, error)
- func DerivePekFromBdk(bdk []byte, ksn []byte) ([]byte, error)
- func DerivePekFromIpek(ipek []byte, ksn []byte) ([]byte, error)
- func EncodeKsn(result []byte, ksn Ksn)
- func EncryptDecryptAes128Ecb(data, key []byte, encrypt bool) []byte
- func ExtractKsnWithoutCounter(ksn, cleared []byte)
- type Ksn
Constants ¶
This section is empty.
Variables ¶
View Source
var ( REG3_MASK uint64 = 0x1FFFFF SHIFT_REG_MASK uint64 = 0x100000 REG8_MASK uint64 = 0xFFFFFFFFFFE00000 KEY_MASK = []byte{0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00} PEK_MASK = []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF} )
Functions ¶
func BuildTdesKey ¶
func CalculateKcv ¶
func EncodeKsn ¶
This isn't official as there is no specification on how to build the KSI Aside from TC's 21 bits, the remaining 59 bits are opaque Here we assume the 10-5-5 scheme
func EncryptDecryptAes128Ecb ¶
EncryptDecryptAes128Ecb - ECB
func ExtractKsnWithoutCounter ¶
func ExtractKsnWithoutCounter(ksn, cleared []byte)
Types ¶
Click to show internal directories.
Click to hide internal directories.