Signature-creation with OpenSSL

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Signature-creation with OpenSSL

Szabó Áron
Hi,

could someone explain me what the exact difference is between these two
methods of signature-creation (using "sha1 -sign" and "sha1 and rsautl
-sign")?

1)

openssl sha1 -binary -sign private_key.in -out dataHashedEncrypted.out
data.in
openssl base64 -in dataHashedEncrypted.in -out
dataHashedEncryptedEncoded.out

2)

openssl sha1 -binary -out dataHashed.out data.in
openssl rsautl -sign -in dataHashed.in -inkey private_key.in -out
dataHashedEncrypted.out
openssl base64 -in dataHashedEncrypted.in -out
dataHashedEncryptedEncoded.out

Thanks in advance!
Best regards,
Aron

----------------------------------------------------
Aron Szabo, M. Sc.
Research Associate,
Center of Information Technology
Budapest University of Technology and Economics


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

ASN.1 error message in OpenSSL v0.9.7d

Szabó Áron
Hi all,

I always get error message (ASN1_get_object:too long) when I want to create
a DER encoded file from TXT using command line in OpenSSL v0.9.7d.

openssl asn1parse -inform TXT -in input.txt -out output.der

I've also tried with a correct ASN.1 structure (decoded from a real
timestamp), but the same error message appeared. Any idea to this?

Thanks in advance!
Aron

----------------------------------------------------
Aron Szabo, M. Sc.
Research Associate,
Center of Information Technology
Budapest University of Technology and Economics


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: ASN.1 error message in OpenSSL v0.9.7d

Nils Larsch
Szabó Áron wrote:
> Hi all,
>
> I always get error message (ASN1_get_object:too long) when I want to create
> a DER encoded file from TXT using command line in OpenSSL v0.9.7d.
>
> openssl asn1parse -inform TXT -in input.txt -out output.der

asn1parse doesn't support "txt" input just der or pem

Nils
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: ASN.1 error message in OpenSSL v0.9.7d

Beat Jucker
In reply to this post by Szabó Áron
> I always get error message (ASN1_get_object:too long) when I want to create
> a DER encoded file from TXT using command line in OpenSSL v0.9.7d.

I had the same problem but only on a view particular S/Mime files.
Please try current OpenSSL-0.9.8-beta6. There was a BASE64 decoding
bug in previous versions.

Regards
-- Beat
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: ASN.1 error message in OpenSSL v0.9.7d

Szabó Áron
Thanks for answers, I'll try with a newer version of OpenSSL!
Aron

---

> I always get error message (ASN1_get_object:too long) when I want to
create
> a DER encoded file from TXT using command line in OpenSSL v0.9.7d.

I had the same problem but only on a view particular S/Mime files.
Please try current OpenSSL-0.9.8-beta6. There was a BASE64 decoding
bug in previous versions.

Regards
-- Beat


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: ASN.1 error message in OpenSSL v0.9.7d

Richard Levitte - VMS Whacker
In reply to this post by Nils Larsch
In message <[hidden email]> on Tue, 28 Jun 2005 10:26:38 +0200, Nils Larsch <[hidden email]> said:

nlarsch> asn1parse doesn't support "txt" input just der or pem

The help says it does.  I'll fix that.

Cheers,
Richard

-----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

--
Richard Levitte                         [hidden email]
                                        http://richard.levitte.org/

"When I became a man I put away childish things, including
 the fear of childishness and the desire to be very grown up."
                                                -- C.S. Lewis
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]