Re: Public/Private Key Pair Unique?

2010-07-21 Thread Jakob Bohm
On 20-07-2010 20:40, PS wrote: Let us say I have a certificate and a private key pair (C1, K1) Now, lets say I received a Certificate, C2 on the wire. Now, I want to know whether the pvt-key K1 corresponds to the private key of C2. One method is encrypt a Known random number with pub-key in C2

Providing certificates/keys as a buffer rather than a filename

2010-07-21 Thread Aravind GJ
Hi, In my project, the keys and certificates are not stored as a file, but are present in a buffer. How can I instrcut OpenSSL to read from the buffer rather than a file? SSL_use_PrivateKey_file, SSL_CTX_use_certificate_file needs file name as the input parameter. While functions like

Re: Providing certificates/keys as a buffer rather than a filename

2010-07-21 Thread Bruce Stephens
Aravind GJ aravin...@gmail.com writes: [...] While functions like SSL_use_PrivateKey use EVP_PKEY structure, but to get that structure, I need to use BIO APIs which again takes filename as input. See BIO_new_mem_buf(). (There are other ways to construct EVP_PKEYs without reading from a

Just Encryption Using Openssl

2010-07-21 Thread Harshvir Sidhu
Hi All, I am trying to use encryption over Client/Server machines. My requirement is that i have to use winsock UDP functions to send and receive data. Is there some mechanism to perform key and cipher exchange in this case, like normally SSL_Connect will do this, but in my case i cannot use

Re: Just Encryption Using Openssl

2010-07-21 Thread Ben Jones
Well I implemented something very similar recently but using tcp rather than udp. In my case, alice creates a public-private key pair and sends public key to bob. Bob then encrypts randomly generated symmetric key (.e.g blowish, dsa or aes etc.) with public key and sends the result to alice.

building openssl-fips-1.2 on windows with cygwin fails.

2010-07-21 Thread Bryan
I am trying to build openssl 0.9.8o with the fips-1.2 source. I'm building it using cygwin as the interface, since I am trying to script this into an installation process. The cygwin interface is using Visual Studio 8 to build the source, using the cl.exe. After disabling cygwin's link.exe, I

Re: Just Encryption Using Openssl

2010-07-21 Thread Harshvir Sidhu
Ben: Yes thats what i need to do. If you can provide some example, that will be great. Thanks. // Harshvir On Wed, Jul 21, 2010 at 9:17 AM, Ben Jones b...@bhjones.com wrote: Well I implemented something very similar recently but using tcp rather than udp. In my case, alice creates a

Re: Just Encryption Using Openssl

2010-07-21 Thread Ben Jones
Ok, well assuming you're talking about C++ which is what I'm using, then to create an RSA key pair you do: // alice would do this RSA *rsa = RSA_generate_key(bits, 65537, NULL, NULL); // alice can then get the public part of the key and send to bob const int max_hex_size = (bits / 4) + 1; long

Re: Just Encryption Using Openssl

2010-07-21 Thread Harshvir Sidhu
Thanks Ben, I will try this. // Harshvir On Wed, Jul 21, 2010 at 10:07 AM, Ben Jones b...@bhjones.com wrote: Ok, well assuming you're talking about C++ which is what I'm using, then to create an RSA key pair you do: // alice would do this RSA *rsa = RSA_generate_key(bits, 65537, NULL,

Re: building openssl-fips-1.2 on windows with cygwin fails.

2010-07-21 Thread Jakob Bohm
On 21-07-2010 16:18, Bryan wrote: I am trying to build openssl 0.9.8o with the fips-1.2 source. I'm building it using cygwin as the interface, since I am trying to script this into an installation process. When building with Visual Studio, you are better off using a perl version itself

Re: Just Encryption Using Openssl

2010-07-21 Thread Jakob Bohm
On 21-07-2010 16:02, Harshvir Sidhu wrote: Hi All, I am trying to use encryption over Client/Server machines. My requirement is that i have to use winsock UDP functions to send and receive data. Is there some mechanism to perform key and cipher exchange in this case, like normally

Re: building openssl-fips-1.2 on windows with cygwin fails.

2010-07-21 Thread Bryan
On Wed, Jul 21, 2010 at 10:33, Jakob Bohm jb-open...@wisemo.com wrote: On 21-07-2010 16:18, Bryan wrote: I am trying to build openssl 0.9.8o with the fips-1.2 source.  I'm building it using cygwin as the interface, since I am trying to script this into an installation process. When building

Re: building openssl-fips-1.2 on windows with cygwin fails.

2010-07-21 Thread Jakob Bohm
On 21-07-2010 18:26, Bryan wrote: On Wed, Jul 21, 2010 at 10:33, Jakob Bohmjb-open...@wisemo.com wrote: On 21-07-2010 16:18, Bryan wrote: I am trying to build openssl 0.9.8o with the fips-1.2 source. I'm building it using cygwin as the interface, since I am trying to script this into an

Re: Public/Private Key Pair Unique?

2010-07-21 Thread PS
Well, think of the device as proxy which acts as the client to the server and server to the client. Hence, the proxy is configured with the same public-key and private key as that of the server so that it can act as the server to the clients. But before it starts to do that, I want to make sure

Re: building openssl-fips-1.2 on windows with cygwin fails.

2010-07-21 Thread Bryan
On Wed, Jul 21, 2010 at 13:19, Jakob Bohm jb-open...@wisemo.com wrote: On 21-07-2010 18:26, Bryan wrote: On Wed, Jul 21, 2010 at 10:33, Jakob Bohmjb-open...@wisemo.com  wrote: On 19-07-2010 16:18, Bryan wrote: I am trying to build openssl 0.9.8o with the fips-1.2 source.  I'm building it

Re: Just Encryption Using Openssl

2010-07-21 Thread Harshvir Sidhu
What all features do DTLS support? I am not able to find the information about this on OpenSSL.org I was going thru the headers to check, i think it supports. 1. Packet sequencing. 2. Sure delivery by retransmitting if it didnt get ACK. I guess there should be more, Can someone please pin point

Re: building openssl-fips-1.2 on windows with cygwin fails.

2010-07-21 Thread Dr. Stephen Henson
On Wed, Jul 21, 2010, Bryan wrote: Well, the good thing is I am building this on an XP machine inside a VM, and I created a snapshot before I started all this, so backing out is an option to be able to start over and configure the environment correctly. This might even be what I have to

Re: Public/Private Key Pair Unique?

2010-07-21 Thread aerowolf
A private key has (to the best of our knowledge -- we don't know everything about mathematics) a precise 1 to 1 correspondence with a public key, and a 1 to 1 correspondence from a public key to a private key. But I can't imagine why you'd want to present a different certificate to the client