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
0
votes
0 answers

Implementing 3DES encryption/decryption in PLSQL to handle values encrypted by VB.net

We are being asked to decrypt a stream of data using PLSQL which is being encrypted by a VB.net process on a different platform. The VB code is below: Public Function TruncateHash(ByVal key As String,ByVal length As Integer) As Byte() …
Pete Mahon
  • 105
  • 1
  • 12
0
votes
1 answer

Java's 3DES encryption generates trash at the end of encrypted data

I have a 3des Cipher object that is initialized like this: KeySpec keySpec= new DESedeKeySpec(bytesKey); SecretKeyFactory secretKeyFactory = SecretKeyFactory.getInstance("DESede"); SecretKey secretKey=…
Daniel Calderon Mori
  • 5,466
  • 6
  • 26
  • 36
0
votes
1 answer

Why my smart card accepts two different keys as its MAC key?

As you see below, I tried to list installed applets on my card using gp -list. I specify some different key: GP: gp -mac 404142434445464748494A4B4C4D4E4F -list AID: A000000151000000 (|....Q...|) ISD OP_READY: Security Domain, Card lock, Card…
Jean
  • 687
  • 1
  • 9
  • 25
0
votes
1 answer

Encrypt using 3DES EDE / ECB / NOPadding

I have received a task to encrypt and decrypt an XML string by using a TOKEN and a KEY. The encryption shall use 3DES EDE / ECB / NOPadding and can be made either in PHP or C# I am not so prepared on this so I have read around a bit of theory and…
Lorenzo
  • 29,081
  • 49
  • 125
  • 222
0
votes
2 answers

How to perform 3DES encryption in Ruby?

I have a legacy Yii PHP system that is performing 3DES Encryption. $data = 'id=1,username=admin,email=webmaster@example.com'; $encrypted_key = mhash(MHASH_SHA1,"foo_bar_key"); $encrypted_value = $StringHelper::encrypt($data, $encrypted_key); echo…
Joseph Smitty
  • 245
  • 1
  • 3
  • 7
0
votes
1 answer

convert php mcrypt_encrypt MCRYPT_3DES to Java

I have code in PHP $res = strtoupper(bin2hex(mcrypt_encrypt(MCRYPT_3DES, $this->hex2str($key), $this->hex2str($data), MCRYPT_MODE_ECB))); public function hex2str($data) { $len = strlen($data); $res = pack("H" . $len, $data); …
Zed Lee
  • 21
  • 1
  • 6
0
votes
0 answers

PHP mcrypt 3DES 168bytes key: encrypted string can't by decrypt by JAVA

I have a problem with 3DES of PHP. I'm doing a project that will access the internal interface of bank. They had developed an interface by java. One function of the interface is that bank system will get the public RSA key from my server. The bank…
soyo20
  • 1
0
votes
0 answers

Convert 20 byte decimal to 24 byte hexadecimal

How can I convert a 20 byte decimal (74515898855732498125) to a 24 byte hexadecimal. This 24 byte hexa output will act as an encryption key for doing TripleDES. Please help with this.
0
votes
1 answer

PHP 3DES decrypt showed weird(bad) characters

I have a PHP form for which I have implemented 3des encryption/decryption. After submitting and inserting information into database from the front-end, I want to read out the information in the back-end. After decryption my form's information…
brelian
  • 403
  • 2
  • 15
  • 31
0
votes
0 answers

3DES decryption in Objective C produces different result comparing to java

I have to decrypt a string in Objective C. The encryption scheme is DES/ECB/NoPadding and I am providing this Java code with correct output with following input data = 741DCDDF1C216EEF and key = D9C44F6D2589255E and output should be…
StackUser
  • 31
  • 1
  • 5
0
votes
1 answer

3DES iOS encrypt different from .Net server

I'm trying to encrypt a request, I made this function but I'm getting a different encrypt value in the .NET server. This is the function I'm using in iOS: - (NSData *)Encrypt3DESWithInput:(NSString *)input key:(NSString…
rene
  • 7
  • 1
0
votes
1 answer

Having wired outputs while Rfc2898DeriveBytes implementation in TripleDES

This is a simple code but its taking hours to find out why am I getting wrong output. I can't seem to find the problem. Is everything okey specially with Rfc2898DeriveBytes implementation? I need help to find out whats causing wrong output, where is…
Giliweed
  • 4,997
  • 8
  • 26
  • 35
0
votes
0 answers

Make TDES working with 16-byte input from existing function worked with 8-byte input

currently I use the DES from this library for Arduino (https://github.com/Octoate/ArduinoDES). But this library is only working with 8-byte of input. So the question is how can I make this library working with my input of 16 bytes? Is there any…
0
votes
1 answer

3DES result in PHP produces different result from 3DES in Python

PHP code: $key = '111111111111111111111111'; //length: 24 $iv = "\0\0\0\0\0\0\0\0"; //8 bytes $data = mcrypt_encrypt(MCRYPT_TRIPLEDES, $key, "SECRET", MCRYPT_MODE_CBC, $iv); base64_encode($data); // Result: ZGF0YQ== Python code (using…
User
  • 1,978
  • 5
  • 26
  • 47
0
votes
1 answer

ImportError: No module named pyDes

I am trying to use DES and 3DES in python but when I tried to import pyDes I got this Error ImportError: No module named pyDes Why? UPDATE thank you from pyDes import * Message=(input("Enter message")) key=(input("Enter Key")) k =…
user3464643
  • 3
  • 1
  • 3