MasterCard credit card generator work in a similar format (Luhn Algorithm), like how credit card issuers generate their credit cards.You can also identify the type of the card created by peeking at the Issuer Identification Number (IIN), also known as Bank Identification Number (BIN). Best credit cards for cellphone insurance. A handful of credit cards offer cellphone protection covering loss or damage. Policy details and exclusions vary, but, in general, you must use a credit card that includes the coverage to pay your cellphone service provider’s bill. See more stories.
This page contains an incomplete list of bank identification numbers and to which bank or institution they are assigned.
List of bank identification numbers
The first 6 digits of a
10 Airlines (
18
* 1800 -
20 (Airlines)
* 2014 00 - En Route, former
* 2018 - Canadian Pacific (historical)
21
* 2131 -
30
* 300 - 305
34 (American Express)
35 (JCB)
* 356210 -
36 (Diners Club International)
* 3633 -
* 3634 -
* 3635 -
* 3670 -
37 (American Express)
* 3703 - American Express Credit Card (Platinum)
* 3710 - American Express Credit Card cite web|url=http://www.iinvestigate.net/secure/creditcard.shtml |title=iInvestigate.net, Credit Card and Banking Information:|accessdate=2008-08-20 ]
* 3712 - Platinum Cash Rebate from
* 3713 -
* 3715 - American Express Charge Card (US)
* 3715 - American Express Credit Card (US)
* 3717 -
* 3718 - American Express Credit Card (Amex Gold)
* 3719 - American Express Charge Card
* 3722 - American Express Credit Card (US)
* 3723 - American Express Credit Card (US)
* 3725 - American Express Credit Card (US)
* 3727 - American Express Charge Card (US)
* 3727 - American Express Credit Card
* 3728 - American Express Credit Card
* 3730 - American Express Credit Card (US)
* 3731 - American Express Credit Card
* 3732 - American Express Corporate Charge Card (US)
* 3733 - American Express Charge Card (Canada in CAD)
* 3734 - American Express Credit Card (US)
* 3737 - American Express Credit Card
* 3738 - American Express Credit Card
* 3739 - American Express Credit Card (US)
* 3741 - American Express Credit Card (FR)
* 3742 - American Express Charge Card (UK in GBP)
* 3742 88 American Express Centurion charge card (UK in £)
* 3743 - American Express Charge Card (UK in Euros)
* 3743 - American Express Card issued by
* 3743 50 - American Express Card issued by
* 3743 88 - American Express ICC Centurion Charge Card (UK in Euros)
* 3745 - American Express Charge Card (UK in USD)
* 3745 88 - American Express ICC Centurion Charge Card (UK in USD)
* 3746 - American Express Platinum Credit Card (UK)
* 3746 - American Express Card issued by
* 3746 30 - American Express card issued by
* 3746 93 - American Express Platinum Credit Card (UK)
* 3749 - American Express Charge Card (France)
* 3750 - American Express Charge Card (Germany)
* 3750 82 - American Express Platinum Charge Card (Germany)
* 3750 88 - American Express Centurion Charge Card (Germany)
* 3751 - American Express Platinum Charge Card (Switzerland)
* 3751 - American Express Credit Card (US)
* 3753 - American Express Charge Card (Netherlands)
* 3755 - American Express Charge Card (Israel)
* 3756 - American Express Credit Card
* 3758 - American Express Charge Card (Switzerland)
* 3758 88 - American Express Centurion Charge Card
* 3760 - American Express Card (Australia)
* 3761 - American Express Charge Card (Japan)
* 3762 - American Express Charge Card (Singapore)
* 3762 11 - American Express Krisflyer Credit Card Gold (Singapore)
* 3763 - American Express Credit Card (Hong Kong)
* 3764 - American Express Credit Card (UK Red)
* 3765 - American Express Credit Card (Japan)
* 3766 - American Express Credit Card (US)
* 3766 - American Express Credit Card (Mexico)
* 3767 - American Express Charge Card
* 3769 - American Express Corporate Charge Card (Hong Kong)
* 3770 - American Express Credit Card (South Africa)
* 3771 - American Express Credit Card (Hong Kong)
* 3772 - American Express Credit Card (US)
* 3773 - American Express Credit Card
* 3777 - American Express Credit Card (Japan)
* 3778 - American Express Bancolombia
* 3778 67 -
* 3778 78 - NAB American Express Credit Cards
* 3782 - American Express Corporate Charge Card (US)
* 3782 - American Express Credit Card
* 3783 - American Express Credit Card
* 3787 - American Express Corporate Charge Card (US)
* 3787 - American Express Credit Card
* 3790 - American Express Travellers Cheque Card (UK)
* 3791 - American Express Credit Card (UK)
* 3791 02 - American Express / British Airways Credit Card (UK)
* 3791 08 - American Express / British Airways Credit Card (UK)
* 3793 - American Express Credit Card
* 3794 - American Express Corporate Charge Card
40 (Visa)
* 4006 10 - META Bank, (Rewards 660 Visa) Credit Limit Between $200 & $2000
* 4009 37 to 34 -
* 4009 44 -
* 4011 71 - Delta Community Credit Union Visa
* 4011 06 - McCoy Federal Credit Union VISA debit card
* 4011 80 - Suntrust Bank Debit Card
* 4016 - City bank (El Salvador)
* 4017 -
* 4019 -
* 4023 60 -
* 4024 -
* 4027 91 -
* 4027 92 -
* 4050 84 to 87 -
* 4060 32 -
* 4060 42 -
* 4085 86 -
* 4063 -
* 4093 11 to 12 - BB&T
* 4097 - Bank Mandiri (Indonesia) Visa Debit Card
41 (Visa)
* 4105 04 to 06 - [http://www.bni.co.id Bank Nasional Indonesia] , VISA Credit Card
* 4106 35 to 39 - Columbus Bank & Trust Company, (Aspire Visa Gold Card)
* 4112 98 -
* 4117 70 to 79 -
* 4119 11 -
* 4121 34 - Pennsylvania State Employees Credit Union (
* 4128 - Citibank Platium Select Dividends VISA Credit CardFact|date=August 2008
* 4129 83 to 85 - MBNA Europe Visa Credit card and Alliance & Leicester Credit Card
* 4143 -
* 4146 - Salute Visa - Urban Trust Bank
* 4147 16 -
* 4147 20 - Chase (formerly Bank One) Holiday Inn Priority Club Rewards Visa Credit Card
* 4147 463 -
* 4147 464 -
* 4159 81 - Sovereign Bank Visa Debit Card
* 4170 08 to 11 - Bank of America (Formerly Fleet) Business Visa Card
* 4175 00 - Visa Electron
* 4182 -
* 4190 00 to 09 - U.S. Bank
42 (Visa)
* 4205 67 - Volkswagen Bank direct VISA Credit Card (Germany)
* 4213 -
* 4213 38 - Chequera Debit Card City (El Slavador)
* 4213 25 - UTI Bank Prepaid Visa Card
* 4216 -
* 4217 64 to 66 -
* 4218 - China Minsheng Banking Corporation VISA Credit Card
* 4246 31 -
* 4254 35 to 36 -
* 4256 -
* 4258 00,02,03,04,08,09,34,38,39, -
* 4259 Banco BICE (Chile) Gold Visa Credit Card
* 4263 54 - Comdirect Bank (Germany) Visa Credit Card, Natwest UK Visa
* 4264 28 to 29 -
* 4264 51 to 52, 65 -
* 4265 56 to 58 - HSBC Bank VISA Credit Card (Australia)
* 4265 88 -
* 4265 69 -
* 4266 55 to 56 - Chase (formerly Bank One) Visa Credit Card
* 4266 84 - Chase (formerly Bank One)
* 4266 98 -
* 4270 10, 19, 20, 28 to 30, 38, 39, 62, 64, 85 -
* 4275 57 - RBC Centura Bank Visa Debit Card (Pocket Check Card)
* 4282 - Landesbank Berlin (Germany) Visa Credit Card
* 4294 75 - Regions Bank Visa Debit Card
* 4298 05, 12- First National Bank of Omaha and affiliate Visa Debit Cards
43 (Visa)
* 4300 92 -
* 4301 - Chase Visa
* 4305 36, 44, 46, 50, 94 -
* 4312 - IW Bank Visa/Visa Electron
* 4312 - Chase Leisure Rewards Visa Business Debit/Check Card
* 4313 01 to 05, 08-
* 4317 32 - Plains Commerce, (Total Visa), Small Credit Limit, Credit Repair Card
* 4321 -
* 4326 24 to 30 - Bank of America (formerly Fleet National Bank) Visa Check Card, Debit
* 4327 - North Carolina State Employees' Credit Union VISA Check Card
* 4343 -
* 4356 -
* 4356 - Bank of America Visa Debit Card
* 4356 80 to 90 - Bank of America, Visa, Platinum Check Card, Debit
* 4357 44 - ShenZhen Development Bank, Visa, Classic, Credit (China)
* 4357 60 - Compass Bank, Visa, Business Check Card, Debit
* 4366 10 to 17, 67 - Chase (formerly
* 4377 - Panin Bank - Indonesia, Visa, Platinum Card
* 4380 -
* 4382 -
* 4384 - HSBC Visa Credit Card (India)
* 4388 -
* 4390 - ChequeMax (El Salvador)
* 4392 25 to 27 -
44 (Visa)
* 4405 - Latvijas Krajbanka (LV)
* 4408 - Chase (
* 4430 - National City
* 4432 - US Bank
* 4451 - First Tennessee Bank VISA Debit Card
* 4462 61 -
* 4462 68 - Cahoot Debit card (UK)
* 4462 77 - Abbey Business Banking - UK Visa Debit Card
* 4462 78 - Halifax Debit card (UK)
* 4462 79 - Bank of Scotland Visa debit card (UK in £)
* 4465 - Wells Fargo Visa Credit Card
* 4489 -
* 4492 -
* 4493 52 -
* 4495 33 - Bank of America, National Association - Classic, Debit, Visa
* 4434 38 -
* 4481 -
45 (Visa)
* 4500 -
* 4500 60 -
* 4502 - CIBC VISA
* 4503 - CIBC VISA
* 4504 - CIBC VISA
* 4505 - CIBC VISA
* 4508 - Visa Electron
* 4508 23 - Lloyds TSB VISA
* 4509 -
* 4510 -
* 4512 - Direct Access Malaysia Visa Credit Card
* 4513 - Bancolombia
* 4514 -
* 4515 03 -
* 4518 45 -
* 4519 -
* 4520 -
* 4530 - VISA Desjardins
* 4530 30 - NAB Gold Affinity
* 4535 -
* 4535 -
* 4536 -
* 4537 -
* 4538 -
* 4539 - Barclays Bank Connect Visa Debit Card
* 4540 - Carte d'accès Desjardins / VISA Desjardins
* 4543 12 -
* 4543 13 -
* 4544 34 -
* 4546 05 - Citibank Australia VISA
* 4547 18 -
* 4547 42 - Abbey National Bank Visa debit
* 4547 49 - BHW Visa Charge Card (Germany)
* 4548 67 -
* 4550 25 - Cooperative Bank (UK)
* 4551 -
* 4551 2100 - GM-Visa Card (CAD) issued by TDCanada Trust
* 4552 - Cooperative Bank (UK)
* 4555 - Cooperative Bank Platinum VISA (UK)
* 4557 01 - National Australia Bank GOLD VISA Credit Card
* 4557 02 - National Australia Bank VISA Credit Card
* 4559 -
* 4560 - ANZ Visa Debit Card
* 4563 - Citibank Malaysia Visa Credit Card
* 4564 62 - ANZ Bank VISA Credit Card
* 4564 68 - ANZ Bank VISA Credit Card Frequent Flyer Platinum
* 4565 -
* 4567 -
* 4568 - Berliner Bank (Germany) VISA Credit Card
* 4599 -
46 (Visa)
* 4627 85 -
* 4600 -
* 4602 69 -
* 4619 83 - BestBuy RewardZone Visa
* 4636 68 -
* 4640 -
* 4655 90 -
* 4659 22 -
* 4661 -
* 4689 - [http://www.alnap.com.do/ Asociacion la Nacional de Ahorros y Prestamos] Visa Credit Card (Dominican Republic)
* 4695 -
47 (Visa)
* 4715 -
* 4744 -
* 4760 - Bank Niaga (Indonesia) Visa Debit Card
* 4775 96 -
* 4779 - Sainsbury's Bank - UK Visa Debit Card
* 4782 00 - BANK ONE - VISA CLASSIC -DEBIT
* 4788 80 -
* 4790 56 -
* 4792 93 -
* 4792 13 -
* 4798 - US Bank Visa Debit Card
48 (Visa)
* 4800 -
* 4806 41 - Commonwealth Credit Union Visa Debit Card
* 4828 -
* 4828 70 -
* 4835 85 -
* 4844 - Visa Electron
* 4854 -
* 4862 -
* 4862 36 -
* 4864 30 - Lloyds TSB (UK) Visa Card
* 4868 -
* 4869 93 -
* 4888 -
49 (Visa)
* 4901 15 [http://www.fnb.co.za/ First National Bank] VISA South Africa
* 4902 -
* 4903 - Switch (Debit Card)
* 4905 - Switch (Debit Card)
* 4906 -
* 4907 62 - [http://www.bayernlb.de/ Bayerische Landesbank] VISA Credit Card (Germany)
* 4908 47 - [http://www.parexgroup.com/en/about/ Parex Bank] Visa Credit Card
* 4909 -
* 4911 - Switch (Debit Card)
* 4913 - Visa Electron
* 4917 - Visa Electron
* 4918 -
* 4920 -
* 4921 -
* 4929 40 -
* 4929 46 -
* 4931 - Visa Citi AA - American Airlines (Dominican Republic)
* 4934 67 -
* 4934 68 -
* 4936 - Switch (Debit Card)
* 4937 - Standard Chartered Bank UAE issued Visa credit card
* 4940 53 - Commonwealth Bank VISA Credit Card (Gold)(Aust)
* 4940 52 - Commonwealth Bank VISA Credit Card (Aust)
* 4966 04 -
* 4966 45 -
* 4971 60 -
* 4972 51 -
* 4975 43 - Natexis Banques Populaires Visa Credit Card (France)
* 4975 45 - Natexis Banques Populaires Visa Credit Card (France)
* 4988 24 - Smile (The Co-operative Bank) Visa debit card (UK in £)
* 499977 -
50
* 5002 35 - NBC National Bank Of Canada ATM / Debit Card
* 5007 66 -
* 5020 -
* 5036 15 -
* 5038 -
* 5045 07 -
* 5049 - Sears Card, issued by Citibank USA
51 (Mastercard)
* 5108 - INGDirect Electric Orange Debit Card
* 5113 00 to 99 - JPMorgan Chase Bank Mastercard Debit Card
* 5118 10 - PayPal Virtual Credit Card (Secure Card)
* 5120 25 to 27 - Orchard Bank Credit Card issued by
* 5121 06 to 08 - Citi Sears MasterCard
* 5126 07 - Continental Finance, M/C, $300 limit card
* 5131 01 -
* 5131 41 -
* 5140 21 -
* 5141 -
* 5148 - US Airways Dividend Miles Platinum MasterCard
* 5150 -
* 5156 - BestBuy MasterCard issued by
* 5163 19 - Virgin MasterCard Credit Card [http://www.money-au.com.au/news/Credit-Cards/Westpac-and-Virgin-Money-in-credit-card-merger-_18538706.php]
* 5163
* 5176 -
* 5176 69 - HSBC (formerly Household) MasterCard Credit Card (U.S.)China Minsheng Banking Corporation
* 5178 05 -
* 5179 - Bank Atlantic Mastercard Debit Card
* 5181 27 - [http://www.pcfinancial.ca/ PC Financial] MasterCard Credit Card
* 5182 - [http://www.bncr.fi.cr/ Banco Nacional de Costa Rica] Servibanca Debit Card
* 5186 - MBNA MasterCard (UK)Fact|date=August 2008
* 5186 7500 - MBNA / British Midland Airways MasterCard (UK)
* 5187 -
* 5191 -
* 5192 -
* 5193 -
52 (Mastercard)
* 5200 -
* 5221 - MasterCard Credit Cards in South Africa
* 5222 76 -
* 5243 -
* 5256 - Sparda-Bank MasterCard Charge Card (Germany)
* 5258 - Mastercard National Bank of Canada (Canada)
* 5258 969 - Mastercard Husky (Canada) [Husky/Mohawk MasterCard]
* 5259 -
* 5259 95
* 5262 -
* 5264 - Bank Negara Indonesia MasterCard Debit Card
* 5267 22 - Standard Bank South Africa MasterCard Credit Card (Gift Card)
* 5268 - Landesbank Berlin (Germany) MasterCard Credit Card
* 5280 61 - BMO Bank of Montreal MasterCard Prepaid Travel
* 5286 - ABSA (Amalgamated Banks of South Africa) MasterCard Credit Card
* 5286 - Virgin Money South Africa (Virtual Bank; Operates partially on ABSA's system)
* 5287 -
* 5289 -
* 5299 30 -
53 (Mastercard)
* 5313 55 - National Australia Bank MasterCard Credit Card
* 5325 61 - HSBC Bank USA Premier Debit Mastercard with PayPass
* 5329 -
* 5329 02 -
* 5353 16 - Commonwealth Bank MasterCard Credit Card
* 5353 18 - Commonwealth Bank MasterCard Credit Card
54 (Mastercard)
* 5401 -
* 5401 68 - Chase MasterCard Credit Card
* 5403 -
* 5404 - Lloyds TSB Bank MasterCard Credit Card
* 5407 -
* 5408 01 -
* 5412
* 5416 -
* 5425 -
* 5424 -
* 5425 -
* 5430 - ANZ Bank MasterCard
* 5431 22 -
* 5432 50 -
* 5434 - MasterCard credit cards from UK banks
* 5434 60 -
* 5435 56 -
* 5440 - Mastercard from MBF Malaysia
* 5441 56 - AIB Gold MasterCard Credit Card
* 5442 -
* 5443 -
* 5444 - BHW MasterCard Charge Card (Germany)
* 5446 -
* 5451 -
* 5452 - MBNA Canada Mastercard
* 5459 - Harris Bank Debit Card
* 5460 - Berliner Bank (Germany) & Mint MasterCard Credit Card
* 5466 -
* 5473 47 - HSBC Commercial Card (UK in £)
* 5473 56 - RBS Royal Bank of Scotland
* 5473 67 - NatWest (RBS)
* 5483 -
* 5488 05 - Hatton National Bank, Sri Lanka
* 5489 55 - HOUSEHOLD BANK (NEVADA), N.A, (Orchard Bank M/C, HSBC Card Services)
* 5490 -
* 5491 - AT&T Universal MasterCard Credit Card, now part of Citibank, also
* 5491 1000 -
* 5494 09 - HSBC Bank Nevada, NA Premier World Mastercard (credit card)
55 (Mastercard)
* 5506 19 - 'Skycard' MasterCard Credit Card issued in UK in association with Barclaycard
* 5520 -
* 5524 61 Morgan-Stanley World Elite Mastercard
* 5538 23 - MIT Federal Credit Union Debit Mastercard
* 5543 46 - Kookmin Bank Mastercard 'Free Pass' Debit Card
* 5545 44 - Bank of Ireland
* 5578 43 - 'Goldfish' MasterCard Credit Card issued in UK by Morgan Stanley
* 5581 58 -
* 5588 - [Citibank] MasterCard Credit Card 'Business'
56 (Maestro)
* 5600 54 -
* 5610 59 - Australian Bank Card
* 5641 82 -
Credit Card Keygen Download
58
* 5850 48 - Suntrust Banks - ATM Card
* 5877 81 - Bank of America ATM Card
* 5892 97
* 5886 44 - Citibank Korea International ATM Card
* 5897 32 - Digital TV Converter Box $40.00 Coupons (USA) - DTV2009.GOV
* 5898 ** - All Korean Banks ATM/DEBIT Card
60
* 6002 92 - Zeller's
* 6002 93 - Hudson Bay
* 6006 49 -
* 6010 56 - ValueLink
* 6011 -
* 6013 82 - Bank of China Great Wall Debit Card Maestro/China UnionPay CNY
* 6016 Bancolombia
* 6017 25 - ING Direct Canada ATM Card
* 6018 59 - A
* 6027 00 -
* 6029 69 - Bank of Beijing Debit Card Visa Interlink/China Unionpay CNY
* 6035 -
* 6037 53 -
62
* 6221 26 - 622925
* 6273 97 -
* 6276 92 -
* 6277 - [iCard] [ICICI Bank Canada]
* 6281 81 - Sears
63
* 6304 90 -
* 63191 - British Home Stores - Bhs credit card
* 6333 00 to 6333 49 - Maestro Cards
* 6334 50 to 6334 99 - Solo Cards
* 6335 4099 000 -
65 (Discover Card)
67
* 6706 95 - AIBMaestro/Laser card (Ireland)
* 6709 -
* 6725/6726 - Maestro debit cards (Germany)
* 6759 - Maestro (formerly Switch) debit cards, followed by the two digits of the bank's assigned sorting code prefix.
* 6759 67 -
* 6761 -
* 6767 - Solo, a sister debit card to Switch.
* 6771 -
70
* 7021 -
References
External links
* [http://www.binbase.com/csv.php?module=search BIN Lookup]
A question that comes up a lot is: The track data I’m getting from my ID TECH credit card reader is encrypted. How do I decrypt it?
The answer is: You need to obtain the proper session key for the transaction, and then use that key to decrypt the data payload via Triple-DES (or AES, as appropriate).
The decryption process itself is gratifyingly anticlimactic. You’ll likely use any of a number of existing open-source implementations of TDES or AES (there’s no need to implement core crypto routines yourself), operating in CBC (Cipher Block Chaining) mode, with a default initial vector of all zero bytes. Assuming you have the correct 16-byte decryption key, the decryption process is easy.
The tricky part is deriving the key. For this, you’ll need to understand ANSI X9.24-1, otherwise known as DUKPT.
Welcome to the World of DUKPT
It’s important to understand that in credit card readers, each transaction produces data that will be encrypted using a different key. The key is unique to a given transaction (hence the acronym DUKPT: Derived Unique Key Per Transaction). No key is ever used twice. As a result, replay attacks are essentially impossible.
To understand how DUKPT works, you have to know a little bit about the concept of the Key Serial Number, or KSN. The main thing to know is that the KSN is a 10-byte value that changes for each transaction, since the bottom 21 bits comprise a counter.
Key Serial Number layout.
Remember: Every encrypted card transaction comes with a KSN. The KSN is always 10 bytes long. And it is always sent in the clear, since the KSN, by itself, discloses no sensitive information (yet is essential for deriving a session key).
When a card reader is configured for encryption at the factory, it gets injected with a 16-byte key and a 10-byte initial KSN. The key that’s injected is derived from a super-secret key (that’s never injected) called the BDK, or Base Derivation Key. (Note that because many keys can be derived from one BDK, it’s possible, and in fact common, to inject hundreds or even thousands of card readers with unique keys that stem from a single BDK.) The derivation process, itself, requires the use of a KSN. Since the KSN includes information about the device’s serial number (plus a lot of other miscellaneous “namespace” info), a hash (or key) produced from a given BDK+KSN combo will essentially be unique to the device. What’s more, the original BDK can never be back-calculated from the hash (even if you know the KSN), because we’re talking about a cryptographically secure one-way hash.
Credit Card Keygen Software
Whenever a transaction occurs, the card reader (if it supports DUKPT, as virtually all card readers these days do) generates a unique key from the current KSN value and from something called the IPEK (or Initial PIN Encryption Key). The resulting one-time-only session key is then used to encrypt sensitive portions of the transaction data.
Once encrypted, transaction data is (or are) never decrypted again until reaching the authorized destination, which may be the card issuer. The party at the receiving end (e.g., the issuer) will use its own copy of your BDK (plus the transaction KSN) to re-derive the session key for the transaction, and recover the original (decrypted) transaction data. This is a so-called symmetric process, because both the encrypting party and the decrypting party must already know the same secret (the BDK). It’s assumed that you will already have provided the receiving party with the necessary “secret” so that you can both decrypt messages.
The IPEK
The starting point for obtaining a DUKPT session key is always to derive the IPEK, or initial key, which you can do only if you know the original BDK and the KSN. (Here, any KSN from the device in question will work, since you’re going to zero out the counter for this step.)
Credit Card Generator With Money
To derive an initial PIN encryption key (IPEK), you need to do the following:
1. If your BDK is 16 bytes in size, expand it to 24 bytes using the so-called EDE3 method. That simply means: copy the first 8 bytes of the key to the end of the key, creating a 24-byte key in which the first and last 8 bytes are the same.
If your original key (in hex) looks like this:
You want it to end up looking like this:
2. Mask your 10-byte initial KSN by ANDing it against the hex value 0xFFFFFFFFFFFFFFE00000. We’ll call the result the “masked KSN.”
3. Create an 8-byte value out of the masked KSN by retaining only the first (i.e., leftmost) 8 bytes of the 10-byte masked KSN. Chop off the rightmost two bytes, in other words.
4. Using your expanded, 24-byte BDK as a key, TDES-encrypt the 8 bytes of masked KSN that you obtained in Step 3. You will use an initial vector of all zeros for this. (Note that cipher block chaining is not meaningful here, since the data in this case is just one block long: 8 bytes.) Retain the 8-byte cipher you obtain in this step, because it will become the left half of the 16-byte IPEK.
5. To get the right half of the IPEK, first XOR your original 16-byte BDK against the hex value 0xC0C0C0C000000000C0C0C0C000000000. (If you’re using a programming language that supports big-integer math, this can be done in one line of code. If not, you’ll need to XOR the two values incrementally, piece by piece.)
6. EDE3-expand the 16-byte value you obtained in Step 5, to obtain a 24-byte key value.
7. Using the 24-byte key value of Step 6, TDES-encrypt the 8 bytes of masked KSN that you obtained in Step 3. This is now the right half of the IPEK.
8. Concatenate the left and right halves of the IPEK. You now have the final 16-byte IPEK.
If you’re implementing this in code yourself, try making an IPEK from a test key value of 0123456789ABCDEFFEDCBA9876543210 and a KSN of 62994900000000000001. The resulting IPEK should be B5610650EBC24CA3CACDD08DDAFE8CE3.
Credit Card Key Generator
Key Management vs. Encryption Algorithms
You’ll notice, by the way, that Triple-DES (TDES) is used a lot in DUKPT. At no time is AES ever used (even if your card reader is set up to use AES for encryption). The X9.24 standard calls for TDES, and sometimes plain DES. Get clear in your mind that the DUKPT key derivation process is entirely separate from the transaction-data encryption/decryption process. In one case, you’re deriving a key. In the other case, you’re using that key to do TDES or AES encoding. No encryption routine knows or cares where your key came from, or what algorithms were used in constructing it; the only thing that matters is that the key itself works. So while the data you need to unlock may well have been encrypted with AES, the key you use to unlock that data will be derived using DUKPT, which (internally) uses TDES.
Where’s the Code?
Credit Card Generator
In Part II of this post, we’re going to go into considerable detail on how to use an IPEK plus a KSN to derive an actual DUKPT session key. We’ll see actual source code so you can do the whole thing yourself. If you can’t wait until next time to see the source code, go ahead and take a peek at our popular Encrypt/Decrypt Tool, which contains a fully functional JavaScript implementation of the DUKPT algorithms I’ll be talking about in Part II (complete with open-source TDES and AES implementations). You can use the Encrypt/Decrypt Tool to derive DUKPT keys (in all 3 variants: PIN, Data, and MAC), encrypt or decrypt data (with TDES or AES), generate various kinds of hashes, and much more. Best of all, since the tool is just a web page, it will work in any browser (on any platform) that supports JavaScript.
Credit Card Generator Working 2020
Want to derive a data-variant DUKPT session key from a KSN and an IPEK? Continue to Part II of this article.