RE: Can't get RSA object from .pem file after base64 decoding it

2010-07-12 Thread Dave Thompson
> From: owner-openssl-us...@openssl.org On Behalf Of Carlos Saldaña > Sent: Monday, 12 July, 2010 10:50 > Here's another approach for the same porpuse and it seems to work!, > can you please help me to optimize my implementation? Do you mean 'optimize' as just 'make better', o

Re: Can't get RSA object from .pem file after base64 decoding it

2010-07-12 Thread Ger Hobbelt
2010/7/12 Carlos Saldaña > unsigned char encrypted[2560] = { 0 }; > int resultEncrypt = 0; > > resultEncrypt = RSA_public_encrypt ( strlen(text) + 1 , (unsigned char > *)text, encrypted, rsa_rpu, RSA_PKCS1_OAEP_PADDING ); > NSLog(@"%d from encrypt.", resultEncrypt); > //This line prin

Re: encrypting long strings

2010-07-12 Thread Jakob Bohm
On 12-07-2010 16:54, Victor Duchovni wrote: On Mon, Jul 12, 2010 at 04:16:13PM +0200, Jakob Bohm wrote: On 10-07-2010 20:13, Jeffrey Walton wrote: The general approach is to encrypt data using a symmetric cipher (e.g., AES-256) with a randomly-generated key, and then encrypt that symmetric key

Re: RSA_generate_key_ex documentation

2010-07-12 Thread Ger Hobbelt
On Mon, Jul 12, 2010 at 3:29 PM, Ian Pilcher wrote: > > the whole shebang bundled in a 7z for minimum transfer size. > > That's what I needed. (It did take me a while to figure out how to deal > with a "7z" file.) > Sorry, been spreading 7zip through my environment for so long I sometimes forge

Openssl changes 19759-19762 (AES_wrap_key)

2010-07-12 Thread Victor Duchovni
In changes: http://cvs.openssl.org/chngview?cn=19759 http://cvs.openssl.org/chngview?cn=19760 http://cvs.openssl.org/chngview?cn=19761 http://cvs.openssl.org/chngview?cn=19762 a bug is fixed in AES_wrap_key(), but the same bug remains unchanged in AES_unwrap_key. What is the imp

Re: encrypting long strings

2010-07-12 Thread Victor Duchovni
On Mon, Jul 12, 2010 at 04:16:13PM +0200, Jakob Bohm wrote: > On 10-07-2010 20:13, Jeffrey Walton wrote: >>> The general approach is to encrypt data using a symmetric cipher (e.g., >>> AES-256) with a randomly-generated key, and then encrypt that symmetric >>> key >>> with the RSA (public) key. >

Re: Can't get RSA object from .pem file after base64 decoding it

2010-07-12 Thread Carlos Saldaña
Here's another approach for the same porpuse and it seems to work!, can you please help me to optimize my implementation? Thanks in advance. void encryptThis () { FILE *fp; RSA *rsa_rpu=NULL; fp = fopen([[[NSBundle mainBundle] pathForResource:@"publickey" ofType:@ "pem"]UTF8String],"r"); rsa_rpu

Re: encrypting long strings

2010-07-12 Thread Jakob Bohm
On 10-07-2010 20:13, Jeffrey Walton wrote: The general approach is to encrypt data using a symmetric cipher (e.g., AES-256) with a randomly-generated key, and then encrypt that symmetric key with the RSA (public) key. AES-256 requires a RSA modulus with an equivalent strength, which is a 15360 (

Re: temp buffer used with ssl_write

2010-07-12 Thread Darryl Miles
Amit Ben Shahar wrote: Does anyone know if a buffer passed to ssl_write (or any other method) must remain valid (i.e not freed) for any period. for example, if i have this code: // allocate buffer char* tmpBuff = (char*)malloc(1024); // .. some code to put data in buff // write b

Re: RSA_generate_key_ex documentation

2010-07-12 Thread Ian Pilcher
On 07/11/2010 08:58 PM, Ger Hobbelt wrote: > The new API is called RSA_generate_key_ex() and has a different interface. That much I know. The problem is finding the documentation for the new interface. > the whole shebang bundled in a 7z for minimum transfer size. That's what I needed. (It did

Re: RPMBuild for FIPS OpenSSL

2010-07-12 Thread Steffen DETTMER
* Mark Parr wrote on Thu, Jul 08, 2010 at 13:42 -0500: > I then loaded the openssl-fips-1.2.tar.gz file into a different > directory and attempted to create a RPM install for it as well but > have hit some issues. First off, rpmbuild complained that it could > not find the openssl-0.9.8f.tar.gz fi

Fwd: RootCA and 2 subCA's problem? --needs help

2010-07-12 Thread depinder singh deol
Hi team, I am unable to establish peer authentication between the 2 users(user1 and user2) using x509 certificates.It shows up an error "failed to get public key".Somebody please help me to resolve this issue. I am creating a root CA and 2 sub CA. Each sub CA is issuing certificates to its us

RootCA and 2 subCA's problem? --needs help

2010-07-12 Thread depinder singh deol
Hi team, I am unable to establish peer authentication between the 2 users(user1 and user2) using x509 certificates.It shows up an error "failed to get public key".Somebody please help me to resolve this issue. I am creating a root CA and 2 sub CA. Each sub CA is issuing certificates to its user