A .NET Standard implementation of TDES DUKPT, both PIN and Data variants.
You'll find this library useful if you're working on financial services applications with the need to decrypt data using TDES (3DES, TDEA, triple-DES, etc) DUKPT (derived unique key per transaction), such as PIN or credit card account data.
DUKPTCore was adapted from sgbj's Dukpt.NET project and ported to .NET Standard.
Encrypting data:
string bdk = "0123456789ABCDEFFEDCBA9876543210";
string ksn = "FFFF9876543210E00008";
byte[] superSecretMessage = Encoding.UTF8.GetBytes("Hello World!");
byte[] encryptedData = DUKPT.Encrypt(bdk, ksn, superSecretMessage, DUKPTVariant.Data);
Decrypting data:
byte[] decryptedData = DUKPT.Decrypt(bdk, ksn, encryptedData, DUKPTVariant.Data);
string superSecretMessage = Encoding.UTF8.GetString(decryptedData); // Hello World!
- ANSI X9.24 - Retail Financial Services Set
- How To Decrypt Credit Card Data, Part I - IDTECH
- How To Decrypt Credit Card Data, Part II - IDTECH
- How To Decrypt Magnetic Card Data With DUKPT - Parthenon Software Group, Travis Hoffman
- Dukpt.NET - Scott Batary (sgbj)
- Derived unique key per transaction - Wikipedia
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Added some new feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request!