hsmr 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 5934145622e8c9f7c617d9ebfe74d438fdbe627484465335454973c54ef3b568
4
+ data.tar.gz: 7661bc336b48e1cec342f54144c3792633d5027daf62fc0104ef2d6f6a5f4b7e
5
+ SHA512:
6
+ metadata.gz: a8505c271230eb99f4a96910e23caf92d340351d97cefde80f7c0cd352c094e1d55753c82f0901e042ab20db5e1ec24a9881eb3e73e8c10cdc7c80b81b5a712d
7
+ data.tar.gz: a570e2746db29efedf594276baf9ad047465916b6cfc9840e219a0658ad84e2e6527053cbaa0324911ddb01591edf812b6535df18424d081ac073f6c9c738d7b
@@ -0,0 +1,18 @@
1
+ name: test
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ubuntu-latest
8
+ strategy:
9
+ fail-fast: false
10
+ matrix:
11
+ ruby: ['3.1', '3.2', '3.3', '3.4']
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - uses: ruby/setup-ruby@v1
15
+ with:
16
+ ruby-version: ${{ matrix.ruby }}
17
+ bundler-cache: true
18
+ - run: bundle exec rake test
data/.gitignore CHANGED
@@ -5,8 +5,7 @@ coverage
5
5
  rdoc
6
6
 
7
7
  # yard generated
8
- doc
9
- .yardoc
8
+ /.yardoc
10
9
 
11
10
  # bundler
12
11
  .bundle
@@ -15,6 +14,9 @@ Gemfile.lock
15
14
  # jeweler generated
16
15
  pkg
17
16
 
17
+ # built gems
18
+ *.gem
19
+
18
20
  # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
19
21
  #
20
22
  # * Create a file at ~/.gitignore
data/CHANGELOG.md CHANGED
@@ -9,3 +9,32 @@
9
9
  * Encrypt / Decrypt PIN Blocks
10
10
  * Generate IBM3624 PINs
11
11
  * Generate PVV, CVV & CVV2 values
12
+
13
+ ## v0.1.0
14
+
15
+ * Fix single DES on OpenSSL 3 — `des-cbc` moved to the legacy provider, so
16
+ single length keys are now run through `des-ede3` with K1=K2=K3, which is
17
+ equivalent. `kcv` on single length keys and `ibm3624` raised
18
+ `OpenSSL::Cipher::CipherError` before this.
19
+ * `Key.new` now raises `TypeError` on input it can't use. It previously
20
+ returned a freshly generated random key instead.
21
+ * `Key.new` with several components works — it raised `NoMethodError` before.
22
+ * `Key.new([])` raises `ArgumentError` rather than returning an unusable object.
23
+ * `Key.new` no longer mutates the array of components passed to it.
24
+ * Keys and components are generated with `SecureRandom` rather than `Kernel#rand`.
25
+ * Fix `odd_parity?` — it only inspected the first byte of the key, so keys
26
+ with an odd first byte and even bytes later were reported as odd parity and
27
+ left alone by `set_odd_parity`.
28
+ * Fix `parity`, which always returned `'odd'`.
29
+ * Fix `cvv` for PANs that aren't 16 digits. The PAN, expiry and service code
30
+ are now concatenated and zero padded to 32 digits before being split, rather
31
+ than assuming the PAN fills the first half.
32
+ * Add the HSM test vectors these were found with under `doc/`.
33
+ * Move the test suite from Test::Unit to Minitest, and declare `minitest`
34
+ as a development dependency. The suite previously required `test/unit`
35
+ but only got it transitively via `guard-test`.
36
+ * Stop committing `Gemfile.lock` (it was already in `.gitignore`, and a
37
+ library should not pin its dependencies).
38
+ * Correct the `parity` example in the README, which recorded the buggy output.
39
+ * Remove Guard. The Guardfile was unmodified boilerplate and `guard-test`
40
+ was the only thing dragging in a dependency tree.
data/Gemfile CHANGED
@@ -1,11 +1,5 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in hsmr.gemspec
4
4
  gemspec
5
5
 
6
- #group :development do
7
- # gem 'rb-fsevent', :require => false if RUBY_PLATFORM =~ /darwin/i
8
- # gem 'growl', :require => false if RUBY_PLATFORM =~ /darwin/i
9
- # gem 'guard-test'
10
- # gem 'factory_girl'
11
- #end
data/Gemfile.lock CHANGED
@@ -1,30 +1,27 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hsmr (0.0.1)
4
+ hsmr (0.1.0)
5
5
 
6
6
  GEM
7
- remote: http://rubygems.org/
7
+ remote: https://rubygems.org/
8
8
  specs:
9
- activesupport (3.1.1)
10
- multi_json (~> 1.0)
11
- factory_girl (2.2.0)
12
- activesupport
13
- guard (0.8.8)
14
- thor (~> 0.14.6)
15
- guard-test (0.4.1)
16
- guard (>= 0.4)
17
- test-unit (~> 2.2)
18
- multi_json (1.0.3)
19
- rake (0.9.2.2)
20
- test-unit (2.4.1)
21
- thor (0.14.6)
9
+ minitest (5.27.0)
10
+ rake (13.4.2)
22
11
 
23
12
  PLATFORMS
13
+ arm64-darwin-25
24
14
  ruby
25
15
 
26
16
  DEPENDENCIES
27
- factory_girl
28
- guard-test
29
17
  hsmr!
30
- rake
18
+ minitest (~> 5.25)
19
+ rake (~> 13)
20
+
21
+ CHECKSUMS
22
+ hsmr (0.1.0)
23
+ minitest (5.27.0) sha256=2d3b17f8a36fe7801c1adcffdbc38233b938eb0b4966e97a6739055a45fa77d5
24
+ rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701
25
+
26
+ BUNDLED WITH
27
+ 4.0.20
data/README.md CHANGED
@@ -1,45 +1,112 @@
1
- HSMR [![Build Status](https://secure.travis-ci.org/dkam/hsmr.png)](http://travis-ci.org/dkam/hsmr)
1
+ HSMR [![test](https://github.com/dkam/hsmr/actions/workflows/test.yml/badge.svg)](https://github.com/dkam/hsmr/actions/workflows/test.yml)
2
2
  ===========
3
3
 
4
- HSMR is a collection of cryptographic commands usually implemented on a HSM (Hardware Security Module). These
4
+ HSMR is a collection of cryptographic commands usually implemented on a HSM (Hardware Security Module). These
5
5
  are implemented for your education or for testing purposes and should not be used to replace an actual HSM.
6
6
 
7
+ Requires Ruby 3.1 or later. The only runtime dependency is the `openssl` standard library.
8
+
7
9
  Installation
8
10
  -------------
9
11
 
10
- One day I'll learn how to make gems. Until then, git clone is the only way to use this softawre.
12
+ gem install hsmr
13
+
14
+ Or in a Gemfile:
15
+
16
+ gem 'hsmr'
11
17
 
12
18
  Usage
13
19
  ---------
14
20
 
15
- require './lib/hsmr'
16
- require './lib/key'
17
- require './lib/component'
21
+ ### Keys
18
22
 
19
- # Create a Key
20
- > key=HSMR::Key.new("4CA2161637D0133E5E151AEA45DA2A12")
21
- => 4CA2 1616 37D0 133E 5E15 1AEA 45DA 2A12
23
+ require 'hsmr'
24
+
25
+ > key = HSMR::Key.new("4CA2161637D0133E5E151AEA45DA2A12")
26
+ => 4CA2 1616 37D0 133E 5E15 1AEA 45DA 2A12
22
27
  > key.key
23
- => "L\xA2\x16\x167\xD0\x13>^\x15\x1A\xEAE\xDA*\x12"
28
+ => "L\xA2\x16\x167\xD0\x13>^\x15\x1A\xEAE\xDA*\x12"
24
29
  > key.to_s
25
- => "4CA2 1616 37D0 133E 5E15 1AEA 45DA 2A12"
30
+ => "4CA2 1616 37D0 133E 5E15 1AEA 45DA 2A12"
31
+ > key.kcv
32
+ => "7B0898"
33
+
34
+ A key with no argument is generated with `SecureRandom`. Pass `HSMR::SINGLE`,
35
+ `HSMR::DOUBLE` (the default) or `HSMR::TRIPLE` for the length:
36
+
37
+ > HSMR::Key.new(nil, HSMR::SINGLE).length
38
+ => 8
39
+
40
+ ### Components
41
+
42
+ Keys are often assembled from components held by different people. Combine them
43
+ by passing them to `Key.new`, which XORs them together:
44
+
45
+ > c1 = HSMR::Component.new("0123456789ABCDEF")
46
+ => 0123 4567 89AB CDEF
47
+ > c1.kcv
48
+ => "D5D44F"
49
+ > c2 = HSMR::Component.new("FEDCBA9876543210")
50
+ > key = HSMR::Key.new([c1, c2])
51
+ => FFFF FFFF FFFF FFFF
26
52
  > key.kcv
27
- => "7B0898"
53
+ => "CAAAAF"
54
+
55
+ ### Parity
56
+
57
+ DES keys conventionally carry odd parity in each byte. Note that parity bits do
58
+ not take part in the DES key schedule, so correcting them leaves the key check
59
+ value unchanged.
60
+
61
+ > key = HSMR::Key.new("4CA2161637D0133E5E151AEA45DA2A12")
28
62
  > key.parity
29
- => "odd"
30
-
31
- # Generate a PVV
32
-
33
- pan="5999997890123412"
34
- pin="1234"
35
- pvki="1"
36
- pvv = HSMR.pvv(key, pan, pvki, pin)
63
+ => "even"
64
+ > key.odd_parity?
65
+ => false
66
+ > key.set_odd_parity.to_s # modifies the key in place
67
+ => "4CA2 1616 37D0 133E 5E15 1AEA 45DA 2A13"
68
+
69
+ ### PIN blocks
70
+
71
+ > zmk = HSMR::Key.new("0123456789ABCDEFFEDCBA9876543210")
72
+ > block = HSMR.encrypt_pin(zmk, "041274FFFFFFFFFF")
73
+ => "CFB709CC37D9262A"
74
+ > HSMR.decrypt_pin(zmk, block)
75
+ => "041274FFFFFFFFFF"
76
+
77
+ ### IBM 3624 PINs
78
+
79
+ > pgk = HSMR::Key.new("3737373737373737")
80
+ > HSMR.ibm3624(pgk, "5560501200002101", 4, "0123456789012345").join
81
+ => "4412"
82
+
83
+ ### PVV
84
+
85
+ > pvk = HSMR::Key.new("4CA2161637D0133E5E151AEA45DA2A12")
86
+ > HSMR.pvv(pvk, "5999997890123412", "1", "1234")
37
87
  => "0798"
38
88
 
89
+ ### CVV / CVV2 / CVC
90
+
91
+ > cvk_a = HSMR::Key.new("1111111111111111")
92
+ > cvk_b = HSMR::Key.new("1111111111111111")
93
+ > HSMR.cvv(cvk_a, cvk_b, "5560501200002101", "1010", "0")
94
+ => "317"
95
+ > HSMR.cvv(cvk_a, cvk_b, "5560501200002101", "1010", "101")
96
+ => "134"
97
+
98
+ Test vectors
99
+ ------------
100
+
101
+ `doc/` holds the HSM notes and test vectors this library was built and checked
102
+ against — key check values, parity pairs, PIN block encryptions, PVV and
103
+ CVV/CVC examples. The values were produced by a real HSM, and the test suite
104
+ asserts against them.
105
+
39
106
  Features
40
107
  ---------
41
108
 
42
- * Key / Componet features
109
+ * Key / Component features
43
110
  * Create Keys and Components
44
111
  * XOR Keys and Components together
45
112
  * Find Key Check Values (kcv)
@@ -54,14 +121,13 @@ Development
54
121
 
55
122
  * Source hosted on GitHub.
56
123
  * Report issues on GitHub Issues.
57
- * Pull requests are awesome! Please include test::unit tests
124
+ * Pull requests are awesome! Please include Minitest tests.
58
125
 
59
- Author
60
- ==========
126
+ Run the suite with:
61
127
 
62
- Dan Milne, http://da.nmilne.com, http://booko.com.au
128
+ bundle exec rake test
63
129
 
64
- Copyright
65
- ----------
130
+ License
131
+ -------
66
132
 
67
- Copyright (c) 2010 Dan Milne. See LICENSE for details.
133
+ The gem is available as open source under the terms of the MIT License.
@@ -0,0 +1,55 @@
1
+ 1234567890ABCDEF FEDCBA1234567890 5656565656565656 1010 ___ 922
2
+ 1234567890ABCDEF FEDCBA1234567890 5656565656565656 1010 000 922
3
+ 1234567890ABCDEF FEDCBA1234567890 5683739237489383838 1010 000 367
4
+ 1234567890ABCDEF FEDCBA1234567890 568367393472639 1010 000 067
5
+ 1234567890ABCDEF FEDCBA1234567890 5683673934726394 1010 000 409
6
+ 1234567890ABCDEF FEDCBA1234567890 5683673934726394 1010 050 CVV248 or CVC409
7
+ 1234567890ABCDEF FEDCBA1234567890 5683673934726394 1010 101 CVV501 or CVC409
8
+ 1234567890ABCDEF FEDCBA1234567890 5683673934726394 1010 102 CVV206 or CVC409
9
+
10
+ CVV Calculator
11
+
12
+
13
+ The CVV calculator takes a card number, expiration date and the service code and calculates the CVV that is recorded on the cards magnetic stripe and the CVC that is printed on the signature panel of the card. The algorithm is identical for both values. The only difference is that the service code from the cards magnetic stripe is included in the CVV calculation and not the CVC calculation.
14
+
15
+ CVV/CVC Algorithm
16
+
17
+ The CVV algorithm is essentially an ANSI X90.19 MAC calculation over the data that is followed by an extract of numeric digits to create a three digit CVV or CVC. American Express cards use a four digit result. To calculate the CVV or CVC the Card number and expiration date are concatenated. To produce a CVV the service code is also concatenated. The data block is padded with zeros to 128 bits (32 digits). The first 16 digits are encrypted with the left half of the key, the result is exclusively Ored with the remaining 16 digit and this value is triple DES encrypted with the double length key.
18
+
19
+ The resulting data is scanned from left to right and the first three numeric digits (Four for Amex Cards) is the CVV/CVC. If there are not enough numeric digits, the data is re scanned selecting the Hex digits and subtracting 9 from them until the 3 or 4 digits are found.
20
+
21
+ Using the CVV/CVC Calculator
22
+
23
+ To use the calculator, enter the two halves of the CVV key, the card number, expiration date and the Service Code. Note that if the service code is not entered, then only the CVC is displayed.
24
+
25
+ CVV Algorithm sample
26
+
27
+ The Data block is made up of the Card number, expiration data and the service code.
28
+
29
+ 4509494222049051 0907101000000000
30
+
31
+ The first 16 digits are encrypted with the left half of the key
32
+
33
+ 0123456789ABCDEF
34
+
35
+ Giving
36
+
37
+ 0CB2C179073130CD
38
+
39
+ This is Exclusive Ored with the second 16 digits giving:
40
+
41
+ 05B5D169073130CD
42
+
43
+ Which is triple DES encrypted with the full key giving:
44
+
45
+ CE271F02149BC883
46
+
47
+ The result is scanned from left to right looking for the first four digits that become the PVV:
48
+
49
+ CE271F02149BC883
50
+
51
+ The CVV is therefore 271. As the Service code is not part of the input for the calculation, the result will therefore be different.
52
+
53
+
54
+ ----
55
+ Use the VISA CVV Service Generate callable service to generate a VISA Card Verification Value (CVV) or MasterCard Card Verification Code (CVC) as defined for track 2. This service generates a CVV that is based upon the information that the PAN_data, the expiration_date, and the service_code parameters provide. The service uses the Key-A and the Key-B keys to cryptographically process this information. Key-A and Key-B can be single-length DATA or MAC keys. If the requested CVV is shorter than 5 characters, the CVV is padded on the right by space characters. The CVV is returned in the 5-byte variable that the CVV_value parameter identifies. When you verify a CVV, compare the result to the value that the CVV_value supplies
@@ -0,0 +1,190 @@
1
+ Clear component: 6DBF C180 4A01 5BAD
2
+ Key check value: 029E 60
3
+
4
+ Clear component: 5D80 0497 B319 8591
5
+ Key check value: 3B86 C3
6
+
7
+ Clear component: B0C7 7CDC 7354 97C7
8
+ Key check value: 7A77 BC
9
+
10
+ Clear component: DAE0 86FE D6EA 0BEA
11
+ Key check value: 2E61 91
12
+
13
+ Clear component: 682C 8315 F4BF FBC1
14
+ Key check value: 62B3 36
15
+
16
+ Clear component: 5715 F289 04BC B62F
17
+ Key check value: 3CBA 88
18
+
19
+ Clear component: D0C4 29AE C4A8 02B5
20
+ Key check value: 33AF 02
21
+
22
+ Clear component: 7049 D0F7 4A97 15B6
23
+ Key check value: AC13 99
24
+
25
+ Clear component: BC91 D698 157A A4E5
26
+ Key check value: 2954 91
27
+
28
+ Clear component: 64AB 8568 7A0E 322F
29
+ Key check value: D9F7 B3
30
+
31
+ Type 000:
32
+ Clear component: 5846 15A8 F854 D9BF
33
+ Encrypted component: 9A83 096D D1F2 8C8F
34
+ Key check value: 6C11 2F
35
+ Clear component: 6864 4546 F2FD D907
36
+ Encrypted component: 131E 1EC3 0549 2288
37
+ Key check value: E229 7F
38
+ Clear component: BC2C DC7A A1BC B36E
39
+ Encrypted component: 6B2D F5E7 E3EF 3449
40
+ Key check value: 8248 D4
41
+
42
+ Type 002:
43
+ Clear component: 9113 E3DF 8C32 3752
44
+ Encrypted component: 22D9 9A0A DB46 7F50
45
+ Key check value: F9CC 26
46
+ Clear component: 2C75 ECEA F8BC 4AA7
47
+ Encrypted component: 2B65 E9E3 963D EB49
48
+ Key check value: 8646 03
49
+ Clear component: CD16 4F10 0B1F 088C
50
+ Encrypted component: 47D5 CB68 5ABE 6EC7
51
+ Key check value: C239 6D
52
+
53
+ Type 402:
54
+ Clear component: 2A04 F258 E057 674F
55
+ Encrypted component: 8206 ABD0 E941 8DFE
56
+ Key check value: 2DDB 13
57
+ Clear component: 7C64 803D 2567 C4A1
58
+ Encrypted component: 4BD5 7B29 DF60 D052
59
+ Key check value: CB13 11
60
+ Clear component: 9223 4019 8AAD F291
61
+ Encrypted component: D61C 8E80 FAF3 E334
62
+ Key check value: C30E 5C
63
+
64
+
65
+ Clear component: ADE3 9B38 0DBC DF38 AE02 AECE 64B3 4373
66
+ Key check value: 3002 D5
67
+
68
+ Clear component: B64A EF86 460D DF5B 57B3 D53D AD37 52A1
69
+ Key check value: 1F7C 07
70
+
71
+ Clear component: 5B89 6E29 76EC 9745 15B5 238C 8CFE 3D23
72
+ Key check value: DE78 F2
73
+
74
+ Clear component: 5E61 CB20 D540 1FC7 58EC CDC8 B558 E9B9
75
+ Key check value: FED9 57
76
+
77
+ Clear component: 23DF CEB9 BF94 ADA8 91E9 580B 8C8F 5BEF
78
+ Key check value: 9020 85
79
+
80
+ Clear component: DFEF 61C8 2037 3DA4 CE9B 92CD 89E9 B334
81
+ Key check value: E45E B7
82
+
83
+ Clear component: 6746 9E4C FE83 F831 F23E 9D9E 9D9E 9DB3
84
+ Key check value: 813B 7B
85
+
86
+ Clear component: 23E5 496E DF94 0BD5 9734 B07A BF26 B9E6
87
+ Key check value: E7C4 8F
88
+
89
+ Clear component: 974F 26BC CB2A ECD5 434F 1CDC 64DF A275
90
+ Key check value: E272 50
91
+
92
+ Clear component: E57A DF5B CEA7 F42A DFD9 E554 07A2 F891
93
+ Key check value: 50E3 F8
94
+
95
+ Type 000:
96
+ Clear component: 49A4 2676 2A5B EC9B CD8C 13EF C408 AECB
97
+ Encrypted component: UF120 7A1F AA14 9A06 85E0 8307 C22B B572
98
+ Key check value: 9477 27
99
+ Clear component: 6780 E092 E6B6 61F8 C276 CEF2 0BD3 134C
100
+ Encrypted component: U7AC4 89FC DD66 AFBE 8936 C515 1A54 30A0
101
+ Key check value: 1EB3 2D
102
+ Clear component: 9E40 19AD B65E B5BC 3E57 A10E 4361 3815
103
+ Encrypted component: UFAC5 E853 5E7C F2F2 6DCF 6E06 2DD8 71BE
104
+ Key check value: EED4 F8
105
+
106
+ Type 002:
107
+ Clear component: 6E6B C15D FD7A 9ED0 8FAD 156B 9438 452F
108
+ Encrypted component: UA349 7A43 EE48 9FC7 7853 C69D A3A1 C9AA
109
+ Key check value: E534 5B
110
+ Clear component: 4F5D 400B CB8F 76CD DFA4 F1C4 4FBF F1D9
111
+ Encrypted component: U3D3B E2E4 8D3B 994D BA32 29C8 884A 3D99
112
+ Key check value: D7F6 7F
113
+ Clear component: 9E45 F2D0 3461 E038 D943 CB34 674A 160B
114
+ Encrypted component: UA539 8D0C F60E DFFA F2CF CEE6 33CC F242
115
+ Key check value: DB64 AC
116
+
117
+ Type 402:
118
+ Clear component: 80D6 1AAB 6852 919E 3E4C E32C B376 5186
119
+ Encrypted component: UA8D6 3BCE 003D 9B25 9999 2259 5B45 8636
120
+ Key check value: 1671 C4
121
+ Clear component: D57F C7F7 4646 1645 ABDC 490B C83D 3429
122
+ Encrypted component: UC3A8 3992 3170 7DBC 074F 7E46 A36E F80F
123
+ Key check value: 3F22 5D
124
+ Clear component: 752A 49FB 6401 DC3D 01B5 49FD 4F79 6808
125
+ Encrypted component: U47F6 ACFF 484A B518 64C0 10AC 6E94 F00C
126
+ Key check value: D15A ED
127
+
128
+
129
+ Clear component: C207 7F76 2AF7 A723 0DCB 61EC 6170 3D91 0DAD 9D32 E345 0886
130
+ Key check value: C7E5 53
131
+
132
+ Clear component: 75E0 4A34 FE45 6E04 6808 0283 515E FDD6 DF45 A751 6BCB 3204
133
+ Key check value: E1D5 59
134
+
135
+ Clear component: 79F1 F8EF C8C7 E05B 2015 3E61 F858 B97C 017C 8C97 73A1 AEE9
136
+ Key check value: 036A 2D
137
+
138
+ Clear component: B01A F751 5B4A ECCB 3D9B C789 D9C4 BF9B 3D31 64A8 9B98 613D
139
+ Key check value: 84EA BC
140
+
141
+ Clear component: 4651 3D1F 864C E9DF D304 8CE5 3119 5D9B CB61 61BF 204C 46CD
142
+ Key check value: C1E0 15
143
+
144
+ Clear component: A123 9870 DA6B 31D9 D9D5 6DD5 1351 D9B6 BCCD 381A 70CD 077A
145
+ Key check value: 0FC7 DA
146
+
147
+ Clear component: 6419 CBE3 4FEC 2515 13AD 2604 D05D 0786 BF37 83DA D05E 76A1
148
+ Key check value: FEDD 2A
149
+
150
+ Clear component: B668 5125 3D9B 757C 5237 9857 8632 4561 1534 7F02 1FDF 0E0E
151
+ Key check value: CC93 79
152
+
153
+ Clear component: 7964 0275 BAE0 4CB5 FDC2 FB79 9ECE A268 8C86 01AE 5DBA C8B9
154
+ Key check value: 8B7F 9D
155
+
156
+ Clear component: DFE5 16FD 206E 2913 91E5 A7E6 2FE0 F764 CDF7 CD43 BA46 5E3D
157
+ Key check value: 722D AE
158
+
159
+ Type 000:
160
+ Clear component: F86D 40B6 EC6B B0DA 97CB 85BF BA45 68C1 616E 232C 8FBA 0243
161
+ Encrypted component: T0387 0DA6 5843 2BF4 3EF9 22B7 C7A5 D105 39BD 4C1E 6023 164D
162
+ Key check value: 3E9F 81
163
+ Clear component: 75CE 86C7 3E51 8ABC 7515 8F86 6EB3 49EC E926 524C 5E64 E5DA
164
+ Encrypted component: T05E3 3ED3 4E83 9CEB DD84 40E3 9F8A 4CE0 9352 3BA8 4B72 3A40
165
+ Key check value: 73CF 47
166
+ Clear component: D615 7CF2 0454 B53D A1FE EA9E 1FC4 F464 B364 7FC1 DABF 546B
167
+ Encrypted component: T86A7 9C3F 113B 42D2 EB53 45B2 B16B EDAC A34F 280E 01A1 5AC3
168
+ Key check value: 395C 1F
169
+
170
+ Type 002:
171
+ Clear component: 70B0 2A83 515B 51B9 E3CE D5B3 D6FD CB62 5E61 B0B0 CEE0 975B
172
+ Encrypted component: TB326 89D1 E6D2 1F03 2BF7 12A9 C385 6842 2C1A CB74 702A FF38
173
+ Key check value: 0E56 D0
174
+ Clear component: 34B0 B33B 45D5 7675 7FEC 0826 9151 B3BF 0186 F4DC 438A C751
175
+ Encrypted component: TC3DB 7BF7 E2C6 6044 CBE5 F926 A6C4 58FE 9D3A 71E8 DB23 6A4B
176
+ Key check value: 68E6 56
177
+ Clear component: 1A3B 34B6 E602 9146 2529 5D85 1340 854F 983E 3D51 EA45 BCC7
178
+ Encrypted component: TA4B8 3B29 5DDF E64E 5103 FA77 917A 1D2C 38B9 A3D6 8C7F 93A7
179
+ Key check value: 6B10 C5
180
+
181
+ Type 402:
182
+ Clear component: A4BC 89CE 642F 7CE5 FDEF 346E 3E13 5DE6 67DA 1961 3131 D6D6
183
+ Encrypted component: T2E54 A4E0 94B1 DD2E D9CA D9A9 C799 5EA1 3A14 791F C03D 10C5
184
+ Key check value: 5D47 66
185
+ Clear component: E9B5 7C8C 7686 7FBA 529D 5EA2 7C6D 5701 2026 C2E9 C1E3 046D
186
+ Encrypted component: T2FBA B8DE 6A59 8934 232F B8DF 5B39 4321 AC74 F627 8BD6 88DD
187
+ Key check value: DDD1 BB
188
+ Clear component: E6A4 ABD5 0DFB 9198 D051 613E 2902 AD9D 5107 EF7C 2A52 B9F8
189
+ Encrypted component: T3DEB 8433 0786 CB0F 598D D1B8 C164 5E24 A313 5B06 9FCC 9275
190
+ Key check value: A34B D3
@@ -0,0 +1,8 @@
1
+ B519 9D10 9D46 E691 4AB9 6D6E 7F7C DAA8
2
+ F0916F
3
+
4
+ AE92 32A2 0276 E0D0 3B16 EC4C 2C01 CBC7
5
+ FB599F
6
+
7
+ 25F4 91A4 67FD F7CE B3B0 E613 5BA7 8C0D
8
+ 098FA4
@@ -0,0 +1,44 @@
1
+ Key Part 1: 3737373737373737
2
+ Key Part 2: 0000000000000000
3
+ Dcimalisation Table: 0123456789012345
4
+
5
+ PVK 1: 1111111111111111
6
+ PVK 2: 1111111111111111
7
+ PVKI: 2
8
+ CVK Key 1: 1111111111111111
9
+ CVK Key 2: 1111111111111111
10
+
11
+
12
+
13
+ Card No Expiry PIN PVV CVV CVV2
14
+ 5560501200002101 1010 4412 6183 134 317
15
+ 5560501200002111 1010 4784 0931 561 924
16
+ 5560501200002121 1010 1040 4895 462 673
17
+ 5560501200002131 1010 3680 6373 826 267
18
+ 5560501200002101 1110 4412 6183 900 155
19
+ 5560501200002111 1110 4784 0931 363 513
20
+ 5560501200002121 1110 1040 4895 952 937
21
+ 5560501200002131 1110 3680 6373 667 522
22
+
23
+
24
+ Key Part 1: 0123456789ABCDEF
25
+ Key Part 2: FEDCBA9876543210
26
+ Dcimalisation Table: 0123456789012345
27
+ PVK 1: 7BB19E3D56A1237E
28
+ PVK 2: 29F7C8FA379EE25C
29
+ PVKI: 2
30
+ CVK Key 1: 007A5048DB9531B3
31
+ CVK Key 2: 0322DA78AB2F85E1
32
+
33
+
34
+
35
+
36
+ Card No Expiry PIN PVV CVV CVV2
37
+ 5560501200002101 1010 9907 7527 777 473
38
+ 5560501200002111 1010 2345 0658 638 553
39
+ 5560501200002121 1010 8245 8196 085 480
40
+ 5560501200002131 1010 3812 2948 591 546
41
+ 5560501200002101 1110 9907 7527 349 994
42
+ 5560501200002111 1110 2345 0658 245 266
43
+ 5560501200002121 1110 8245 8196 441 115
44
+ 5560501200002131 1110 3812 2948 126 768
@@ -0,0 +1,45 @@
1
+ 137A 2C25 C198 E3EA A761 61B9 9BA4 C267
2
+ D5BF AD64 9E4C C43D 0231 51DF C279 1CE5
3
+ C6C5 8141 5FD4 27D7 A550 3066 59DD DE82
4
+
5
+ Encrypted key: U007A 5048 DB95 31B3 0322 DA78 AB2F 85E1
6
+ Key check value: D5BE 96
7
+
8
+ Online-AUTH>pv
9
+
10
+ Enter LMK id [0-9]: 0
11
+ Enter key A: U007A 5048 DB95 31B3 0322 DA78 AB2F 85E1
12
+ Enter PVV data block: 11111111111 1 1111
13
+
14
+ PVV: 2378
15
+
16
+
17
+ Online-AUTH>pv
18
+
19
+ Enter LMK id [0-9]: 0
20
+ Enter key A: 1E9E B964 04E5 CC30
21
+ Enter key B: 50D2 D798 FFAF 8372
22
+ Enter PVV data block: 11111111111 1 1111
23
+
24
+ PVV: 2378
25
+
26
+ Online-AUTH>pv
27
+
28
+ Enter LMK id [0-9]: 0
29
+ Enter key A: U007A 5048 DB95 31B3 0322 DA78 AB2F 85E1
30
+ Enter PVV data block: 729382067392 1 8273
31
+
32
+ Data invalid; please re-enter: 72938206739 1 8273
33
+
34
+ PVV: 3490
35
+
36
+ Online-AUTH>pv
37
+
38
+ Enter LMK id [0-9]: 0
39
+ Enter key A: 1E9E B964 04E5 CC30
40
+ Enter key B: 50D2 D798 FFAF 8372
41
+ Enter PVV data block: 72938206739 1 8273
42
+
43
+ PVV: 3490
44
+
45
+ Online-AUTH>