Exactly, that's my point, I have to integrate with a third party API, so I
can't do anything else but to send the ciphered text as expected.
Anyway, thanks for your explanation on this issue, I'll take it into
account and try to contact third party support team.
Thanks.
2015-11-25 11:23 GMT+01:
On Wed, Nov 25, 2015 at 11:14:48AM +0100, David García wrote:
> Viktor, you pointed me to the right way. I was missing the -nopad flag in
> the openssl command.
Not using padding is fragile and can lead to subtle data corruption.
Perhaps not padding is safe and correct in your case, but I am
skep
Viktor, you pointed me to the right way. I was missing the -nopad flag in
the openssl command.
I don't need to do the padding through the cipher algorithm because I do
the 0 padding manually before executing the ciphering.
Now it matches. This is the command I am using (for this manual example I
On Wed, Nov 25, 2015 at 09:18:15AM +0100, David García wrote:
> H6cr2yN8oWV6AUY/JlknQw==
Decrypting in ECB mode you get:
$ echo H6cr2yN8oWV6AUY/JlknQw== |
openssl base64 -d |
openssl enc -d -des-ede3 -K
'b2aec78eb50e05f2a60b9efa20b82c903e6cad4f3bd2027b' -nopad |
hexd
Thanks, you are rigth. I did a test with
echo -n 005863330
and
echo 005863330
and the last one adds the new line character.
I also checked that openssl is not adding this new line character. Now with
this command:
echo -n 005863330 | openssl enc -e -des-ede3-cbc -K
'b2aec78eb50e05f2a60b9efa20
It is very likely that your text file also contains a newline at the
end, so getting the same result as with the echo command would be
expected. If it is indeed the newline that is making the difference,
you could try using the echo command with the '-n' option to suppress it.
Jay
On 11/24/2
On Tue, Nov 24, 2015 at 06:12:59PM +0100, David García wrote:
> Sorry, still not getting the same result, now with the command:
>
> echo 005863330 | openssl enc -e -des-ede3-cbc -K
> 'b2aec78eb50e05f2a60b9efa20b82c903e6cad4f3bd2027b' -iv -nosalt |
> openssl enc -base64
Please also read
Sorry, still not getting the same result, now with the command:
echo 005863330 | openssl enc -e -des-ede3-cbc -K
'b2aec78eb50e05f2a60b9efa20b82c903e6cad4f3bd2027b' -iv -nosalt |
openssl enc -base64
I get:
H6cr2yN8oWXn2RxiDqnXLg==
but I should get:
H6cr2yN8oWUVY3a6/Vaaow==
BTW I get
You are right Viktor, that was my problem.
Thank you very much for your help Viktor and Michael.
2015-11-24 18:00 GMT+01:00 Viktor Dukhovni :
> On Tue, Nov 24, 2015 at 05:55:42PM +0100, David García wrote:
>
> > openssl enc -e -des-ede3-cbc -in myfile.txt -k
> > 'b2aec78eb50e05f2a60b9efa20b82c90
On Tue, Nov 24, 2015 at 05:55:42PM +0100, David García wrote:
> openssl enc -e -des-ede3-cbc -in myfile.txt -k
> 'b2aec78eb50e05f2a60b9efa20b82c903e6cad4f3bd2027b' -iv -nosalt |
> openssl enc -base64
Please read Michael's message carefully. Note the comment about
"-k" vs. "-K" (upper-ca
I am sorry, I pasted an invalid key I was playing with to check some other
things. Next, the real key and now reading the value from a file instead
from echo (BTW I am using a linux terminal):
openssl enc -e -des-ede3-cbc -in myfile.txt -k
'b2aec78eb50e05f2a60b9efa20b82c903e6cad4f3bd2027b' -iv 000
> echo 'text_to_cypher' | openssl enc -e -des-ede3-cbc -k
> 'b2aec78eb50e04f2a60b9efa20b82c903e3cad4f3bd2027g' -iv -nosalt |
> openssl enc -base64
That echo command will append a LF (x'0a') byte (if this is a conventional UNIX
or Linux system, or Cygwin, etc, and you're running under
Hi,
I am trying to use openssl command line tool for des-ede3-cbc encryption,
but it does not mach with the one I have in Java (and that I know that
works ok). I try to generate a des-ede3-cbc encryption with an IV =
0,0,0,0,0,0,0,0. Then I launch following command:
echo 'text_to_cypher' | opens
13 matches
Mail list logo