Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Diffie–Hellman offers secure key exchange only if sides are authenticated. for authentication, sides are using public/private key. so if side A knows the public key of the side B, then A can simply use that key to encrypt the message (or the new session key). why bother to use separate key exchange algorithm?
Diffie Hellman is designed to exchange a shared key. So the question could be rephrased as: Why would I want to use a shared key, when public/private key pairs offers encrpytion and ease of sharing public keys?
The benefits of a shared key over public/private keys are:
Shared keys have faster algorithms compared to public/private key algorithms and thus require less processing power.
It is possible for attackers to impersonate when using public/private key encrption, if a certificate authority is compromised: See the DigiNotar case.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Is there a relationship between the content of a private RSA key (private exponent, modulus and primes) and a AES-128-cbs key and iv?
I know that you can encrypt your private key using AES in which case
the AES-iv is supplied in the pem file and the AES-key is
calculated using MD5 over secret-password and the first 8 bytes
of the AES-iv.
However I have AES encrypted data and a private RSA key that I can read.
Is there a standard on how to derive the AES-key and AES-iv from the
RSA key content, maybe from the prime numbers inside. Is
there some standard that is normally used?
No, it makes no sense to have your symmetric key depending on your asymmetric.
Usually you also don't just encrypt one particular AES key with one RSA keypair. Instead what you usually want to do is to use for example someone's public key to encrypt a randomly generated AES key and send the RSA encrypted key along with the AES encrypted data to the recipient.
This way you can use a different symmetric key for every data package.
This is just one use case, but it illustrates why there is no reason for such a dependency.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
What is the point of allowing ssh-keygen to generate empty passphrase keys when it is not recommended to use such keys for remote login? What situations would such keys be useful for?
The passphrase protects the key in its storage on your local computer.
Even without a passphrase, a key is still better than a password, as it can only be "stolen" if someone has physical access to your computer (or at least some kind of network access to the files on your computer), whereas a password can be brute-forced (or leaked from any number of places in case you re-use passwords).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I am using RSA asymmetric encryption, encrypting the data using the public key and decrypting the data using the private key.
The public key will be shared in clients machines.
My question is if the user get the public key is there any way to get the private key using the public one?
The keys are mathematically linked, but it is not possible to get the private key from the public key (at least no one knows or admits to knowing how to do so). However, you can obtain the public key from the private key.
If you don't have a good understanding of Public-key cryptography, you might wonder about things and ask questions. And that's OK, it's confusing when you first think about it. Here's a great book Cryptography Decrypted that I recommend to friends who wish to learn more about cryptography in general. It has a very good section on Public-key cryptography and presents it in such a way that anyone can understand.
No. That is the very definition of public key cryptography.
Sure. Some currently-known methods for obtaining a private key, when the public key is already known, include:
1) Brute force. Should take about a million years or so to complete, depending on hardware. Suggestion---expire the public keys once every 500,000 years or so.
2) The user is the NSA, in which case it's entirely possible that they've introduced subtle, top-secret vulnerabilities into the hardware or software you're using to generate the keypair.
3) The user has a quantum computer. They'd have to invent it first, though. Probably worth a Nobel prize right there.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
We will have multiple (eventually hundreds of) embedded servers going out in the field to client sites and coming back to our site. We need to be able to securely log in to any server from any of multiple clients (laptops, tablets, etc.) both here and out in the field.
I'd prefer SSH (or equivalent) but with hundreds of servers if a new client is introduced (e.g. a laptop dies and we replace it) it will simply be impractical to generate a new key pair and update all the servers individually (many of which will be offsite and temporarily inaccessible) with the new public key.
Other than generating a single key pair and copying the private key to each client (an obvious no-no), is there a way to securely accomplish this?
Thanks!
OpenSSH can be configured to accept certificates signed by a CA to authenticate both users and hosts.
Read the CERTIFICATES section from the ssh-keygen(1) manual page.
Generate a bunch of key pairs ahead of time (more than you'll need), and push all of the public keys to the servers. Keep the extra private keys in a safe or in some similarly secure location, and issue them to clients as needed.
This still doesn't leave you with any way to revoke keys, though, which may or may not be a problem.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Today is friday and I'm a desperate sysadmin. I issued a demand of certificate for an HTTPS server, and just received it after more than a long week of waiting, but while my request was processed I lost the passphrase that secured my private key.
Given that I have the private key and the public key jointly generated with the passphrase (that I knew by the time), could there be a clever way to recover the lost passphrase.
Thanks in advance.
Not really. The point of these protection is precisely to make it infeasible to recover the password.
If the password wasn't too long, you might try brute force...
Your best option is probably to contact your CA and ask them to re-issue a certificate with a new CSR. Some might allow re-keying without an extra fee during the certificate validity period.