Re: Help in loading EC_KEY

2012-12-13 Thread redpath
, char **args){ char buffer[256]; long avail; int len; unsigned char *b,*m; FILE *fp; int ret; EC_KEY*peckey; //I want to load private int curvetype= NID_secp224r1; //FYI redpath char *curvename= NID_secp224r1; if (argc3){ help(); return 0

Re: ECDSA pub/priv data storage Best Practices

2012-09-27 Thread redpath
I am really clueless to the direction to go. I will try to clearly present the question again. I have written the Elliptical Curve public key to a file as an octet string. All code has some serious error checking but no sense in enclosing here. ::code excerpt below to save EC public key::

ECDSA pub/priv data storage Best Practices

2012-09-25 Thread redpath
I have saved the private and public key of the ECDSA; Just sample code below. int len= i2o_ECPublicKey(eckey,NULL); unsigned char *buf=(unsigned char *)0; ret= i2o_ECPublicKey(eckey,( unsigned char **)buf); if (!ret){ printf(Public key to octect string failed\n);

Re: ECDSA pub/priv data storage Best Practices

2012-09-25 Thread redpath
. redpath wrote: I have saved the private and public key of the ECDSA; Just sample code below. int len= i2o_ECPublicKey(eckey,NULL); unsigned char *buf=(unsigned char *)0; ret= i2o_ECPublicKey(eckey,( unsigned char **)buf); if (!ret){ printf(Public key to octect string

Re: How to use X509 public key

2012-09-11 Thread redpath
the public key to decipher to chunks of data from the document that has a signature. redpath wrote: Bare with me on this . Self-signed public Key Certificate (give out your public key) == To give out my public key, I need to be put it into a certificate with my name

How to use X509 public key

2012-09-10 Thread redpath
; rsapriv= PEM_read_RSAPrivateKey(fp,rsapriv,NULL,NULL); fclose(fp); fp = fopen(testpublic.pem,rb); RSA *rsapub=NULL; rsapub= PEM_read_RSA_PUBKEY(fp,rsapub,NULL,NULL); fclose(fp); unsigned char *name= (unsigned char *)richard redpath; unsigned char to[1024]; int

Re: EC_KEY and PEM_read_RSAPrivateKey

2012-09-04 Thread redpath
. redpath wrote: Currently I am reading a PEM file which contains a test RSA key /** *Load RSA Keys **/ fp= fopen(test.pem, rb); if (fp==NULL){ printf(ERROR opening RSA Keys failed test.pem\n); return 1; } rsapriv= (RSA

Re: EC_KEY and PEM_read_RSAPrivateKey

2012-09-03 Thread redpath
/crypto_2ec_2ec_8h_a1a93f5739c093586ef83517b52b44a0c.html#a1a93f5739c093586ef83517b52b44a0c redpath wrote: Currently I am reading a PEM file which contains a test RSA key /** *Load RSA Keys **/ fp= fopen(test.pem, rb); if (fp==NULL){ printf(ERROR opening RSA Keys failed test.pem\n); return 1

EC_KEY and PEM_read_RSAPrivateKey

2012-09-01 Thread redpath
Currently I am reading a PEM file which contains a test RSA key /** *Load RSA Keys **/ fp= fopen(test.pem, rb); if (fp==NULL){ printf(ERROR opening RSA Keys failed test.pem\n); return 1; } rsapriv= (RSA *) PEM_read_RSAPrivateKey(fp,rsapriv,