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

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

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");

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