Kosta Welke wrote:
On Wed, 18 Feb 2009 04:40:22 +0100, xh <[email protected]> wrote:

BTW, I find another strange behaviour:
take the lines at the beginning of the file evptests.txt for example,
# SHA(1) tests (from shatest.c)
SHA1:::616263:a9993e364706816aba3e25717850c26c9cd0d89d

#echo 616263 > a.txt
SHA1(a.txt)= 765ecbbdc9e459fee019c275fbdd589d2948a009

As David Jacobson already pointed out, echo appends an unwanted newline. Furthermore, 616263 is hex encoding for abc:
echo -n 616263 | xxd -r -g 0 -p | xxd
0000000: 6162 63                                  abc

So, echo -n abc | openssl dgst -sha1 produces, as expected:
a9993e364706816aba3e25717850c26c9cd0d89d
Thanks a lot!

I misunderstand the 616263 :-[

Another question for entry:
AES-128-ECB:000102030405060708090A0B0C0D0E0F::00112233445566778899AABBCCDDEEFF:69C4E0D86A7B0430D8CDB78070B4C55A:1

How can I specify the iv for above entry whose iv is none?
[r...@amadis openssl-0.9.8j]# openssl aes-128-ecb -K 000102030405060708090A0B0C0D0E0F -iv ???

thanks,
-Quanhong

HTH,
Kosta
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to