Questions tagged [keys]

Private and secret keys consists of secret information used as input to various kinds of cryptographic algorithms such as encryption, signature and MAC to select the concrete transformation done by the algorithm.

Filter by
Sorted by
Tagged with
171 votes
2 answers
173k views

What is the main difference between a key, an IV and a nonce?

What are the main differences between a nonce, a key and an IV? Without any doubt the key should be kept secret. But what about the nonce and the IV? What's the main difference between them and their ...
curious's user avatar
  • 6,092
51 votes
5 answers
142k views

How to find modulus from a RSA public key?

I am studying the RSA cryptosystem. The public key consists of $(n, e)$, the modulus (product of two large primes), and the encryption exponent. I want to separate the modulus $n$ and exponent $e$. A ...
user3001408's user avatar
47 votes
2 answers
73k views

Differences between the terms "pre-master secret", "master secret", "private key", and "shared secret"?

Both crypto.SE and security.SE have excellent Q&As about how TLS generates session keys (I have linked some at the bottom). In reading these threads I'm having troubles with terminology since the ...
Mike Ounsworth's user avatar
46 votes
1 answer
15k views

Why do all SSH-RSA Keys begin with "AAAAB3NzaC1yc"?

My friend and I have been generating a few SSH2 RSA keys and noticed all the public keys begin with AAAAB3NzaC1yc, with the similarity extending to ...
Lord Loh.'s user avatar
  • 675
43 votes
1 answer
70k views

Can I remove newlines in a public key?

Can I remove new lines from the RSA public key file to get a one line string? So the question is if the key looks like this AAA BBB CCC or ...
xpepermint's user avatar
42 votes
2 answers
42k views

Where and how to store private keys in web applications for private messaging with web browsers

I am working on a web application enabling users to communicate over private messages which is just one part of the whole system. The main focus during my development process is to protect the privacy ...
John Doe's user avatar
  • 567
31 votes
6 answers
5k views

What is the practical impact of using System.Random which is not cryptographically random?

I recently noticed a .NET software using PBKDF to derive an encryption key from a password string. This password string was ...
learnerX's user avatar
  • 667
31 votes
2 answers
23k views

Using the same RSA keypair to sign and encrypt

The RSA signature operation is basically the same as encrypting with the private key. In particular, both operations use the same kind of keys. Is it safe to use the same RSA keypair both for ...
Lay András's user avatar
30 votes
2 answers
4k views

When using Curve25519, why does the private key always have a fixed bit at 2^254?

When using Curve25519, the private key always seems to have a fixed bit set at position $2^{254}$. Why is that? Is there any good reason to use a fixed positioned most-significant-bit in the private ...
Trina's user avatar
  • 684
30 votes
7 answers
21k views

How can SSL secure a two-way communication with only one key-pair?

As I understand it, SSL involved the use of a public-private key pair. How does this enable two-way communication? Suppose I have some server with which I wish to communicate securely. I connect to ...
GWLlosa's user avatar
  • 649
29 votes
2 answers
34k views

Key derivation functions (KDF): What are they, what are their main purposes and how they can be used?

What are KDFs? What are their main purposes? How they can be used, in other words, what's their drill in a cryptography scheme?
Samuel Paz's user avatar
25 votes
5 answers
7k views

Can a hard drive store clear text data that is physically impossible to retrieve?

I'm trying to study how HSM and TPM works when storing secret data in clear text. How can they achieve physical impossibility in retrieving secret data? I get the point in software, if you just have ...
einstein's user avatar
  • 411
24 votes
4 answers
13k views

How many RSA keys before a collision?

I was wondering how many possible private/public keys exist? If a million people – for whatever reason – would try to generate 5 keys each in the same minute (on the same date and time) is there a ...
Nick wheatley's user avatar
22 votes
1 answer
6k views

Related-key attacks on AES

According to Wikipedia: Related-key attacks can break AES-192 and AES-256 with complexities $2^{176}$ and $2^{99.5}$, respectively. What are the requirements for these attacks (i.e how many ...
Chris Smith's user avatar
  • 1,192
21 votes
6 answers
2k views

Why does PBKDF2 xor the iterations of the hash function together?

The definition of PBKDF2 states that I obtain a derived key (1) by calling a pseudorandom function a bunch of times recursively: $U_1 = PRF(password, salt)$ $U_2 = PRF(password, U_1)$ … $U_n = PRF(...
Cameron Skinner's user avatar
17 votes
5 answers
3k views

Is a PRG more costly than AES or any other encryption standard?

I know that there are many encryption standards that take a key and sometimes an IV to produce a cipher-text (the most prominent one is AES). These standards usually involve many rounds of addition ...
Ninja Bug's user avatar
  • 319
15 votes
3 answers
3k views

Why do Feistel ciphers need round keys?

Looking at the design for Feistel ciphers, they use a list of round keys which are generated from the main key using the key schedule of the associated block cipher. Some block ciphers need this as to ...
Daffy's user avatar
  • 2,369
15 votes
3 answers
9k views

Are all possible EC private keys valid?

I usually generate a key pair using OpenSSL or Bouncy Castle. I'm using curve secp256k1. The 256bit private keys look fairly random. Do all values of "private ...
Thomas Von Panom's user avatar
15 votes
3 answers
14k views

If PGP and GPG both follow the OpenPGP standard, are they 100% compatible in all use cases?

If someone gives me their PGP key, can I use it with GPG, and vice versa, all the time (100% interchangeable)? Or are there times when they are not compatible, when only PGP can be used with a PGP key,...
trusktr's user avatar
  • 261
15 votes
3 answers
1k views

Can we ensure the security of a crypto-algorithm and -implementaton against acoustic cryptanalysis?

Like people always say: “Attacks only get worse…” — which is why I'm asking early. I have been reading the paper “RSA Key Extraction via Low-Bandwidth Acoustic Cryptanalysis” published December 18, ...
e-sushi's user avatar
  • 17.7k
15 votes
3 answers
850 views

Where do I securely store the key for a system where the source is visible?

I have a customer with an Access database (ugh!) in which credit cards are stored in plaintext (yikes!), so amongst other changes I'm doing in the app, I'm applying some encryption in there. I've ...
Rob Cowell's user avatar
15 votes
2 answers
7k views

How exactly does key whitening manage to increase security?

Wikipedia states that key whitening increases security: In cryptography, key whitening is a technique intended to increase the security of an iterated block cipher. It consists of steps that combine ...
cHiMp's user avatar
  • 379
14 votes
1 answer
5k views

Relation between Key-exchange and Public-Key encryption schemes

Recently we have seen a lot of papers on Post-quantum key-establishment (key encapsulation mechanism or Key-exchange), largely due to the standardization call of NIST for PQ-protocols. However, most ...
Rick's user avatar
  • 1,235
12 votes
4 answers
7k views

RSA private key integrity check

I am working on a device whose OS provides an RSA Private primitive, where the inputs are the message, and the usual components of a private key. Unfortunately it is bugged so that in some cases of ...
M.M's user avatar
  • 223
12 votes
1 answer
43k views

What is the difference between key size and block size (for AES)?

We are working on AES and want to develop a website which should provide an encryption facility but we are not understanding the difference between key and the block size. More appropriately what does ...
xyz's user avatar
  • 139
12 votes
4 answers
787 views

Do I need to worry about timing attacks in Base64 encoding/decoding of private keys?

Do I need to worry about timing attacks in Base64 encoding/decoding of private keys? This is a common operation (ex. PEM keys) and is variable time in typical implementations.
Demi's user avatar
  • 4,763
11 votes
5 answers
14k views

Two different keys decrypting same content

is there some generally available algorithm which will encrypt a short string and generate two unique keys so that any of the two can be used to decrypt the message again? It doesn't has to be "super ...
Bishonen_PL's user avatar
11 votes
3 answers
10k views

AES key reuse and guessing the key

Bit of a noob question and a fair bit of Googling didn't help. I understand that the current encryption standard is AES256. A few questions Is the point of this (and other encryption techniques) to ...
user1936752's user avatar
11 votes
2 answers
5k views

Can curve25519 keys be used with ed25519 keys?

Can curve25519 keys be used with ed25519? I'd prefer to use ed25519, but there isn't a fast java version. For my application, I'd like to use curve25519 until I can get a faster ed25519 for java. ...
user avatar
11 votes
1 answer
2k views

Why do crypto tools display key components in such an unusual format?

openssl x509 (v1.0.1f) displays public key moduli as arrays of hex-encoded bytes, 15 columns wide, starting with a leading 00:: ...
Dan Lenski's user avatar
11 votes
4 answers
6k views

What is the largest performed/possible bruteforce attack to date?

I've read that cracking 128-bit key is currently out of reach of all humanity. However, I can't seem to find any information on what scope of brute force attacks have been performed or are possible at ...
ThePiachu's user avatar
  • 1,649
10 votes
4 answers
4k views

If Kerckhoff's Principle holds, why do we need a cipher at all?

I understand Kerckhoff's principle, in a very practical sense, that the best attack that can be performed on a given cryptographic algorithm should be only as practical, if not less practical, than an ...
Will Burghard's user avatar
10 votes
3 answers
2k views

1 Billion Bit Encryption?

So, browsing through YouTube, I stumbled on this video interview of John Draper (Captain Crunch), one of the first "hackers". He talks for about 3 minutes (until 27:48) about his home rolled ...
Tanner's user avatar
  • 111
10 votes
1 answer
2k views

How does GPG verify succesful decryption?

How does GPG (or other programs using the OpenPGP file format) verify that it has succeeded with decryption (for symmetrically encrypted data)? Is something appended to the clear text so there exist ...
Christopher Käck's user avatar
10 votes
1 answer
7k views

What's the most secure way to derive a key from a password repeatably?

I'm trying to write a cloud storage application where everything the user uploads is unreadable by the server, encrypted client-side before being sent. Currently, the flow looks like this: User ...
user2589389's user avatar
10 votes
0 answers
132 views

Offline Group Key Agreement - Cross Device Syncing

I have a specific use case I am interested in. I have spent the better part of the night reading research papers. I am beginning to believe what I want is not possible so I wanted to confirm here. ...
Mark's user avatar
  • 201
9 votes
3 answers
5k views

Why does OpenSSL differentiate between PSS and non-PSS for private key generation?

RSA-PSS private keys The following command will generate an RSA-PSS private key: ...
neubert's user avatar
  • 2,855
9 votes
3 answers
15k views

How and why can a decryption program tell me that a key is incorrect?

I have noticed that some programs used for file encryption will tell you if an entered key is wrong when you try to decrypt. It seems (to me at least) that this would mean that the key somehow is ...
Thomas's user avatar
  • 1,154
9 votes
2 answers
10k views

How to calculate an IV when I have a shared private key?

I'm working with a server/client system that has securely negotiated a private key. I need to encrypt/decrypt messages passing in both directions which are typically between 100 bytes to 100 KB. I'm ...
Robin Rodricks's user avatar
9 votes
2 answers
2k views

How strong are Bitlocker recovery keys?

This is an example of a bitlocker recovery key; 820042-335825-646573-481530-265253-688132-339900-822810 İs that key actually strong? It does not have any letters, ...
asd's user avatar
  • 91
9 votes
1 answer
2k views

What is a related key?

We talk of related keys and related key attacks, but what is a 'related key'? So in three related parts:- How can one key be related to another key? Is there a metric describing the degree of ...
Paul Uszak's user avatar
  • 14.6k
9 votes
5 answers
2k views

Why in cryptographic schemes we always assume that the key and plaintext are independent?

Why do we always assume in cryptographic schemes that the key and plaintext are independent? What if the plaintext depends on the key? How can this endanger security? Is this assumption essential for ...
ssss's user avatar
  • 101
9 votes
1 answer
3k views

WhatsApp end-to-end encryption

WhatsApp offers end-to-end encryption. However, when I start using it on a second device such as a PC running Windows, I can decrypt incoming messages without providing any private key into my second ...
Ook's user avatar
  • 215
9 votes
2 answers
11k views

How long should a HMAC cryptographic key be?

In the top answer to this question the answerer says 'with a sufficently long key'. I am using a SHA1-HMAC (may switch to SHA256-HMAC) algorithm to verify cookies sent to clients as authentication ...
Adam Griffiths's user avatar
9 votes
1 answer
2k views

For a given plaintext-ciphertext pair, how many valid AES keys are there?

For $PT\in \mathbb{M}$ and $CT\in \mathbb{C}$, let $\mathbb{F}=\{f|f:\mathbb{M}\rightarrow\mathbb{C}\}$ be the collection of all functions from $\mathbb{M}$ to $\mathbb{C}$. Then AES encryption under ...
Baruntar's user avatar
  • 327
9 votes
1 answer
2k views

HMAC-SHA-512 with a 256-bit key

I am implementing hmac-sha-512 in an integrated system. However, one subsystem is only supports the use of 256-bit keys. I read in https://www.rfc-editor.org/rfc/rfc4868 that: However, note that [...
user avatar
8 votes
4 answers
7k views

Why is the Keyspace of a Substitution Cipher not 2^26 but 2^88

It is known that a cipher has a keyspace of cryptographic algorithm whose key length is $n$ is given by $2^n$, but the keyspace of the substitution cipher is $2^{88}$ which is an approximation of $26!$...
shehan.k's user avatar
8 votes
5 answers
2k views

Encrypt a file once with 50 characters password or twice with 25 characters?

What better Encrypt the file once with 50 characters password or encrypt it twice each time with 25 characters password.
user3321's user avatar
8 votes
3 answers
52k views

AES 256 Encryption - Is it really easy to decrypt if you have the key?

So this might sound like a crazy question but bear with me for a minute. I can't find any info on the internet and so am here, although this might have been a good place to start. I've recently ...
SteveB's user avatar
  • 183
8 votes
2 answers
5k views

DES — Can I recover the key when I have both ciphertext and the plaintext?

Given a message and DES encrypted form of said message, is it possible to efficiently compute the key used to encrypt the data?
GregoryComer's user avatar

1
2 3 4 5
18