Re: Convert PKCS7_decrypt output to char*

2012-07-02 Thread Mohammad khodaei
side it is easy to base64 decode it. As such it gives you the guarantee it is decoded correctly. On the other side you should of course also have the reverse chain, but I don't have an example at hand for that. Regards On 25.06.2012 15:04, Mohammad Khodaei wrote: Hello, I want to encrypt

Asymmetric Cryptography using openssl lib

2012-07-03 Thread Mohammad Khodaei
Hello, I am a bit confused when it comes to asymmetric encryption/decryption. Now I use PKCS7_encrypt() and PKCS7_decrypt() to encrypt using recipient public key and decrypt using the private key. My question is that if they the correct functions to encrypt and decrypt? Or they are supposed to be

Re: Convert PKCS7_decrypt output to char*

2012-07-04 Thread Mohammad khodaei
: owner-openssl-us...@openssl.org On Behalf Of Mohammad khodaei Sent: Monday, 02 July, 2012 10:05 I want to encrypt and decrypt using PKCS7_encrypt() and PKCS7_decrypt(). I use this procedure to encrypt so that I can retreive the encrypted buffer into a char* (and not into a file). Here is the code

Re: [openssl-users] ECDSA sign/verify input data size

2012-08-06 Thread Mohammad khodaei
: Erwann Abalea erwann.aba...@keynectis.com To: openssl-users@openssl.org Cc: Mohammad Khodaei m_khod...@yahoo.com Sent: Monday, August 6, 2012 2:14 PM Subject: Re: [openssl-users] ECDSA sign/verify input data size Bonjour, Which part of the examples did you mimic? 32 bytes is the length of a SHA256

Re: [openssl-users] ECDSA sign/verify input data size

2012-08-06 Thread Mohammad khodaei
ABALEA Le 06/08/2012 14:31, Mohammad khodaei a écrit : Yes, it's correct.  Now I try to feed the ECDSA_do_sign with the output buffer of SHA256. Based on my security knowledge, I thought that the signing algorithms perform hashing internally, while in this case it is not true. Thanks

Re: Elliptic Curve key generation help

2012-08-15 Thread Mohammad khodaei
Hi, Based on the previous conversations, I tried to generate Elliptic Curve public/Private key pair. I want to convert the output BIGNUM* to char* in order to perform the rest of my task. Using BN_bn2hex is the correct api to do this? It seems it returns a 32 byte Hex while when I generate EC

Re: Elliptic Curve key generation help

2012-08-16 Thread Mohammad khodaei
/docs/crypto/bio.html# Jason On Aug 15, 2012, at 5:59 AM, Mohammad khodaei m_khod...@yahoo.com  wrote: Hi, Based on the previous conversations, I tried to generate Elliptic Curve public/Private key pair. I want to convert the output BIGNUM* to char* in order to perform the rest of my task

Re: Converting BIO* to PKCS7*

2012-09-18 Thread Mohammad khodaei
, September 17, 2012 8:45 PM Subject: RE: Converting BIO* to PKCS7* From: owner-openssl-us...@openssl.org On Behalf Of Mohammad Khodaei Sent: Monday, 17 September, 2012 05:01 I've got a problem regarding BIO* to PKCS7* conversion. I want to call PKCS7_decrypt() function to decrypt a cipher text

Convert PKCS7_encrypt output to char*

2012-06-25 Thread Mohammad Khodaei
Hello, I want to encrypt a small data using recipient public key and decrypt it on the receiver side using recipient private key. I chose PKCS7_encrypt and PKCS7_decrypt api to do so. Are they the correct functions? Is there any other alternative? Now my problem is that I want to convert the