Support for AES-XTS in openssl 1.0.1

2012-04-06 Thread pkumarn
Hi, I am asked to explore AES-XTS for one of the task. When i was going though Openssl 1.0.1, i found the below EVP interface EVP_aes_256_xts() but looks like it needs FIPS mode . Apart from this, i also found other API but to me they could only support 128 bits. My requirement is 512 bit key (A

Re: Hitting seg fault in AES_wrap_key() when Key is 512 bits in length

2012-04-05 Thread pkumarn
Can anyone please help me on this? This is really blocking me to proceed further -Prashanth pkumarn wrote: > > Hi, > > I had earlier posted query on AES_Keywrap() usage and had good response on > the same and got lot of things clarified. Now i am successful in using > AES_

Hitting seg fault in AES_wrap_key() when Key is 512 bits in length

2012-04-04 Thread pkumarn
Hi, I had earlier posted query on AES_Keywrap() usage and had good response on the same and got lot of things clarified. Now i am successful in using AES_wrap_key() API but i am running into a new problem. I need to wrap 512bit key with 256 bit KEK key. When i do this, i am hitting seg fault in A

How to do encryption using AES in Openssl

2012-03-27 Thread pkumarn
I am trying to write a sample program to do AES encryption using Openssl. I tried going through Openssl documentation( it's a pain), could not figure out much. I went through the code and found the API's using which i wrote a small program as below (please omit the line numbers). I don't see any e

RE: How to use AES_wrap_key() in openssl

2012-03-25 Thread pkumarn
Hi Dave, I was going through the RFC of AES and it does say we get the IV upon unwrapping . Check the below link http://www.ietf.org/rfc/rfc3394.txt -Prashanth pkumarn wrote: > > Let me go to my white board and see what best i can choose. Issue is we > don't want to sore any

RE: How to use AES_wrap_key() in openssl

2012-03-23 Thread pkumarn
Let me go to my white board and see what best i can choose. Issue is we don't want to sore any keys as it is, so is the reason to choose key wrapping. pkumarn wrote: > > One more thanks from side for replying to this query.,.. my comments > inline... > > > So are y

RE: How to use PKCS5_PBKDF2_HMAC_SHA1()

2012-03-23 Thread pkumarn
Let me go back to my white board and think what approach would be good. Even if i store HASH message my client doesn't want any keys or hash messages stored in flash be the way it is and so is the reason we wanted to even encrypt the DEK using key wrap... pkumarn wrote: > > Firstly

RE: How to use AES_wrap_key() in openssl

2012-03-21 Thread pkumarn
decryted key it is the right key. Or is it like AES_unwrap() will fail on decryption? Not clear on this part... Dave Thompson-5 wrote: > >> From: owner-openssl-us...@openssl.org On Behalf Of pkumarn >> Sent: Monday, 19 March, 2012 09:17 > >> I have a requirement of wrappin

RE: How to use PKCS5_PBKDF2_HMAC_SHA1()

2012-03-20 Thread pkumarn
openssl.org On Behalf Of pkumarn >> Sent: Tuesday, 20 March, 2012 00:36 > >> Thanks a lot Dave for pointing out few things which i need to >> take care. By >> the way as this is not complete code, original code already >> has taken care >> of few things. >

RE: How to use PKCS5_PBKDF2_HMAC_SHA1()

2012-03-19 Thread pkumarn
? When i input RAND_bytes() data into PKCS5_PBKDF2_HMAC_SHA1(), i get a different result but when the same is converted to ASCII (human readable format), i get a different result. ... Any thoughts on this? Dave Thompson-5 wrote: > >> From: owner-openssl-us...@openssl.org On Behalf O

How to use AES_wrap_key() in openssl

2012-03-19 Thread pkumarn
Hi, I have a requirement of wrapping a 512-bit DEK witk 256 bit KEK. I picked up openssl API and figured out that it provides AES_wrap_key() to do the job. I wrote a small program (snippet below) to get the job done but when i check out the values in "dek", i see all values as zero. Not sure what

How to use PKCS5_PBKDF2_HMAC_SHA1()

2012-03-19 Thread pkumarn
Hi, I am trying to use PKCS5_PBKDF2_HMAC_SHA1() and below is my sample program. I wanted to make sure if my result of PKCS5_PBKDF2_HMAC_SHA1() is correct so i verified the same with the below wesbite http://anandam.name/pbkdf2/ and i see a different result... Am i using the API correctly? I am ha

RE: Need help on using RAND_bytes()

2012-03-15 Thread pkumarn
is is what i am not able to figure out... -Prashanth Dave Thompson-5 wrote: > >> From: owner-openssl-us...@openssl.org On Behalf Of pkumarn >> Sent: Thursday, 15 March, 2012 14:18 >> To: openssl-users@openssl.org >> Subject: Need help on using RAND_bytes() > &

Need help on using RAND_bytes()

2012-03-15 Thread pkumarn
Hi, I am using RAND_bytes() to generate 32 byte random number (code snippet below). From here what i see if when access alt_value[0] it gives me "b2". So basically these array has got 64 bytes. unsigned char salt_value[33]; RAND_bytes(salt_value, 32); sample o/p: b2ee922055a3adc17fdd5980db39a

RE: Need help on using AES_wrap_key() function

2012-03-15 Thread pkumarn
Thanks Dave for clarifying this... was pulled into something else so couldn't reply back ... Dave Thompson-5 wrote: > >> From: owner-openssl-us...@openssl.org On Behalf Of pkumarn >> Sent: Monday, 05 March, 2012 23:35 >> To: openssl-users@openssl.org >> Subject:

Need help on using AES_wrap_key() function

2012-03-06 Thread pkumarn
Hi, I am using openssl for encryption in my project and currently i am stuck with few issues... 1. As i understand AES_wrap_key(), first argument AES_KEY *key is the key which needs to be wrapped and *in is the wrapping key. Correct me if i am wrong. int AES_wrap_key(AES_KEY *key, const unsigne