Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zetxx/atm-crypto-helpers
Crypto helper functions for devices
https://github.com/zetxx/atm-crypto-helpers
Last synced: 3 months ago
JSON representation
Crypto helper functions for devices
- Host: GitHub
- URL: https://github.com/zetxx/atm-crypto-helpers
- Owner: zetxx
- Created: 2019-10-18T14:07:40.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-07-24T06:01:46.000Z (5 months ago)
- Last Synced: 2024-09-25T21:44:04.319Z (3 months ago)
- Language: JavaScript
- Size: 27.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# atm-crypto-helpers
Crypto helper functions for Atm/Pos devices## Master (Card) key derivation
### Parameters
- _emvVersion_ - one of _4.0_, _4.1_, _4.2_, _4.3_
- _4.0_ - same as _option A_ of the other versions
- _4.1_, _4.2_, _4.3_ - two options for each one, depending on the _type_ parameter:
- _option A_ - same as _4.0_
- _option B_ - available for _emvVersion_ _4.1_, _4.2_ and _4.3_**NOTE: Thales Payshield command _KQ_ supports only emvVersion 4.0, therefore _option A_**
## Session key derivation
### Parameters
- _emvVersion_ - one of _4.0_, _4.1_, _4.2_, _4.3_
- _4,0_, _4.1_ - same as Thales _EMV2000_
- _4.2_ - same as Thales common session key derivation
- _4.3_ - same as _4.2_ in case of double length key (16 bytes) and _algorithmBlockSize_ 8 bytes (DES key)## Thales - EMV mapping
- Command code = KQ (EMV v.3), sceme ID = 0
-
- Command code = KQ (EMV v.3), sceme ID = 1- Command code = KQ (EMV v.3), sceme ID = 2
- Command code = KW (EMV v.4), sceme ID = 0
- _emvVersion_ - _4.1_
- _type_ - _a_
- _macAlgorithm_- Command code = KW (EMV v.4), sceme ID = 1
- _emvVersion_ - _4.1_
- _type_ - _b_
- _macAlgorithm_- Command code = KW (EMV v.4), sceme ID = 2
- _emvVersion_ - _4.2_ OR _4.3_
- _type_ - _a_
- _macAlgorithm_- Command code = KW (EMV v.4), sceme ID = 3
- _emvVersion_ - _v4.3_
- _type_ - _b_
- _algorithmBlockSize_ - _8_
- _macAlgorithm_ = _3_## TR31 key block decryption (keyblockDecrypt)
Supports only algorithm B as defined in Ref 8 section 5.3.2.1
of TR31 keyblock specifications.