Re: signing data

2013-06-12 Thread Dr. Stephen Henson
On Fri, Jun 07, 2013, Michael Wild wrote: Thanks for all the answers. Now I feel really stupid about forgetting the implicit 0... Stephen: How do I prevent my program from hashing the data? EVP_md_null()? After all, hashing a hash is pretty pointless for my case... It depends on how you

Re: signing data

2013-06-12 Thread Michael Wild
On 12.06.2013 14:57, Dr. Stephen Henson wrote: On Fri, Jun 07, 2013, Michael Wild wrote: Thanks for all the answers. Now I feel really stupid about forgetting the implicit 0... Stephen: How do I prevent my program from hashing the data? EVP_md_null()? After all, hashing a hash is pretty

signing data

2013-06-07 Thread Michael Wild
Dear all I'm quite the noob in all things OpenSSL, and I'm struggling getting started with signing a piece of data. Here a MWE that should illustrate the problem. It loads private.pem (a RSA private key I generated using `openssl genrsa -out private.pem 1024`) and then tries to sign a piece of

Re: signing data

2013-06-07 Thread Krzysztof Konopko
On 7 June 2013 07:06, Michael Wild them...@users.sourceforge.net wrote: Dear all I'm quite the noob in all things OpenSSL, and I'm struggling getting started with signing a piece of data. The thing is that on the command line your data is subtly different than in your C program. Hash

RE: signing data

2013-06-07 Thread Salz, Rich
The printf command appends a newline to the data so it's different from what your program has. /r$ -- Principal Security Engineer Akamai Technology Cambridge, MA __ OpenSSL Project

Re: signing data

2013-06-07 Thread Krzysztof Konopko
On 7 June 2013 12:09, Salz, Rich rs...@akamai.com wrote: The printf command appends a newline to the data so it's different from what your program has. /r$ That's not true. It behaves pretty much like standard C printf(), i.e. it doesn't print any characters unless you ask it for

Re: signing data

2013-06-07 Thread Dr. Stephen Henson
On Fri, Jun 07, 2013, Michael Wild wrote: Dear all I'm quite the noob in all things OpenSSL, and I'm struggling getting started with signing a piece of data. Here a MWE that should illustrate the problem. It loads private.pem (a RSA private key I generated using `openssl genrsa -out

RE: signing data

2013-06-07 Thread Salz, Rich
Ø No new line added. As I already suggested, it's an implicit NULL terminator in the C string literal in the C program. Of rats, of course you're right. The proper thing to do is sizeof ... -1 /r$ -- Principal Security Engineer Akamai Technology Cambridge, MA

Signing data using an RSA keypair and RSA patent encumberance

2008-07-24 Thread Salman Ahmed
If I use the following functions from OpenSSL to sign data and later verify the data/signature using an RSA keypair: EVP_SignInit(); EVP_SignUpdate(); EVP_SignFinal(); EVP_VerifyInit(); EVP_VerifyUpdate(); EVP_VerifyFinal(); in an application that is distributed globally

Re: Signing data using an RSA keypair and RSA patent encumberance

2008-07-24 Thread Patrick Patterson
Salman Ahmed wrote: If I use the following functions from OpenSSL to sign data and later verify the data/signature using an RSA keypair: EVP_SignInit(); EVP_SignUpdate(); EVP_SignFinal(); EVP_VerifyInit(); EVP_VerifyUpdate(); EVP_VerifyFinal(); in an application

Re: Signing data using an RSA keypair and RSA patent encumberance

2008-07-24 Thread Kyle Hamilton
Please read the Wikipedia page on it? Due to some of the circumstances surrounding the RSA algorithm's patenting, it became impossible for patents to be issued on the algorithm outside the US. This, along with the US government's encryption export policies, is why the PGPi (international PGP)

Re: signing data

2000-05-03 Thread Son . To . wh98
You need to use EVP_dss1() for the digest which is SHA1 with DSS for singing. Check out: http://www.openssl.org/docs/crypto/EVP_SignInit.html http://www.openssl.org/docs/crypto/EVP_DigestInit.html that got me farther than before, but EVP_SignFinal() dumps core. Maybe I am generating the

Re: signing data

2000-05-03 Thread Son . To . wh98
ignore this... the problem was a result of the DSA_generate_key() not being called changed if( !dsa !DSA_generate_key(dsa) ) { printf("Can't generate DSA keys\n"); return 0; } to if( !dsa || !DSA_generate_key(dsa) ) { printf("Can't generate DSA keys\n");

signing data

2000-05-02 Thread Son . To . wh98
I am trying to sign data using DSA. My code fails on EVP_SignFinal(). It fails on line 92 in p_sign.c . I think there is something wrong with the way I created EVP_MD_CTX structure for EVP_SignInit(). Any help is appreciated. Here is my code #include openssl/evp.h #include openssl/dsa.h

Re: signing data

2000-05-02 Thread Dr Stephen Henson
[EMAIL PROTECTED] wrote: I am trying to sign data using DSA. My code fails on EVP_SignFinal(). It fails on line 92 in p_sign.c . I think there is something wrong with the way I created EVP_MD_CTX structure for EVP_SignInit(). Any help is appreciated. Here is my code #include

error in signing data - wrong public key type!?!!

2000-02-14 Thread matthew denner
dear all, need help! basically i'm writing some c++ class libraries for accessing the openssl toolkit (just for my piece of mind but for easier and quicker development too :) i'm having real problems with the signing of data using RSA keys as i keep getting the error:

Re: How to make pkcs7 signing data?

2000-01-13 Thread Dennis Xu
Steve Wrote: This is one area that will be updated in OpenSSL 0.9.5. There is an 'smime' application in the 0.9.5 development release and a simpler API that does most of the hard work. That might be a good place to start. For the pkcs7 function in openssl, what does it do exactly for the

Signing data

1999-12-16 Thread Cosimo Vagarini
Excuse me if my questions appear too obviuos for you. This is my problem: - I have my private key. - I have a string. - I have to sign this string with my private key using md5. - I have made a small C program to do this. I put here some lines of it: ... EVP_MD_CTX ctx; EVP_PKEY *pkey; ...