Re: Diffie-Hellman X509EncodedKeySpec

2013-04-09 Thread azhar jodatti
May we get the code.both java and c Regards, Azhar Hello, It would be very great if my problem could be solved here. In C I have to make a Diffie-Hellman Key Exchange and the problem is that the corresponding Java Server expects a ASN.1 DER encoded SubjectPublicKeyInfo, the same thing that Jav

Re: Diffie algorithm in openssl: and Java

2013-03-25 Thread azhar jodatti
t;From: owner-openssl-us...@openssl.org On Behalf Of azhar jodatti > > >Sent: Wednesday, 20 March, 2013 15:21 > > > >this.secretKey is an object of javax.crypto.SecretKey which > > >I am using for symmetric encryption like this > > >byte[] utf8 = plaintext.ge

Re: Diffie algorithm in openssl: and Java

2013-03-20 Thread azhar jodatti
On Wed, Mar 20, 2013 at 5:12 PM, Matt Caswell wrote: > On 20 March 2013 11:25, azhar jodatti wrote: > > byte[] bobPubKeyEnc = bobKpair.getPublic().getEncoded(); > > This is providing an encoded form of the public key, whereas your code > is expecting it as an integer. Use the

Re: Diffie algorithm in openssl: and Java

2013-03-20 Thread azhar jodatti
On Wed, Mar 20, 2013 at 3:44 PM, Matt Caswell wrote: > On 20 March 2013 07:37, azhar jodatti wrote: > >>

Re: Diffie algorithm in openssl: and Java

2013-03-20 Thread azhar jodatti
On Tue, Mar 19, 2013 at 8:13 PM, Matt Caswell wrote: > On 19 March 2013 14:18, azhar jodatti wrote: > > On Tue, Mar 19, 2013 at 6:24 PM, Matt Caswell wrote: > >> On 19 March 2013 12:22, azhar jodatti wrote: > >> >PEM_write_bio_DHparams(out, tem

Re: Diffie algorithm in openssl: and Java

2013-03-19 Thread azhar jodatti
On Tue, Mar 19, 2013 at 6:24 PM, Matt Caswell wrote: > On 19 March 2013 12:22, azhar jodatti wrote: > >PEM_write_bio_DHparams(out, temp);//this prints public key in > base64 > > (this is what i think :) ) > > This is NOT a base64 representation of the public key

Re: Diffie algorithm in openssl: and Java

2013-03-19 Thread azhar jodatti
c final BigInteger skip1024Modulus = new BigInteger( "1068240777462827944522286470258392298080748393397603711030631554024648426149626762282552943254590537746135068912070568184417208487742984828669181742713283573640288436384513244156913300566384827813443073959759486649717320942939961894675991044429895630

Re: Diffie algorithm in openssl: and Java

2013-03-19 Thread azhar jodatti
On Tue, Mar 19, 2013 at 2:58 PM, Matt Caswell wrote: > On 19 March 2013 09:01, azhar jodatti wrote: > > > And possibly relevant here, the standard Suncle JCE provider actually > > uses DSA paramgen for DH and thus imposes the DSA size restrictions > > on DH -- 51

Re: Diffie algorithm in openssl: and Java

2013-03-19 Thread azhar jodatti
​<-- And possibly relevant here, the standard Suncle JCE provider actually uses DSA paramgen for DH and thus imposes the DSA size restrictions on DH -- 512 to 1024 in steps of 64 -- although they aren't required by any standard I know of. I don't recall if JCE also restricts *existing* (received)

Fwd: Diffie algorithm in openssl: and Java

2013-03-18 Thread azhar jodatti
On 18 March 2013 12:15, azhar jodatti wrote: > 2) Is this sample from the *same* key exchange? The parameters are > different which are obviously going to cause it to fail. > When I run both programs it calculates the params (p,g,pk) every time on > execution . that's the reaso

Re: Diffie algorithm in openssl: and Java

2013-03-18 Thread azhar jodatti
umbers at client and server? how about public key? ​ Regards, Azhar On Mon, Mar 18, 2013 at 3:22 PM, Matt Caswell wrote: > > > On 18 March 2013 06:26, azhar jodatti wrote: > >> >> >> Thanks matt for looking at this. below are the details >

Re: Diffie algorithm in openssl: and Java

2013-03-17 Thread azhar jodatti
10412421382256896232908714139611606796633319949985382724877107919957408909942743414340389890006834786464852247662337830546584844189278383274479199021252090407963572739286575933788241737975537671923484277171204499262529715278092506505239752566691287452373502190399117732855968397767896906732126573639005461407592315315318920060328019073971670048355762952267750188451524151795498747866082848788789357672209810743252483" } Kindly let me know if you need anything else. even I can share my implementation (both Java and C) ​ R

Re: Diffie algorithm in openssl: and Java

2013-03-16 Thread azhar jodatti
gards, ​Azhar​ On Sun, Mar 17, 2013 at 3:27 AM, Matt Caswell < ​​ fr...@baggins.org> wrote: > > > On 16 March 2013 18:00, azhar jodatti wrote: > >> >> >> Thompson, >> >> Really thanks for the reply. appreciate your time. >> >>

Re: Diffie algorithm in openssl: and Java

2013-03-16 Thread azhar jodatti
ient secret key wont' match. Even I not sure whether I am doing it correctly in C. Please suggest or let me know if you need more information. Regards, Azhar On Sat, Mar 16, 2013 at 5:50 AM, Dave Thompson wrote: > >From: owner-openssl-us...@openssl.org On Behalf Of azhar jodatti &

Re: Diffie algorithm in openssl

2013-03-14 Thread azhar jodatti
I am not sure whether this mail even reached to the openssl-users Regards, Azhar On Thu, Mar 14, 2013 at 11:01 AM, azhar jodatti wrote: > Is this the right place to ask ? Please suggest > -- Forwarded message -- > From: "azhar jodatti" > Date: Mar 13, 2

Fwd: Diffie algorithm in openssl

2013-03-13 Thread azhar jodatti
Is this the right place to ask ? Please suggest -- Forwarded message -- From: "azhar jodatti" Date: Mar 13, 2013 11:14 PM Subject: Diffie algorithm in openssl To: Cc: I am very much new to openssl and trying to explore... I was trying to implement the diffie Hellman