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
76
votes
6 answers

How do I use 3DES encryption/decryption in Java?

Every method I write to encode a string in Java using 3DES can't be decrypted back to the original string. Does anyone have a simple code snippet that can just encode and then decode the string back to the original string? I know I'm making a very…
Kyle Boon
  • 5,213
  • 6
  • 39
  • 50
45
votes
7 answers

how to use RSA to encrypt files (huge data) in C#

I'm new to encryption. I need to implement asymmetric encryption algorithm, which i think it uses private/public key. I started using a sample of RSACryptoServiceProvider. it was ok with small data to encrypt. But when using it on relatively larger…
ala
  • 7,070
  • 13
  • 47
  • 54
19
votes
4 answers

3DES Key Size Matter in C#.Net

Below Code is Working Fine in c#.NET byte[] key = Encoding.ASCII.GetByte("012345678901234567890123"); //24characters byte[] plainText = Encoding.ASCII.GetBytes("lasaa"); TripleDES des = TripleDES.Create(); des.Key = key; des.Mode =…
Lasantha
  • 391
  • 1
  • 3
  • 13
13
votes
2 answers

using DES/3DES with python

what is the best module /package in python to use des /3des for encryption /decryption. could someone provide example to encrypt data with des/3des on python.
ron
  • 281
  • 2
  • 3
  • 9
12
votes
2 answers

mcrypt_encrypt to openssl_encrypt, and OPENSSL_ZERO_PADDING problems

I have this mcrypt_encrypt call, for a given $key, $message and $iv: $string = mcrypt_encrypt(MCRYPT_3DES, $key, $message, MCRYPT_MODE_CBC, $iv); I'd like to change the mcrypt_encrypt call to an openssl_encrypt one, to future-proof this. By having…
yivi
  • 42,438
  • 18
  • 116
  • 138
9
votes
7 answers

Is DES or 3DES still being used today?

I've written a DES implementation as an exercice and am now wondering if and where (triple-)DES is used today. I've read about banking cards using it, but I can't find any reliable source for it.
svens
  • 11,438
  • 6
  • 36
  • 55
9
votes
1 answer

Replicate T-SQL DecryptByPassPhrase in C#

I wnat to create a C# class to decrypt a byte array encrypted using T-SQL's EncryptByPassPhrase. (Yes, I know I could decrypt within SQL Server, but what I need is to be able to encrypt/decrypt within both the database tier and in the middle tier…
hbeam
  • 187
  • 3
  • 9
8
votes
4 answers

How ciphertext was generated in card reader using DUKPT encryption?

For `BDK = "0123456789ABCDEFFEDCBA9876543210"` `KSN = "FFFF9876543210E00008"` The ciphertext generated was…
Dolo
  • 966
  • 14
  • 28
6
votes
2 answers

PHP Equivalent for Java Triple DES encryption/decryption

Am trying to decrypt a key encrypted by Java Triple DES function using PHP mcrypt function but with no luck. Find below the java code import javax.crypto.Cipher; import javax.crypto.spec.IvParameterSpec; import…
Ranju
  • 147
  • 2
  • 4
  • 10
6
votes
3 answers

How can I do an ISO 9797-1 MAC with triple DES in C#?

I've got a project which stipulates the following encryption rules for a 24 byte block of data. 1) Cryptography should be done using full triple DES MAC algorithm as defined in 9797-1 as MAC algorithm 3 with output transformation 3 without…
logeeks
  • 4,849
  • 15
  • 62
  • 93
6
votes
6 answers

Calculate the parity of a byte in Ruby

What's the best way to calculate if a byte has odd or even parity in Ruby? I've got a version working: result = "AB".to_i(16).to_s(2).count('1').odd? => true Converting a number to a string and counting the "1"s seems a poor way of calculating…
dkam
  • 3,876
  • 2
  • 32
  • 24
6
votes
3 answers

iPhone 3DES encryption key length issue

I have been banging my head on a wall with this one. I need to code my iPhone application to encrypt a 4 digit "pin" using 3DES in ECB mode for transmission to a webservice which I believe is written in .NET. + (NSData…
Russell Hill
  • 83
  • 1
  • 4
6
votes
1 answer

Cipher / 3DES / CFB / Java and PHP

I have a PHP servor which decrypt data in 3DES with the CFB Mode I encrypt in PHP : $montant = "500"; $message_crypte = mcrypt_encrypt(MCRYPT_3DES, "N4y1FRDRJ7wn7eJNnWaahCIS", $montant, ,CRYPT_MODE_CFB, "NCNPJDcR"); $montant =…
user1450740
  • 731
  • 10
  • 26
5
votes
1 answer

Python des-ede-cbc equivalent

I currently have an encrypt and decrypt for 3DES (des-ede-cbc) in PHP as follows: php > $key = '0000000000000000'; php > $iv = '00000000'; php > $plaintext = '1234567812345678'; php > $ciphertext = openssl_encrypt($plaintext, 'des-ede-cbc', $key, 0,…
Cruncher
  • 7,641
  • 1
  • 31
  • 65
5
votes
1 answer

Encrypting/decrypting 3DES in Ruby

I have a key.bin file which content is something along the lines of: -12, 110, 93, 14, -48, ... This is being used by a service to decrypt 3DES content, but I need to encrypt it via Ruby. I've tried loads of scenarios with how to set the key and…
changelog
  • 4,646
  • 4
  • 35
  • 62
1
2 3
23 24