RE: EVP and Elliptic curve

2013-03-22 Thread Leon Brits
-dev@openssl.org Subject: Re: EVP and Elliptic curve Hi Leon On 21 March 2013 17:27, Matt Caswell fr...@baggins.org wrote: On 20 March 2013 07:14, Leon Brits le...@parsec.co.za wrote: Hi Matt, I use: $ openssl version OpenSSL 1.0.1e-fips 11 Feb 2013 I was able to successfully

RE: EVP and Elliptic curve

2013-03-21 Thread Leon Brits
is appreciated Leon Brits -Original Message- From: owner-openssl-...@openssl.org [mailto:owner-openssl-...@openssl.org] On Behalf Of Matt Caswell Sent: 20 March 2013 11:11 PM To: openssl-dev@openssl.org Subject: Re: EVP and Elliptic curve On 20 March 2013 07:14, Leon Brits le...@parsec.co.za

Re: EVP and Elliptic curve

2013-03-21 Thread Matt Caswell
On 21 March 2013 09:06, Leon Brits le...@parsec.co.za wrote: First off the private key created with the sect233r1 curve are: -BEGIN PRIVATE KEY- MHYCAQAwCQYHKoZIzj0CAQRmMGQCAQEEHVnVyx1BHVTaKFSi758nc0v1SnWNQ1aR BYRjL4ZboUADPgAEAVZmnrloR8NnuKI7pzD8n8UYXHannulPUv2JVqeiAXI1bnBR

Re: EVP and Elliptic curve

2013-03-21 Thread Dr. Stephen Henson
On Thu, Mar 21, 2013, Leon Brits wrote: Stephen, Just to clarify that a bit. EC keys are most comonly represented by named curves instead of explicit parameters. Unfortunately the default is to use explicit parameters and there's nothing (yet!) at an EVP_PKEY level to change that.

Re: EVP and Elliptic curve

2013-03-21 Thread Matt Caswell
On 20 March 2013 07:14, Leon Brits le...@parsec.co.za wrote: Hi Matt, I use: $ openssl version OpenSSL 1.0.1e-fips 11 Feb 2013 I was able to successfully parse your attached private key. I've attached my smallest prime, binary and kolbitz curve key pairs. As I said the prime curve parses

Re: EVP and Elliptic curve

2013-03-21 Thread Matt Caswell
Hi Leon On 21 March 2013 17:27, Matt Caswell fr...@baggins.org wrote: On 20 March 2013 07:14, Leon Brits le...@parsec.co.za wrote: Hi Matt, I use: $ openssl version OpenSSL 1.0.1e-fips 11 Feb 2013 I was able to successfully parse your attached private key. I've attached my smallest

RE: EVP and Elliptic curve

2013-03-20 Thread Leon Brits
curve keys. Regards, Leon Brits -Original Message- From: owner-openssl-...@openssl.org [mailto:owner-openssl-...@openssl.org] On Behalf Of Matt Caswell Sent: 19 March 2013 11:48 PM To: openssl-dev@openssl.org Subject: Re: EVP and Elliptic curve On 19 March 2013 10:22, Leon Brits le

RE: EVP and Elliptic curve

2013-03-20 Thread Leon Brits
Hi Matt, Can you send me an offending PEM file? I've replied with this information attached to your second message They are different formats. If it has BEGIN PRIVATE KEY it is in PKCS 8 format. See: https://www.openssl.org/docs/apps/pkcs8.html If it says BEGIN EC PRIVATE KEY then its as

RE: EVP and Elliptic curve

2013-03-20 Thread Leon Brits
and Elliptic curve Hi Matt, Can you send me an offending PEM file? I've replied with this information attached to your second message They are different formats. If it has BEGIN PRIVATE KEY it is in PKCS 8 format. See: https://www.openssl.org/docs/apps/pkcs8.html If it says BEGIN

Re: EVP and Elliptic curve

2013-03-20 Thread Matt Caswell
On 20 March 2013 10:36, Leon Brits le...@parsec.co.za wrote: List, I've continued so long to use the NIST prime curves to implement sign/verify using EVP. I am basically using the same code as for RSA and DSA. This mechanism is so transparent (nice!) that I just want to verify that it is

Re: EVP and Elliptic curve

2013-03-20 Thread Dr. Stephen Henson
On Wed, Mar 20, 2013, Leon Brits wrote: List, I've continued so long to use the NIST prime curves to implement sign/verify using EVP. I am basically using the same code as for RSA and DSA. This mechanism is so transparent (nice!) that I just want to verify that it is using ECDSA at the

Re: EVP and Elliptic curve

2013-03-20 Thread Dr. Stephen Henson
On Fri, Mar 15, 2013, Dr. Stephen Henson wrote: The only real quirk is that when you generate a key the named curve ASN1 option isn't set by default for keys and can't be set by a ctrl. You can extract the key and set that manually though. Just to clarify that a bit. EC keys are most

Re: EVP and Elliptic curve

2013-03-20 Thread Matt Caswell
On 20 March 2013 07:14, Leon Brits le...@parsec.co.za wrote: Hi Matt, I use: $ openssl version OpenSSL 1.0.1e-fips 11 Feb 2013 I was able to successfully parse your attached private key. I've attached my smallest prime, binary and kolbitz curve key pairs. As I said the prime curve parses

Re: EVP and Elliptic curve

2013-03-20 Thread Matt Caswell
On 20 March 2013 07:27, Leon Brits le...@parsec.co.za wrote: Thanks for that explanation - so, just to understand the history, why is there no secp256_r1 as well as the ANSI standard curve. In other words, why does the ANSI curve replace it instead of being an additional curve? I have no

Re: EVP and Elliptic curve

2013-03-20 Thread Douglas E. Engert
On 3/20/2013 4:24 PM, Matt Caswell wrote: On 20 March 2013 07:27, Leon Brits le...@parsec.co.za wrote: Thanks for that explanation - so, just to understand the history, why is there no secp256_r1 as well as the ANSI standard curve. In other words, why does the ANSI curve replace it instead

Re: EVP and Elliptic curve

2013-03-20 Thread Matt Caswell
On 20 March 2013 21:11, Matt Caswell fr...@baggins.org wrote: On 20 March 2013 07:14, Leon Brits le...@parsec.co.za wrote: Hi Matt, I use: $ openssl version OpenSSL 1.0.1e-fips 11 Feb 2013 I was able to successfully parse your attached private key. I've attached my smallest prime, binary

RE: EVP and Elliptic curve

2013-03-19 Thread Leon Brits
Of Matt Caswell Sent: 15 March 2013 02:05 AM To: openssl-dev@openssl.org Subject: Re: EVP and Elliptic curve On Thu, Mar 14, 2013, Leon Brits wrote: Hi List, I just want to verify: Elliptic curve functions are not encapsulated by the EVP functions - correct? If so, what

Re: EVP and Elliptic curve

2013-03-19 Thread Matt Caswell
On 19 March 2013 10:22, Leon Brits le...@parsec.co.za wrote: Matt / List, Thanks for the example. It sure helped a lot. But I am still stuck at the EC key generation. I’ve created keys for NIST Prime curves (224-571bit), Binary and Kolbits curves (233-571 bit). I then convert the keys

Re: EVP and Elliptic curve

2013-03-19 Thread Matt Caswell
On 19 March 2013 10:22, Leon Brits le...@parsec.co.za wrote: I’ve created keys for NIST Prime curves (224-571bit), Binary and Kolbits curves (233-571 bit). I then convert the keys to PEM using the same method which I used successfully for RSA and DSA which only calls PEM_write_bio_PrivateKey()

EVP and Elliptic curve

2013-03-14 Thread Leon Brits
Hi List, I just want to verify: Elliptic curve functions are not encapsulated by the EVP functions - correct? If so, what is the EVP_PKEY_CTX_set_ec_paramgen_curve_nid function then used for? If NOT so, then please help with an example since I could only find the normal EC_{KEY,GROUP}* type of

Re: EVP and Elliptic curve

2013-03-14 Thread Dr. Stephen Henson
On Thu, Mar 14, 2013, Leon Brits wrote: Hi List, I just want to verify: Elliptic curve functions are not encapsulated by the EVP functions - correct? If so, what is the EVP_PKEY_CTX_set_ec_paramgen_curve_nid function then used for? If NOT so, then please help with an example since I

Re: EVP and Elliptic curve

2013-03-14 Thread Matt Caswell
On Thu, Mar 14, 2013, Leon Brits wrote: Hi List, I just want to verify: Elliptic curve functions are not encapsulated by the EVP functions - correct? If so, what is the EVP_PKEY_CTX_set_ec_paramgen_curve_nid function then used for? If NOT so, then please help with an example