Key exchange protocols

learn more… | top users | synonyms

194
votes
13answers
18k views

How is it possible that people observing an HTTPS connection being established wouldn't know how to decrypt it?

I've often heard it said that if you're logging in to a website - a bank, GMail, whatever - via HTTPS, that the information you transmit is safe from snooping by 3rd parties. I've always been a little ...
31
votes
3answers
12k views

Is there any particular reason to use Diffie-Hellman over RSA for key exchange?

I often see RSA being recommended as a method of key exchange. However, the Diffie-Hellman key exchange method appears to be secure as well. Is there any considerations one should take into account ...
19
votes
6answers
6k views

“Diffie-Hellman Key Exchange” in plain English

Can someone explain to me what is Diffie-Hellman Key Exchange in plain English? I have read in a non-tech news page that twitter has just implemented this technology which allows two persons to ...
18
votes
1answer
12k views

What key exchange mechanism should be used in TLS?

There are many key exchange mechanisms that can be used in TLS. Among them are RSA, ECDH_ECDSA, ECDHE_ECDSA, ECDH_RSA, ECDHE_RSA and others. Which of these are more cryptographically secure and can be ...
15
votes
9answers
2k views

Are there any systems out there that use a one-time pad?

I'm still new to information security, but I have read a bit about the one-time pad. The point that sticks out to me the most is that it is supposedly unbreakable. Has this method of encryption ever ...
12
votes
2answers
504 views

Is it possible to have a key for encryption, that cannot be used for decryption?

For example, a server might have some encrypted logs or storage or whatnot, that would only be used for reference later. This way even if the server is hacked, everything is still OK until the hacker ...
11
votes
2answers
2k views

Which cipher suites with AES cipher provide forward secrecy?

Does standard AES with RSA (reported by Opera as TLS v1.0 256 bit AES (1024 bit RSA/SHA)) provide perfect forward secrecy? Which SSL3.0 and TLS1.0 ciphers do provide forward secrecy? Which ciphers ...
10
votes
3answers
2k views

How to exchange RSA public keys safely between two parties?

How to exchange RSA public keys safely between two parties via internet?
10
votes
1answer
3k views

Where do I get prime numbers for Diffie-Hellman? Can I use them twice?

I realise it's very hard to generate suitable prime numbers and generators for the Diffie-Hellman key exchange. What is the best way to generate them? And if I have one, can I use it twice? ...
9
votes
2answers
4k views

Is 1024bit Diffie Hellman key exchange secure?

My system uses AES-256, 4096bit RSA CA key and 2048bit RSA keys for servers together with SHA-256 signing. Does using 1024bit DH key exchange lower its security? I read on one mailing list that ...
9
votes
1answer
329 views

Optimal variable sizes in the Secure Remote Password protocol

I am implementing the Secure Remote Password protocol: U = <username> --> <-- s = <salt from passwd file> a = random() A = g^a ...
8
votes
2answers
407 views

Is there a way to negotiate a secret between 2 parties with no prior knowledge?

Is there a way for 2 parties to negotiate a shared secret (for example, a session key) without having a pre-shared knowledge? SSL does this by using asymmetric encryption. Is there any other way to ...
8
votes
3answers
513 views

Which authentication at the end of the Secure Remote Password protocol?

For the the client and server to prove to each other that they have the same premaster shared key, the original author suggests this: M = H(A | B | K) --> <-- H(A | M | K) ...
8
votes
1answer
223 views

distributing files to VPN partners

suppose i've created VPN certificates for a certain VPN-RoadWarrior-Client, expressed in the files VPN-RoadWarrior-Client.key and VPN-RoadWarrior-Client.crt*, however VPN-RoadWarrior-Client is ...
7
votes
3answers
2k views

Is this prime number large enough / too large for a Diffie-Hellman for AES-256?

I'm using a Diffie-Hellman key exchange to encrypt data using AES-256. The prime number I'm using is the one from the 8192bit group specified in RFC 3526 (page 6). Page 7 suggests that, with a 620 ...
7
votes
1answer
726 views

How do i store Diffie-Hellman parameters in a X.509?

In there paper Authentication and authenticated key exchange Diffie, van Oorschot and Wiener recommend to insert the DH parameters into the certificate of Alice. As a result an attacker can not change ...
6
votes
3answers
939 views

Using Secure Remote Password without sending the username in the clear

To initiate a key exchange using the SRP protocol the client sends the username so the server can look up the salt and password verifier. Is there a simple way to change this so that an evesdropper ...
6
votes
1answer
3k views

Ways to sign gpg public key so it is trusted?

I have a service through SSL which gives the user a code for a specific reason. I want to sign the code with the web server's private key (gpg --clearsign) and send the signed code along so that they ...
6
votes
2answers
566 views

Implementing Secure Remote Password: Constructing the verifier

The SRP protocol as described in RFC 2945 generates the password verifier: x = SHA(<salt> | SHA(<username> | ":" | <raw password>))` v = g^x % N I have three questions: why use ...
6
votes
1answer
8k views

How to implement an API-Key-Mechanism

first of all: I am quite unsure about the questions title, so if you have a better idea, please feel free to tell (: I would like to know about best-practise examples where services (like Twitter or ...
5
votes
3answers
342 views

DHE exchange and client authentication

If a server has a known public key and a Diffie-Helman exchange is performed and signed by that key, is there any benefit to authenticating the client before establishing a secure channel instead of ...
5
votes
2answers
688 views

Website: Pre-Shared-Key Authentication

We have this web-application with high valuable (business) data. All communication is encrypted through TLS/SSL. While I consider this a really safe protocol, it can still be compromised if someone ...
5
votes
1answer
366 views

What are the OpenSSL standard Diffie Hellmann parameters (primes)?

I recently generated some custom Diffie Hellmann parameters which are basically just long (in the below case 4096 bit) primes. Those are then used in the key exchange process. I used the following ...
5
votes
2answers
271 views

Authenticating client without hardcoding key?

A basic question, but I'm not a master and this is puzzling me- How is it possible to authenticate a client from the server's perspective? i.e. imagine you're the server, and you want to give the ...
5
votes
1answer
236 views

Using Secure Remote Password without embedding the modulus

The SRP protocol as described by the author assumes that the large safe prime modulus and generator are embedded into the client and server rather than being transmitted as part of the protocol. ...
4
votes
3answers
876 views

In the Diffie-Hellman key exchange, how is the shared base key 'p' known and how are A and B, protected from Eve?

I'm trying to wrap my head around Hellman, Diffie, and Merkle's key exchange design, but after reading the Wiki article about it, I can't figure out how the commonly known factor ('p', I think) comes ...
4
votes
1answer
310 views

Diffie-Hellman key exchange

The following image attempts to explain the diffie-hellman key exchange for people not strong in maths such as myself: I do understand how the colour/paint example illustrates the idea. But I'm a ...
4
votes
1answer
622 views

Are SSH packets encrypted even before new keys are sent?

What format does SSH use to exchange (encrypted / plain) packets before new keys are derived? SSH Document says that after key exchange, client and server use negotiated algorithm to encrypt the ...
4
votes
2answers
241 views

What steps can you take to make offline cracking of SRP harder?

In the aftermath of the Blizzard hack, what steps can I take to make offline cracking of SRP more difficult? My question assumes that your database is already gone and that you implemented SRP more ...
4
votes
3answers
885 views

Diffie Hellman - how large should the random number be?

When using the Diffie Hellman exchange with the second Oakley group 1024 bit Prime per RFC 2409 (*), how large should the random numbers generated by both sides be? In RFC 2631 this is called the ...
4
votes
1answer
359 views

Why was ECMVQ dropped from NSA Suite B?

I've found two mentions on Wikipedia that Elliptic Curve Menezes–Qu–Vanstone (ECMVQ) was dropped from NSA's Suite B however they seem to imply different reasons. One mention is preceded by talk of how ...
4
votes
1answer
149 views

Share or not share public key for servers?

In order to encrypt communications from our (custom) client to our (custom) servers our current scheme is a bit like this: Client uses the bundled public key A to encrypt some random key material. ...
4
votes
2answers
205 views

TLS server key: possible to sign another TLS server key?

If I have a valid (verifiable) certificate C_K_s that links the server key K_s to "www.example.com", is it possible to : use K_s to sign K_d, and let S_K_d be this signature use K_d as the TLS ...
4
votes
2answers
346 views

What is the difference between DHE and ECDH?

I learned that perfect forward secrecy is implemented through DHE and ECDH but what is the difference between these 2 key exchanges? Also can someone explain how perfect forward secrecy works? I've ...
4
votes
1answer
701 views

How to secure API (private key) for mobile apps

I am building a web service that has to be only accessible for iOS apps. In the future I want to expand to a mobile website to make my service also available for other mobile operating systems. Now, ...
3
votes
7answers
256 views

How would I give an encryption key to only one person?

Let's say I have an encrypted message. I want to make it so that someone is able to decrypt it. The only way of giving it to them is online. For the purposes of this question, I can't call, mail or ...
3
votes
2answers
4k views

Diffie Hellman c# implementation

Hallo all, For a test project I have tried to implement the (famous) Diffie Hellman algorithm for safe key exchange. Now I have written this in C#: using System; using System.Collections; using ...
3
votes
3answers
240 views

Does the hash change the security of the Secure Remote Password protocol?

I'm implementing the Secure Remote Password protocol, and similar to this question, I'm wondering if I can use the SHA-512 hash function instead of SHA-1 currently being used. Would this help improve ...
3
votes
1answer
568 views

ECDH and Forward Secrecy

I just read about ECDH and while getting a overview over the process, I noticed that this key exchange method does neither provide any forward secrecy, nor does it protect against replay-attacks, ...
3
votes
1answer
187 views

Why should an IKE responder change the cookie secret 'frequently'?

IKEv2 has the concept of a COOKIE mode, to attempt to prevent state exhaustion from floods of initiation requests from non-existent IP addresses: Two expected attacks against IKE are state and CPU ...
3
votes
1answer
109 views

Can we build a key exchange protocol without certificates?

Assume that the server and the client both has some secret key K. Is it possible to have a key exchange protocol with authentication between them such that MITM attack cannot hold and if the key is ...
3
votes
1answer
32 views

Transferring of keys from key servers to recipients

When I download PGP keys from keyservers like so: gpg --search-keys steve@openssl.org How are the public keys transferred down to my machine? Is there a possibility of a MITM attack to serve me the ...
3
votes
4answers
355 views

Would a predefined shared secret key be good here

I'm a software developer working with hardware devices that are deployed on the field. Every now and then, I would need to update the hardware's firmware (upgrades, patches, etc) I'm thinking of now, ...
3
votes
1answer
90 views

Differing scrambling parameter generation methods in Secure Remote Protocol

RFC 2945 (The SRP Authentication and Key Exchange System) states, The parameter u is a 32-bit unsigned integer which takes its value from the first 32 bits of the SHA1 hash of B, MSB first. ...
3
votes
1answer
220 views

Encryption key exchange for Tor

I've been studying how Tor works - including the great QA "Why can a Tor exit node decrypt data, but not the entry node?". I understand the concept of onion routing and multiple layers of ...
2
votes
2answers
402 views

Which is better for SSL: TLS_EDH or TLS_SRP?

DH is vulnerable to a man-in-middle attack due to no server authentication; and RSA does not have forward secrecy. People suggest used Ephemeral DH but what are the differences between Ephemeral DH ...
2
votes
3answers
180 views

Given a large enough sampling of public keys could one begin to identify a private key?

For example, an ISP or government capable of tracking millions of keys being exchanged. Would that provide a sample large enough to be able to identify the private key on either end?
2
votes
2answers
328 views

Why should the dh keylength match rsa length in tls?

A few sources state that the DH keylength (bits of the prime) should match the keylength of rsa for TLS. For example SSL_set_tmp_dh(3) from openssl has example code on how to match the dh parameters ...
2
votes
1answer
228 views

Any obvious flaws in this protocol?

Are there any particular flaws in this protocol? (Yes I know about SSL) Three participants: Login Server LS Game Server GS Client C Asymmetric key-pair Kpriv Kpub Shared 128bit secret key Ksec ...
2
votes
1answer
164 views

Inner Workings of Public Key Encryption

After watching this video explaining PKE with tennis balls (interesting), it left me with a few particular questions that I'm having trouble finding answers to: I assume that they keys used to ...