43
votes
Accepted
Do these new insights into prime numbers affect encryption security?
No, because these new insights only affect the discovery and patterns regarding finding new prime numbers. In order to break existing encryption algorithms that rely on primes such as RSA, you'd have ...
21
votes
Do these new insights into prime numbers affect encryption security?
No, because that "discovery" produces nothing of value.
They examined prime numbers up to one billion. In that range, about one in eight numbers ending in 1, 3, 7 or 9 are prime numbers, and which ...
21
votes
Accepted
Can we pick which key is private or public in asymmetric encryption? Do the keys actually encrypt and decrypt a cipher text?
No no no! You don't get to pick which key is private and which public. That false sense of freedom is due to
people not understanding that public-key cryptography is conceptually different from ...
12
votes
Why is the private key generated first in public key crypto?
In general, the public and private keys are computed together.
For some schemes, the public key is computed from the private key. ElGamal is an example. (The system parameters include a suitable ...
12
votes
Accepted
Are all possible EC private keys valid?
I'll consider that you are using a 256-bit curve per ANS X9.62:2005.
Not all 256-bit bitstrings are a formally valid private key; when using big-endian conventions, these must represent a strictly ...
10
votes
Can we pick which key is private or public in asymmetric encryption? Do the keys actually encrypt and decrypt a cipher text?
After generating a key-pair can we pick which key will be private or public?
No, in general we cannot. For most asymmetric cryptosystems the private and public keys are completely different kinds of ...
9
votes
Are all possible EC private keys valid?
There are three ways to look at it:
The mathematics. An elliptic curve key pair is defined as $s, s \cdot G$, where $s$ is an integer, $G$ is the base point and $\cdot$ is elliptic curve point ...
9
votes
Accepted
State of the art RSA key generation
There is consensus that it is safe to use random primes $p$ and $q$ when generating 2048-bit (or wider) RSA public moduli which two prime factors $p$ and $q$ are about half the key size. That is ...
9
votes
Accepted
Generating a NIST P-256 private key
A NIST P-256 secret key (for ECDH or ECDSA) represents any scalar modulo $\ell$ for $$\ell = 2^{256} - 432420386565659656852420866394968145599,$$ whereas an X25519 secret key represents an integer ...
8
votes
Accepted
Generation of a cyclic group of prime order
One way to do this, if you're working with a multiplicative group $Z^*_p$, is to pick a prime $p$ so that $p-1$ has a large prime factor $q$; once you have this, then to generate a generator of order $...
8
votes
Accepted
What are the differences between X9.31 RSA operation and PKCS#1 RSA operation?
Well, there are indeed differences between the two standards, as you can see below:
key pair generation
X9.31 requires that $p-1$, $p+1$, $q-1$, $q+1$ all have prime factors between $2^{100}$...
8
votes
Accepted
What is “Fast Prime”?
This is a tentative guess at answering my own question.
Perhaps the "Fast Prime" method alluded to in the question's citation is that of these two papers (the second polishing the first):
[JPV2000]: ...
8
votes
Accepted
Is forward secrecy overhyped or necessary?
Since I am at the source of the original quote, I might as well respond...
Technically, forward secrecy is overhyped because it is recommended almost everywhere. In some contexts it makes sense and is ...
8
votes
Can we pick which key is private or public in asymmetric encryption? Do the keys actually encrypt and decrypt a cipher text?
In RSA encryption and decryption are similar. If you chose e randomly and calculate matching d you could then chose to swap their roles and pick either as the public key.
Usually we don't do this, we ...
7
votes
Accepted
Can I use the output from a DRBG directly as K for AES, or do I need to use a key generator algorithm?
It you need a deterministically derived key for AES, the DRBG algorithms of NIST SP 800-90A are suitable, and their output is directly usable as an AES key. An example use case is when computing an ...
7
votes
Should RSA primes p and q differ in length by "a few digits"?
The quoted recommendation is generally considered obsolete in the context of RSA with secure parameters, and is either disregarded, or replaced by asking that $\left|p–q\right|>2^{(n/2)–100}$ where ...
7
votes
Accepted
Why isn't ElGamal a symmetric-key scheme?
g^x is the public key of Alice and x her private key, while g^y is the public key of Bob and ...
7
votes
Accepted
Offline session key agreement protocol
Given the information in the question and in the comments, this is pretty straightforward:
Online phase: Use any common key agreement protocol, e.g. Diffie-Hellmann key exchange to generate a shared ...
7
votes
curve25519 by openSSL
Use the genpkey command:
openssl genpkey -algorithm x25519
or, for edwards25519:
...
7
votes
Accepted
Recovery Passphrase Collission for BIP-39 and BIP-44
128-bit entropy simply means that we have $2^{128}$ different values to search, which is similar to 128-bit security. For a single target that is impossible since even the collaborative powers of ...
6
votes
Accepted
Is there a correct way to generate a symmetric key?
Symmetric keys don't need to be in any particular format -- they're just a sequence of (pseudo)random bits.
Most programming environments provide some sort of "secure random" mechanism (a ...
6
votes
Why is the private key generated first in public key crypto?
The reason that one must be derived from the other is that the private and corresponding public key are strongly related: For instance, in RSA, the pair satisfies $ed\equiv 1\mod\varphi(n)$; in Diffie-...
6
votes
Do these new insights into prime numbers affect encryption security?
Not really - the frequency of primes doesn't change, and it's not a certainty that any given prime isn't followed by another with the same final digit. You'd still have to check all possible primes in ...
6
votes
Should RSA primes p and q differ in length by "a few digits"?
If you choose $p$ and $q$ at random of the same length, then they will be far away from each other with extraordinarily high probability. Thus, this is not an issue.
In the past, there were those ...
6
votes
RSA key generation gives d=1
No, your values for $e$ and primes are fine (well, at least for a toy example); $e$ is relatively prime to both $p-1$ and $q-1$, and that's the only hard requirement (not counting the security related ...
6
votes
Where do key generation algorithms take the randomness from?
Applications that generate key get the randomness (entropy) from the operating system. The operating system, in turn, gets the randomness where it can find it. Ideally the OS gets randomness from a ...
6
votes
Accepted
How to Check Strength of RSA Public Private Key
RSA public/private key pairs are no exception: there is no way to assess that a cryptographic key is strong by looking at its value; only ways to assess that it is weak. And lack of signs that it is ...
6
votes
Can we pick which key is private or public in asymmetric encryption? Do the keys actually encrypt and decrypt a cipher text?
The existing answers from DannyNiu and Meir Maor answer well the confusion about whether private and public keys are interchangeable. But it is also worthwhile, I think, to address this snippet from ...
5
votes
Accepted
Can I use an ECDH Shared Secret from the same Private / Public Key Pair?
No, it's not a problem.
What you've found is known as the square computational diffie-hellman problem(SCDH) and it can be shown that this is equivalent to the computational diffie-hellman problem(CDH)...
5
votes
Accepted
Are there any downsides to key stretching an already high quality entropic key?
Even with perfectly random input, if your final key size is 32 bytes, you cannot have more than 32 bytes of entropy in it.
But it seems pretty useless to use key stretching if you already have more ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
key-generation × 142rsa × 28
public-key × 26
encryption × 19
keys × 15
elliptic-curves × 10
random-number-generator × 10
diffie-hellman × 9
key-exchange × 8
key-derivation × 8
aes × 7
prime-numbers × 7
randomness × 6
symmetric × 5
entropy × 4
decryption × 4
threshold-cryptography × 4
hash × 3
algorithm-design × 3
homomorphic-encryption × 3
hmac × 3
post-quantum-cryptography × 3
secret-sharing × 3
passwords × 3
dsa × 3