3des

Using Triple DES(3DES) with PHP 7.1 [closed]

空扰寡人 提交于 2019-12-25 12:57:06
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 10 months ago . I need a way to encrypt and decrypt with 3des. I'm currently using php 7.1 I found this question, but mcrypt is deprecated as of php 7.1 and I can't find any other resource for this. 回答1: Continue to the Comments section of the function's manual and you'll see the following: If

How to 3DES encrypt in Python using the M2Crypto wrapper?

不打扰是莪最后的温柔 提交于 2019-12-24 14:26:19
问题 I have a working test of a hardware device that uses RSA encryption, in Python using M2Crypto. Now I need to test a similar device that uses 3DES encryption. But I can't figure out how to use M2Crypto to do triple DES encryption. I know it should be possible from this chart. But unfortunately the documentation of M2Crypto I've found is sketchy. (The homepage at http://chandlerproject.org/ seems to be gone, along with Chandler.) I've searched for 3DES and "OpenSSL API" and found some hard to

DES3 encryption: ruby openssl::cipher vs. oracle dbms_obfuscation_toolkit

时光怂恿深爱的人放手 提交于 2019-12-24 03:02:41
问题 I have a legacy application written in PL/SQL that encrypts and decrypts data using 3DES. Now I need to perform similar encryption from a ruby app. Eventually the resulting hash will need to be decrypted by the same PL/SQL application using its existing algorithm. The problem is that I'm obtaining different encrypted results in PL/SQL and Ruby and I don't know why. First here is exactly how the PL/SQL encryption works: From Oracle's docs about DBMS_OBFUSCATION_TOOLKIT http://docs.oracle.com

php mcrypt CBC mode encryption/decryption problem

大憨熊 提交于 2019-12-23 12:27:41
问题 I have a problem with CBC mode when I try to encrypt/decrypt some text using php's mcrypt extension. I've created a class to perform this operations, it works fine with other modes but CBC. The problem is as follow: I use the clear text Even in cryptography, silence is golden . I do the encryption part, no problem till this point. But each time I try to decrypt, I get something like this: 9��'t"�cryptography, silence is golden . As you can see, the first 8 characters of the text are wrong. I

Why won't 3DES encrypt one block?

冷暖自知 提交于 2019-12-23 03:28:09
问题 I'm trying to implement this question i asked in the past Securely Encrypt 64bits w/o per element overhead? In the immediate window i entered TripleDES.Create().LegalBlockSizes.First() and got {System.Security.Cryptography.KeySizes} MaxSize: 64 MinSize: 64 SkipSize: 0 64bits/8bits per byte is 8bytes. Exactly what length a long is. Anyways i run it through the code below and the exception throws. The length of the block is 16bytes. Not what i want to have... I would ask how to change it to

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

萝らか妹 提交于 2019-12-22 05:18:04
问题 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 truncation and with DES in CBC mode as block cipher with ICV set to zeros. Last 8 bytes of encrypted data constitute the value we need. The program is saying the encryption done is wrong. Are there any other things I need to do to match the above spec? The

Decrypting data in Python that was encrypted in 3DES by Java

ⅰ亾dé卋堺 提交于 2019-12-22 00:57:24
问题 I'm trying to decrypt data using PyCrypto. The data was encoded in Java with the javax.crypto package. The encryption is Triple DES (referred to as "DESede" in Java). As far as I can tell, default settings are used for everything. However, when I go to decrypt the data in Python there is always a problem with the data. Here's the Java code that does encrypting/decrypting: import sun.misc.BASE64Decoder; import sun.misc.BASE64Encoder; import javax.crypto.Cipher; import javax.crypto.SecretKey;

iOS 3DES encryption for TPV payments

半世苍凉 提交于 2019-12-20 05:39:28
问题 I'm developing an iOS app that makes payments through a TPV Redsys API. I'm following the documents but it's not working (server returns error due to an incorrect signature) and I guess it's because of the 3DES encryption. I'm using the test data from the documentation so the output should be the same as in the documentation. This is my code: - (void) payViaTPVWithAmount:(NSString *)amount andOrderId:(NSString *)orderId { // I don't use my amount and orderId but those provided by the

3des encryption and decryption in iOS

[亡魂溺海] 提交于 2019-12-19 10:25:46
问题 I am working on 3DES encryption and decryption. I have done encryption successfully. For decryption, I am using this code but not getting exact result. My encryption string is " CHc3TsfJgYs= " and key is " meristem ". Please tell me what I am doing wrong? NSString *token = @"CHc3TsfJgYs="; NSString *key = @"meristem"; const void *vplainText; size_t plainTextBufferSize; plainTextBufferSize = [token length]; vplainText = (const void *) [token UTF8String]; CCCryptorStatus ccStatus; uint8_t

.NET TripleDESCryptoServiceProvider equivalent in Java

喜欢而已 提交于 2019-12-18 10:58:07
问题 Please, just don't ask me why. I just have this code in .NET that encrypt/decrypt strings of data. I need now to make 'exactly' the same funcionality in java. I have tried several examples for DESede crypt, but none of them gives the same results as this class in .net. I even though on making a .net webserbvice behind ssl to serve this two methods writen in .net but it is just too stupid to do without exhausting all the posibilities. Maybe some of you java people which are more related in the