diffiehellman

I have P & G-- how do I use the Wincrypt API to generate a Diffie-Hellman keypair?

There's an MSDN article here, but I'm not getting very far: p = 139; g = 5; CRYPT_DATA_BLOB pblob; pblob.cbData = sizeof( ULONG ); pblob.pbData = ( LPBYTE ) &p; CRYPT_DATA_BLOB gblob; gblob.cbData = sizeof( ULONG ); gblob.pbData = ( LPBYTE ) &g; HCRYPTKEY hKey; if ( ::CryptGenKey( m_hCryptoProvider, CALG_DH_SF, CR...

I'm using Wincrypt for Diffie-Hellman-- can I export the shared secret in plain text?

OK-- thanks to Mike, I was able to get Wincrypt to generate a Diffie-Hellman keypair. I figured out out to export the public key, and how to import the other party's public key. According to the docs, upon import of the other party's public key, the shared secret has been computed. Great. I now need to get ahold of that shared secret...

Diffie-Hellman in place of SSL?

Can a Diffie-Hellman key exchange algorithm be used to encrypt client-server communication on a web-page in place of SSL? If it can, what are the disadvantages (i.e. why does the standard use SSL which requires a certificate authority)? My understanding is that Diffie-Hellman can be used to secretly establish a shared key which then ca...

IPSec is hard to figure out, wanna help?

Hi, i need to fully understand the IPSec Phase 1 negotiation. now, I break this to 3 steps: 1) Algorithm negotiations. 2) Key Exchange Data 3) Identification I'm using wireshark to invastigate the process and so far I fully understands the 1st part (Algorithm Negotiations). My current problem lies in the 2 nd part: Key Exchange Data. T...

Selection of parameters in Diffie-Hellman

Hello, maybe it's not so proper to ask this question here... anyway, I'm trying to use the gmp library for the implementation of DH, but the problem here I got is: Once, when I was doing the tests to observe the output, although big values of prime and the private keys were selected: p was about more than 300 digits long in decimal a...

DH Keypair generation time on Android

This is the code that I'm using to generate a DH keypair: KeyPairGenerator keyGen = KeyPairGenerator.getInstance("DH"); keyGen.initialize(1024, new SecureRandom()); KeyPair ackp = keyGen.generateKeyPair(); (without the needed try/catch, of course). I've done some tests running such code iteratively and varying the key size (in partic...

Diffie-Hellman in Silverlight

I am trying to devise a security scheme for encrypting the application level data between a silverlight client, and a php webservice that I created. Since I am dealing with a public website the information I am pulling from the service is public, but the information I'm submitting to the webservice is not public. There is also a back end...

RSA encrypted Diffie-Hellman handshake

Would a RSA encrypted Diffie-Hellman handshake enable secure communication? I'm encrypting communication from a silverlight client to a php webservice. The silverlight client initiates they key agreement by sending the RSA public key encrypted DH parameters to the webservice. Only the webservice has the private key, so a MITM attack is n...

How To Generate Parameter Set for the Diffie-Hellman Key Agreement Algorithm in Android

Hello everyone, I am working on mobile/server security related project. I am now stuck in generating a Diffie-Hellman key agreement part. It works fine in server side program but it is not working in mobile side. Thus, I assume that it is not compactible with Android. I used the following class to get the parameters. It returns a comma...

diffie-hellman ssh keyxchange

Hi, I've set out to make a primitive SSH client in C#; you might remember me from posts such as http://stackoverflow.com/questions/2872279/c-primitive-ssh-connection-lowlevel hehe. Anyway, things are great up until the time when I initiate a DH key exchange. I've compared the traffic when I establish a ssh connection (from openssh clie...

ColdFusion 8 Diffie-Helman Encryption

I am integrating with a 3rd party that requires I use the Diffie-Hellman encryption algorithm. The CF docs indicate that this is a supported algorithm. When I attempt to call Encrypt() with either "Diffie-Helman" or "DH" I get the error message: "The Diffie-Hellman algorithm is not supported by the Security Provider you have chosen." I...

Choosing a encryption key from Diffie-Hellman output

I implemented Diffie–Hellman key exchange in Java with some large groups from RFC 3526. My output is a fairly large array of bytes. Is it safe to use the first 448 bits (56 bytes) of the output for a blowfish key? Should I transform the bytes in any way, or pick any specific bytes for the key? ...

how to generate ValueLink merchant working keys

I am trying to generate ValueLink merchant working keys using a modified version of the apache ofbiz ValueLinkApi Class - src I've modified it only to the extent of making it a standalone class that I can run from outside the context of the ofbiz framework. My program runs without error but my keys are not being accepted by the api. H...