• Having a little challenge while trying to decrytp 3Des encrypted data.

    From derinlois1@gmail.com@21:1/5 to All on Mon Sep 19 09:20:12 2016
    in the process of trying to decrypt an encrypted data, i am having a little challenge with it. I will be so glad if anyone can help putting me through.

    Although, i have already studied the algorithm in carrying out this operation, since i am to get my data from a device, which already has its Base Derivation Key(BDK), Initially loaded key serial number and the initially loaded pin entry device key.

    In the documentation that was been given, we have the Initially loaded key serial number, data encryption key variant and the track 2 Data (which is in plaintext).

    In this example, i was made to know that they actually used a 3DES-128 bits CBC Mode (padding zero) method.

    and, the following are the data that was been used.

     Base Derivation Key (BDK): 0123456789ABCDEFFEDCBA9876543210
     Initially Loaded Key Serial Number (KSN): FFFF9876543210E00000  Initially Loaded PIN Entry Device Key: 6AC292FAA1315B4D858AB3A3D7D5933A

    Data Encryption key variant
    Initially Loaded Key Serial Number (KSN): FFFF9876543210E00001
    Data Encryption key variant: 448D3F076D8304036A55A3D7E0055A78
    Track 2 Data (Plaintext): 1234567890ABCDEFFEDCBA0987654321

    (Encrypt by 3DES-128 bits CBC Mode (padding zero))
    Track 2 Data (Encrypted): D0911CD510047AC6AEE9CE8AFEDA9301

    my question now is, how was the plaintext gotten from the encrypted data. I will be so glad, if anyone can put me through.

    Although, this is what i have been able to do..trying to make use of this simple algorithm, but not getting it at all.

    public String do3DESDecryption(String key, String text) {
    String decryptedInfo = null;
    try {
    String key1 = key.substring(0, 16);
    String key2 = key.substring(16);
    decryptedInfo = doDESDecryption(key1, text);
    decryptedInfo = doDESEncryption(key2, decryptedInfo);
    decryptedInfo = doDESDecryption(key1, decryptedInfo);
    } catch (Exception ex) {
    System.out.println("What's happening"+ex.getMessage());

    return decryptedInfo;

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)