128 votes

Is it completely safe to publish an ssh public key?

Public Keys are designed for sharing, read access to and or publishing a public key is fine Private Keys are secret, they should only be accessible to the owner of said private key. To drive this ...
CaffeineAddiction's user avatar
77 votes
Accepted

How great is the risk in publicly sharing part of a private key?

Providing any part of the private key makes it less secure, at least marginally, simply because it provides an attacker with a smaller potential key space to explore. I fail to understand what you ...
Stephane's user avatar
  • 18.7k
76 votes
Accepted

Why shouldn't I bring a computer to a key-signing party?

Quote from Wikipedia: Although PGP keys are generally used with personal computers for Internet-related applications, key signing parties themselves generally do not involve computers, since ...
licklake's user avatar
  • 1,072
65 votes

Is it completely safe to publish an ssh public key?

Is it completely safe to publish an ssh public key? No, but you can do it anyway without worries (lots of people do, just look at https://sks-keyservers.net/i/ or https://pgp.mit.edu/) The reason why ...
Out of Band's user avatar
  • 9,273
55 votes

How great is the risk in publicly sharing part of a private key?

Revealing part of the private key can be catastrophic, for some asymmetric (public-key) cryptosystems. The exact level of risk depends on exactly which cryptosystem you are using. Some examples: If ...
D.W.'s user avatar
  • 99.6k
54 votes
Accepted

Protecting a private key by spreading it over multiple places

Just splitting the file up will not have the desired effect (as A.Hersean explains in their answer). I think what you're looking for is "Secret Sharing" algorithms, most notably Shamir's Secret ...
Mike Ounsworth's user avatar
48 votes

Compute the AES-encryption key given the plaintext and its ciphertext?

I am adding an answer as a community wiki because I believe that the accepted answer is dangerously misleading. Here's my reasoning: The question is asking about being able to derive the AES keys. In ...
47 votes
Accepted

Not understanding why I should use public/private key encryption over password?

The two options are intended for different use cases. Option 1 is intended for your use case. It encrypts the file with a key derived from a password, so that only the person who knows the password (i....
nobody's user avatar
  • 11.6k
44 votes

Best Practice: ”separate ssh-key per host and user“ vs. ”one ssh-key for all hosts“

I think this question can be considered from two different angles: security and convenience. When we create a SSH key pair, we are asked for providing a passphrase to add a more layer to protect the ...
YaOzI's user avatar
  • 541
39 votes

Where do you store your personal private GPG key?

This is not what I currently use, but I am thinking about it: Encrypt the private key with very long symmetric encryption key Use Shamir's Secret Sharing to split the symmetric encryption key to 7 ...
Lie Ryan's user avatar
  • 31.4k
39 votes

Is it completely safe to publish an ssh public key?

Nothing is "completely safe"; the question is whether it adds any additional risks. The SSH protocol sends the client's public key encrypted, only after it has negotiated a symmetric session ...
Luis Casillas's user avatar
39 votes

Protecting a private key by spreading it over multiple places

A private or secret key is not meant to be cut. For example, if someone get hold of half of a symmetric key of 128 bits, the strength of the key would not be divided per 2, but it would be reduced by ...
A. Hersean's user avatar
  • 10.6k
32 votes

Why shouldn't I bring a computer to a key-signing party?

Firstly, that statement doesn't mean "don't bring a computer"; it means " you don't need to bring a computer". Many people going to their first key signing party are likely to assume that, since the ...
micheal65536's user avatar
  • 1,766
32 votes
Accepted

Is assigning decrypted keys to a variable in application secure?

Yes, it does mean that the key will be stored in the application’s memory. Yes, there is a risk that malware (with sufficient privilege) can read it from there. This risk is hard to avoid — if you ...
Anders's user avatar
  • 65.6k
31 votes
Accepted

How can WhatsApp restore local or Google Drive Backups?

First assumption: The backup key is saved on WhatsApp servers too. Otherwise a local phone to phone backup would not work? TL;DR: Yes, after some investigation, this seems to be the case. Secondary ...
Yorick de Wid's user avatar
27 votes

Is it completely safe to publish an ssh public key?

No, unless you use a unique one per service. It lets attackers identify you. If you use the same public key for service A and service B, and your public key gets leaked for both of them, this will ...
user541686's user avatar
  • 2,562
26 votes
Accepted

OpenSSH declares ssh-rsa deprecated. What do I do next?

You don't need to do anything to your keys. From the same page that you quoted: The better alternatives include: The RFC8332 RSA SHA-2 signature algorithms rsa-sha2-256/512. These ...
Joseph Sible-Reinstate Monica's user avatar
25 votes

Extracting the PGP keyid from the public key file

From the gpg manual (gpg (GnuPG) 2.2.11): --show-keys This commands takes OpenPGP keys as input and prints information about them in the same way the command --list-keys does for locally stored ...
Traz's user avatar
  • 361
24 votes
Accepted

How to change (sub)key usage of a PGP key?

Since GnuPG 2.2.6 there's a hidden key-edit subcommand "change-usage" which does exactly that. Relevant commit. Let's try this subcommand with a test key. Let's create one first: mkdir /tmp/gpg-...
sanmai's user avatar
  • 464
24 votes
Accepted

TPM or OpenSSL for key generation?

The difference between using some hardware backed key store (i.e. TPM, HSM, smartcard ...) and a "pure software" solution like openssl genrsa is not so much about the security of the key ...
Steffen Ullrich's user avatar
22 votes

How great is the risk in publicly sharing part of a private key?

How much faster could an attacker crack the key given those 8 chars? It's hard to answer without knowing what kind of key we are talking about and what algorithm it's used with. In the case of ...
zakinster's user avatar
  • 614
22 votes

Do I need to hash or encrypt API keys before storing them in a database?

Yes, you should absolutely hash your API keys. In effect, they are your passwords and should be treated as such. And note that's hashed - not encrypted. You never need to decrypt the API keys, hence ...
Anders's user avatar
  • 65.6k
22 votes

Not understanding why I should use public/private key encryption over password?

There's one advantage of using public key cryptography over private key cryptography when you're encrypting file for yourself. When you use symmetric cryptography, you need to expose the password ...
Lie Ryan's user avatar
  • 31.4k
18 votes

Can a large corporation make a believable promise

However, if the third party makes a secret copy, then they can covertly sell it for large amounts of money. The thing about this is when it comes to a pivotal and highly-valued asset such as said key,...
mallocation's user avatar
  • 1,676
17 votes

Why are KDFs slow? Is using a KDF more secure than using the original secret?

The confusion here is that there are two distinct kinds of key generation function, and people often say "key derivation function" without being explicit which one they mean (or even understanding ...
Luis Casillas's user avatar
16 votes
Accepted

Which signing key should I use for certifying other peoples public keys: master or subkey?

The four possible key "usages" are Certification: signing other keys Signing: signing data Encryption: decrypting data Authentication: signing authentication tokens When you look at your key using --...
Simon Richter's user avatar
16 votes
Accepted

Can a large corporation make a believable promise

Companies make promises they can't renege on all the time - that's what a contract is. After all, insurance wouldn't exist if an insurer could wriggle out of paying claims through things like secret ...
mjt's user avatar
  • 415
14 votes

Is it completely safe to publish an ssh public key?

There is a slight risk of revealing your identity if your public key contains your hostname as a comment at the end, e.g. ssh-rsa C4F3B4B3... [email protected]. If your name is fairly uncommon ...
whirlwin's user avatar
  • 241
14 votes
Accepted

Checking if an RSA private key is passphrase protected

Just open it, if it's encrypted it will begin with -----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED DEK-Info: AES-128-CBC,0F5C7993DCFA4C0962CE249CFD854B91 if it is not it will begin directly ...
Sefa's user avatar
  • 1,754
13 votes
Accepted

How does GnuPG encrypt secret keys?

GnuPG 2.x has a separate gpg-agent that is the custodian of secret keys and that offers no control whatsoever over the encryption parameters of the secret keys within. Furthermore, --s2k are accepted ...
starfry's user avatar
  • 311

Only top scored, non community-wiki answers of a minimum length are eligible