Questions tagged [key-exchange]

For questions relating to protocols for distributing public keys, and / or establishing session keys with another party. Examples of key exchange protocols include Diffie-Hellman and IKE.

Filter by
Sorted by
Tagged with
6
votes
2answers
513 views

Public key for SSH over the internet differs from a key for SSH over the LAN

I have a Raspberry Pi and can access it via SSH (authentication via user password) when my laptop is in the same network. Now I want to access it over the internet. I already set my router to forward ...
6
votes
2answers
2k views

What are the performance differences (for client and server) between DHE and ECDHE in TLS?

My question is about the client and server performance for (EC)DHE. I am having difficulties in understanding this picture (which is based on numbers from Ivan Ristic' book "Bulletproof SSL and TLS"). ...
5
votes
2answers
10k 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 ...
5
votes
3answers
2k 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 ...
5
votes
1answer
1k 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 ...
5
votes
1answer
1k 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 ...
5
votes
3answers
525 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
4answers
8k views

Can we trust onetimesecret?

Alice: I need the file Bob: Sure, and I want to encrypt it first. Please put the strong PGP symmetric key with the copy&paste method to https://onetimesecret.com/ and send me the link. Alice. ...
5
votes
2answers
121 views

Using plain-text phrases as public/private pair?

I'm working on an application that'll be used by relatively non tech-savvy users, and while the machines will have internet access, the app can't have any sort of hosted intermediary. The app allows ...
5
votes
1answer
772 views

Is OpenSSL generating Diffie-Hellman parameters that are safe for use in TLS or SSH servers?

I would like to generate Diffie-Hellman parameters on a Debian GNU/Linux "Jessie" 8 with OpenSSL. Lets assume the system CSPRNG was seeded with some real random data. On such a system, is the result ...
5
votes
0answers
528 views

How rf remotes for “cloning” rolling code find matching codes?

I've been tinkering with a rf (garage door) remote control that has a scanner mode (google JMA SR-48 for details). This mode works for Mutancode and Erreka which I assume would be similar to KeeLoq. ...
4
votes
1answer
2k 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 bit ...
4
votes
2answers
599 views

Is a certificate with more bits than its parent more secure?

Let's Encrypt currently issues 4096 bit RSA certificates if requested (default, however, is 2048). But its parents, intermediate "Let's Encrypt Authority X3" and root "DST Root CA X3", are both 2048 ...
4
votes
1answer
3k views

Is the Station-to-Station protocol secure?

After I've read a lot about key exchange many sources state that the Station-to-Station is secure, since it also verifies the entity on the other side. Well how is that true, if an active Man in the ...
4
votes
1answer
272 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
3k views

How to treat/hash ECDH shared secret to use as keys for AES?

I'm doing some studies/development for a security system that would use ECDH with ephemeral keys. In my code I'm currently using a 256-bit EC, so when the two parts compute the shared secret, I get a ...
4
votes
1answer
438 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 ...
4
votes
1answer
2k 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 ...
4
votes
3answers
2k 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
3answers
314 views

ssl - Can the attacker generate his own symmetric key if ClientHello and ServerHello are intercepted?

After reading this awesome explanation of how SSL works, I now have a confusion. The answer states that the first messages of SSL are ClientHello and ServerHello(in response to ClientHello). Both of ...
4
votes
2answers
2k views

Role of the chosen ciphersuite in an SSL/TLS connection

When it comes to a secure TLS configuration (e.g. for HTTPS), the topic is prominently about the supported cipher suites. I want to fully understand which part of the cipher suite has which role in a ...
4
votes
1answer
179 views

Infinite one time pads, brute force multiple pads?

So based on my understanding using the same key for encrypting two completely random plain texts when using an otp cipher will still retain perfectly secret. This is based on the answers on this ...
4
votes
2answers
904 views

Purpose of key confirmation

Among the requirements for a secure key exchange is the key confirmation. I wonder why is this step required. Even if the other party hasn't computed a correct value for the shared secret, it doesn't ...
4
votes
2answers
323 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
1answer
175 views

GPG key handling with Server

I'm using a VPS as a development machine and need gpg a) for signing git commits or e-mails (using mutt on the server) and b) for decrypting f.e. encrypted dotfiles and other files. But I don't feel ...
4
votes
1answer
569 views

What is 0xXXXXXXXX.asc.sig and how can I generate this?

When I am exchanging PGP keys with someone, I receive the regular 0xXXXXXXXX.asc file and regularly receive a file called 0xXXXXXXXX.asc.sig. What is this file? How can I generate one and send it ...
4
votes
1answer
2k 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 encryption....
4
votes
1answer
917 views

OpenSSL's EVP functions, more specifically EVP_SealInit

Reference: https://wiki.openssl.org/index.php/Manual:EVP_SealInit%283%29 I want to securely share a symmetrical key between two endpoints using OpenSSL's EVP interface. Transferring the encrypted ...
4
votes
2answers
151 views

How to establish a random OTR remote party as a specific individual?

In reading Glenn Greenwald's 2014 book No place to hide, one thing stood out to me as a bit odd. Greenwald details how Edward Snowden was insistent that Greenwald install PGP in order to communicate ...
4
votes
1answer
6k views

Why does Chrome warn about “Obsolete Connection Settings” for key exchange?

What do I have to change so Google Chrome won't say that I am using an obsolete key exchange? Obsolete Connection Settings The connection to this site uses a strong protocol (TLS 1.2), an ...
3
votes
2answers
5k 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 ...
3
votes
7answers
858 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
3answers
1k views

Secure device pairing protocol

I need to implement secure pairing between two devices based on a short shared PIN code with no trusted third party. If you think about the way bluetooth devices pair you won't be far off -- my ...
3
votes
3answers
415 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
2answers
2k views

Encryption in peer to peer chat

For a homework assignment I'm developing a chat service that will be able to communicate within a single network. The communication channel should be encrypted with RSA. Should I generate keypairs ...
3
votes
2answers
173 views

3rd party requires my server's public key for a secure connection?

I'm trying to integrate with a 3rd party service and they have requested our server's public key. I've sent it to them and they said they have configured it on their end. In order for me to make ...
3
votes
2answers
310 views

TLS protocol, session key for secure connection

In Wikipedia, as part of handshaking between a client and a server, the server send a public encryption key as part of the digital certificate. Then the client uses Diffie–Hellman key exchange to ...
3
votes
1answer
590 views

Tor: Is a diffie-helman key exchange being done over reciepient of traffic?

As I was looking over Tor specifications and I noticed that when a circuit is generated then on each circuit's node a Diffie-Hellman key exchange is being done over an encrypted path on each Node as ...
3
votes
1answer
944 views

What is the best method for key exchange?

I have application working between server and client. All messages must be encrypted and decrypted. I use AES algorithm and I want method to hide the key. I found Diffie-Hellman algorithm, but my ...
3
votes
1answer
801 views

What public GPG key do I have to publish?

I just created a master key and two subkeys. The first subkey is used for encryption, the second one for signing. Now I am wondering what public key do I have to publish on my website. Does is ...
3
votes
2answers
591 views

Is End to End security possible without physical contact?

I noticed that a lot of messaging start to provide "End2End" security, but I wonder how this can be possible without a key exchange between the the two clients. To my understanding to provide real ...
3
votes
1answer
148 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
1k views

What's the purpose of anonymous Diffie-Hellman key exchange + verification?

I attended a lecture where a procedure for solving the problem of passive attackers being able to gain knowledge about the identities of communication partners using an authenticated Diffie-Hellman ...
3
votes
1answer
55 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
1k 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
2answers
346 views

Why is random DH group recommended over a standard group?

I know in light of logjam there have been recommendations to generate your own DH group (https://weakdh.org/sysadmin.html). It seems to me that leaving this task up to the end user is much more likely ...
2
votes
1answer
9k views

Authenticated Diffie Hellman Key Exchange

It appears that the textbook version of Diffie-Hellman is susceptible to man in the middle attack and the use of digital signatures could prevent this attack from occurring. Digital signatures could ...
2
votes
2answers
4k views

Diffie-Hellman key-exchange: securing prime and base

As we know DH algorithm based upon 2 large prime numbers, which are used to be called as prime and base I am writing app which implements DH key exchange algorithm. From security point of view should ...
2
votes
2answers
231 views

SSH key based login is not vulenerable to MiTM attack. Is it true?

I read somewhere that when using key based login instead of a password based login, it is not possible for a Man-in-the-Middle attack to happen. This question is not about what is being more secure: ...
2
votes
2answers
65 views

Is it possible to run out Public-Key servers' storage by sending them countless valid Public-Keys?

Public-Key servers should accept valid Public-Keys. And they either cannot refuse to accept massive keys from a single IP, or from zombies, or from a hacked qualified key server via sync requests. ...