Triple DES is a symmetric encryption algorithm that uses the DES cipher three times to encrypt each block of data. The formal name of this algorithm is the Triple Data Encryption Algorithm.
Questions tagged [tripledes]
266 questions
5
votes
3 answers
C# Implementation of Retail MAC Calculation (ISOIEC 9797-1 MAC algorithm 3)
I am trying to calculate the MAC using
Cryptographic checksums are calculated using ISOIEC 9797-1 MAC
algorithm 3 with block cipher DES, zero IV (8 bytes), and 1S09797-1
padding method 2. The MAC length MUST be 8 bytes
from Technical Report PM for…

Cadburies
- 101
- 1
- 4
5
votes
0 answers
DUKPT Implementation process using Java and how to convert a hexadecimal string to a DES key (ByteArray)
I am trying to implement the VISA DUKPT algorithm to generate a unique key per transaction from a transaction KSN. I have followed step by step the information provided by the ANS X9.24-1:2009 but the IPEK that I am getting is not the same as the…

aeal
- 59
- 1
- 2
4
votes
3 answers
Decrypting TripleDES: Specified key is a known weak key and cannot be used
Why does this code return the weak key error?
static public byte[] TDESDecrypt(byte[] toDecrypt, byte[] key, CipherMode mode = CipherMode.ECB, PaddingMode padding = PaddingMode.None)
{
TripleDESCryptoServiceProvider tdes = new…

Piero Alberto
- 3,823
- 6
- 56
- 108
4
votes
1 answer
String Encrypted in C# Using TripleDES, need to decrypt in PHP
C# Code looks like that (can't change it as it's in a client's system).
namespace Common {
public static class EncryptionHelper
{
private const string cryptoKey = "password";
// The Initialization Vector for the DES encryption routine
…

staskus
- 171
- 8
4
votes
1 answer
3DES Encryption Oracle/JAVA equivalent
I'm trying to migrate the oracle method dbms_obfuscation_toolkit.DES3Encrypt to a Java Function. My problem is that I don't get the same encrypted value in both scenes.
For this procedure in Oracle:
set serveroutput on;
declare
input…

Alberto Vergel
- 71
- 1
- 5
4
votes
1 answer
3des encryption in Node.JS returning invalid IV length
I'm quite new to Node and have run into an issue with the encryption object:
var des3_key = new Buffer("redacted", "base64"); // copied from key in chilk
var des3_iv = new Buffer("alsoredacted", "base64"); // copied from iv in chilk
var…

Gavin
- 2,214
- 2
- 18
- 26
3
votes
2 answers
How to generate a strong encryption key for TripleDESCryptoServiceProvider
I'm using the TripleDESCryptoServiceProvider and need to store the encryption key.
If I call the providers GenerateKey method, is this just a base64 encoded string? If so am I safe to unencode it as such as use the resulting string as a key?
On a…

Ben Foster
- 34,340
- 40
- 176
- 285
3
votes
1 answer
Encryption and Decryption with randomly generated key?
I'm a j2me programmer. My project is related to sending data to server via HTTP method. I encrypt the data in j2me side using Bouncy Castle (Triple DES). I also maintain the server side coding.
Then in server side received data is decrypted and…

SIVAKUMAR.J
- 31
- 1
3
votes
1 answer
Convert C# decryption to Python PyDes
I'm having trouble converting code from C# to Python. Over at Martijn's C# Blog is an excellent program for encrypt/decrypt [enclosed below] but I can't get it to convert directly to the python version pyDes [sample below]
public static string…

David Hall
- 240
- 1
- 10
3
votes
1 answer
openssl 3des with c++
I want to use the openssl library in C++ to decrypt data.
I have the key and IV and the encoded base64 string.
I couldn't make it through the documentation, all decryption methods in the header file (openssl/des.h) take 3 keys.
I've managed to…

Ammar Hussein
- 5,534
- 5
- 18
- 37
3
votes
3 answers
'UnsafePointer' is not convertible to 'UnsafePointer<_>'
I'm doing tripleDES encryption and decryption. Getting this error:
UnsafePointer' is not convertible to 'UnsafePointer<_>
The code where I'm getting the error is:
let keyString = "25d1d4cb0a08403e2acbcbe0"
let keyData =…

Rohitax Rajguru
- 893
- 2
- 13
- 35
3
votes
4 answers
TripleDES Encrypting in C# and PHP not coming out the same (PKCS7, ECB)?
I've spent a couple hours now trying to figure this out, but I just can't get it to work. I've got a C# encryption routine that I need to match in php. I can't change the C# version, that's not an option (3rd party is firm on this).
Here's the C#…

Redth
- 5,464
- 6
- 34
- 54
3
votes
2 answers
How many keys does Triple DES encryption need?
I am porting some C# code to C++, and trying to encrypt a textfile with Triple DES encryption. But I am confused; some encryption APIs only require one key for Triple DES (C# for example: How to implement Triple DES in C# (complete example) ), while…

Jolle
- 1,336
- 5
- 24
- 36
3
votes
1 answer
PHP Triple DES encryption and compatible C# decryption
I am decrypting a message in C#, this message is encrypted in PHP using below code:-
public function __construct($sEncryptionKey)
{
$this->link = mcrypt_module_open('tripledes', '', 'ecb', '');
$this->sInitializationVector =…

Anand Systematix
- 632
- 5
- 15
3
votes
1 answer
iOS 3DES with ECB return half correct data
Got a problem with crypting password with 3DES + ECB algo.
Here is the code I using:
class func encryptPassword(pass: String) -> String {
let keyString = "123456789012345678901234"
let keyData: NSData! = (keyString as…

alexey.metelkin
- 1,309
- 1
- 11
- 20