Questions tagged [3des]

In cryptography, Triple DES, or 3DES, is the common name for the Triple Data Encryption Algorithm (TDEA or Triple DEA) block cipher, which applies the Data Encryption Standard (DES) cipher algorithm three times to each data block.

is the common name for the Triple Data Encryption Algorithm (TDEA or Triple DEA) block cipher in cryptography, which applies the Data Encryption Standard (DES) cipher algorithm three times to each data block. This protocol has long been deprecated in favor of stronger encryption algorithms.

357 questions
3
votes
1 answer

Triple DES encryption on C# and PHP yields different results

I'm writing a simple encryption system for logging in but I've got small issue. C# encrypt function: public static string EncryptString(string Message, string Passphrase) { byte[] Results; System.Text.UTF8Encoding UTF8 = new…
Charlie Hopperson
  • 415
  • 1
  • 9
  • 23
3
votes
1 answer

Decrypting data from MagTek iDynamo encrypted card reader

Does anyone have reference code (even if pseudo-code) for decrypting data from a MagTek iDynamo encrypted card reader? The ANSI X9.24 standard is... lacking... in the pseudo-code and readability department. I have the master key, KSN, and cipher…
joelc
  • 2,687
  • 5
  • 40
  • 60
3
votes
1 answer

Why does changing one bit in a Triple DES key or initial value not give different encrypted data?

I'm using pyDes to encrypt some data. I wanted to demonstrate that if you change even one bit in the key or initial value, the encrypted data would be totally different. I set up the 16-byte key to change the last character by +/- 1, causing at…
Mark Rushakoff
  • 249,864
  • 45
  • 407
  • 398
2
votes
3 answers

Why to use 3DES and Blowfish instead of AES

Could someone explain a couple of scenarios where the system design can justify the use of an encryption solution, respectively, as 3DES and Blowfish?
dnlcrl
  • 5,022
  • 3
  • 32
  • 40
2
votes
1 answer

Need Java equvalent for 3DES decryption of PHP code

This is the PHP code I have. function decrypt($s_input, $s_key, $s_iv) { $s_decrypted = pack("H*" , $s_input); // Hex to binary $s_decrypted = mcrypt_decrypt (MCRYPT_3DES, $s_key, $s_decrypted, MCRYPT_MODE_CBC, $s_iv); // 3des decryption …
user1289117
  • 115
  • 1
  • 6
2
votes
1 answer

3DES Decryption gives different results at each iteration

Playing around with 3DES encryptions and decryptions, I use this fairly simple and standard code. However, I get different decryptionData value as output everytime I run this function. Can someone point me what's wrong? private void…
Ryan B.
  • 1,270
  • 10
  • 24
2
votes
1 answer

How to implement TripleDES DESede/ECB/PKCS5Padding encryption with 32-bytes key for golang?

I really need to implement 3DES/ECB/PKCS5Padding for Golang, which I found for implementation like https://gist.github.com/cuixin/10612934 but my secret key length is 32 bytes and is not working. I need your help, guys. Thank you very much
rsmnarts
  • 185
  • 2
  • 14
2
votes
0 answers

3DES Decryption Returning Encrypted Characters at End of Decrypted Password

I'm having a problem with password decryption that has worked correctly for some 10 years in a VB6 DLL but now on newer, faster servers, it's returning the last few encrypted characters of the stored password. For example, "1234" is stored as…
2
votes
1 answer

Java 3DES implementation (academic)

My code so far is: public class TripleDES { /** * @param args the command line arguments * @throws java.security.NoSuchAlgorithmException * @throws javax.crypto.NoSuchPaddingException * @throws…
Anas Nagaty
  • 151
  • 11
2
votes
3 answers

3DES Encryption in Objective-C

I am in the process of building an application for the iMac and iPhone. The goal of the application is to encrypt plain text messages, e-mails, passwords, dates, etc. I have done some research and found that 3DES would work great and is very secure.…
Sam Spencer
  • 8,492
  • 12
  • 76
  • 133
2
votes
1 answer

Can I use 3DES in my application in 2020?

We're writing a new application that is working with relatively sensitive information. The team is debating whether we should support 3DES and/or AES encryption for the data. Unfortunately a Google search is giving mixed results. We have libraries…
user5994461
  • 5,301
  • 1
  • 36
  • 57
2
votes
1 answer

Use Zero Padding in OpenSSL?

System.Security.Cryptography.TripleDES allow me use zero padding like this : static TripleDES CreateTripleDES(byte[] key, byte[] iv) { TripleDES des = new TripleDESCryptoServiceProvider(); des.Key = key; des.IV = iv; des.Mode =…
hieund
  • 21
  • 1
  • 2
2
votes
1 answer

TripleDESCryptoServiceProvider using hex key

I am using TripleDESCryptoServiceProvider to encrypt a series of bytes in C#. The key which is passed to me is in like this FFC7B905AD6ACB57D662115FD65FA338 which i believe is a hex. How can i get this value into TripleDESCryptoServiceProvider.Key…
logeeks
  • 4,849
  • 15
  • 62
  • 93
2
votes
1 answer

TripleDES Encryption between PHP vs C#/.NET

I have legacy server uses TripleDES encryption in .NET/C#. Need to decrypt text by using PHP. I wrote PHP code but it's not able to decrypt message generated form C#. C# Code using System; using System.Data; using System.IO; using…
2
votes
1 answer

phpseclib zero byte padding

How to add zero byte padding in phpseclib with encryption method 3des in EBC mode? Here my current code: $cipher = new TripleDES(TripleDES::MODE_ECB); $cipher->setKey('1234567890ABCDEFGHIJKLMN');
oentoro
  • 740
  • 1
  • 11
  • 32