Questions tagged [key-generation]

Key generation is the process of generating keys for cryptographic purposes.

Filter by
Sorted by
Tagged with
1
vote
0answers
20 views

Is there a scheme to force a party to generate a fresh key?

Is there a way to force one party to generate a fresh key, such that another party can be convinced that the key was freshly generated, without that party also knowing the key? I'm motivated by a ...
1
vote
1answer
75 views

curve25519 by openSSL

How can i generate ec curve25519 keys using openSSL? When I run openssl ecparam -name curve25519 -genkey -noout -out private.ec.key I have this message ...
1
vote
2answers
230 views

Generate PGP keys very very fast

Is there a way to generate thousands of PGP keys at a very very fast rate? I am generating thousands of 3072-bit PGP keys looking like part of a personal research project. Obviously, this is a very ...
2
votes
1answer
90 views

Generating a key pair using a signature generated by an existing key

I’ve built an app in which each user has a private/public key pair and I want to generate a second one for them, however I cannot store the second private key anywhere. What would be the drawbacks ...
4
votes
1answer
229 views

Is forward secrecy overhyped or necessary?

Forward Secrecy, also perfect forward secrecy, gives assurance about session keys even the private key is compromised. This is achieved by generating a random key per session without using a ...
0
votes
1answer
60 views

Finding a secret key corresponding to a public key

As far as I know, a secret key corresponding to a given public key is not unique. So, for example, there are actually multiple secret keys that can produce the same digital signature under RSA ...
2
votes
0answers
62 views

Distributed key generation (for discrete-log based cryptosystems) with fake shares

Under the definition of Gennaro et al (link), a DKG protocol needs to satisfy “correctness” and “secrecy”. Correctness is divided into three sub-properties: C1. All subsets of $t+1$ shares provided ...
1
vote
0answers
47 views

Why (N+1)sec's mDP Implementation does not check whether all the XORED received $z$ values are 0

In the original mDP protocol once all $z$ values received from each participant the following calculation is being done: If either $XOR(z_1,z_2,...,z_n) = 0 $ or received invalid Signature then ...
1
vote
1answer
68 views

Why do general encryption key generators also take the algorithm as input?

To my understanding the key generation logic only needs a source of randomness and the length of the key to be generated as input. However, we still provide the algorithm (names) like AES, DES, ...
0
votes
1answer
77 views

Binary representation of the inverse of a big number [closed]

In one of the first FHE schemes by Gentry, the KeyGen algorithm is defined as follow: For a security parameter $\lambda$, set $N = \lambda ^ 2, P = \lambda ^ 2, Q = \lambda ^ 5$. KeyGen$(\lambda)$: ...
2
votes
0answers
60 views

General Private/Public key generation

I wanted to get an idea on how the whole cold-storage private/public key generation works for different cryptocurrencies. So I was playing around with BIP32 deriviation path on: https://iancoleman.io/...
1
vote
0answers
170 views

How to generate a distributed private key?

Shamir's Secret Sharing scheme is really interesting but the pain point is that the secret is generated by one trusted party, then the shares are distributed to other peoples. Is there any scheme ...
2
votes
0answers
27 views

What are SNFS-safe limits for an RSA moduli optimized for simple modular reduction?

I consider $n$-bit RSA moduli $N$ having high-order bits starting by with $k$ bits at 1, then $k$ bits at 0, then $m-2k$ bits at ...
2
votes
2answers
94 views

Multiparty secret generation protocol

The goal is to create a secret S on a trusted server by having users A, B and C each send a private seed to the server, in such a way that any 2 of them can later recover S by resubmitting their ...
2
votes
2answers
139 views

Can the key-generation algorithm always be uniform?

Assume that the encryption uses $n$-bit keys to encrypt $l(n)$-length messages. If a symmetric key encryption scheme is defined as $\Pi_{1} = ( \mathrm{Enc}, \mathrm{Dec} )$, then for every $x_{0}, ...
0
votes
1answer
301 views

Diffie Hellman vs Three Pass Exchange

Given an insecure channel, what are the pros and cons of using Diffie Hellman to generate a symmetric shared key and then send encrypted data with this key, or simply use Shamir's three-pass protocol ...
3
votes
1answer
2k views

Generating a NIST P-256 private key

From the Curve25519 spec I learned that it possible to take a random 32 bytes and with a few operations make it on the curve: To generate a 32-byte Curve25519 secret key, start by generating 32 ...
3
votes
1answer
142 views

Safety of encrypting a plaintext with its hash as the key

What are the safety issues of using the the hash of plaintext as the key to encrypt it? The first that comes to mind is that if I can guess an approximation or part of the plain text, brute force ...
4
votes
3answers
486 views

What is proper use of a True Random Number Generator?

Let's say I have a true random number generator TRNG. Random numbers are generated on demand from a HW-entropy source, resulting in a 32-bit random value each time it is called. I have to fill an ...
0
votes
2answers
341 views

Algorithm to generate ECDSA keys with random number generator

I have a certified random number generator (TRNG, it does not matter what it is for the question). I would like to use it as a source to generate secp384r1 ECDSA keys. What is the algorithm I should ...
1
vote
1answer
139 views

Key expansion for cryptographic keys

I have seen some applications use key expansion when deriving AES-keys. E.g. the application will generate some random data (e.g. 128bits), then use PBKDF2 to expand it into 512bits (2x256 keys). Why ...
0
votes
2answers
243 views

Are cryptographies based on bitwise operations considered secure?

I have recently been reading (and writing) a lot off ECC on top of TCP via pythons sockets. I've stubbled across a couple of things mentioning how elliptical curves are more secure with the same key ...
37
votes
1answer
4k views

What is “Fast Prime”?

In this note, the manufacturer of a RSA key generation gizmo vulnerable to the new ROCA attack (see second section) explains that it is common practice to employ acceleration algorithms in order to ...
0
votes
1answer
250 views

SHA2 Certificate generating (create Signed Certificate) [closed]

i was requested to write a programmer that can generate A SHA2 certificate. So i wrote a tester class to try and mimic Keytool process of generating One (referencing base of this: url https://www....
2
votes
0answers
111 views

RSA - find d,e with restrictions

For academic purposes, assuming $n, p, q$ with $n\approx 2^{4096}$ and $p,q\approx 2^{2048}$. I need to find ($e,d$) such that: $e$ is smaller than $2^{64}$ $d\approx 2^{4096}$ and will have as ...
0
votes
2answers
565 views

How should one create an ephemeral Diffie-Hellman private key?

When picking an ephemeral Diffie-Hellman private key (little a or little b), can I reasonably just pick 32 random bytes? I am specifically interested in use within SRPv6. RFC5054 says that these ...
5
votes
2answers
4k views

Why are ephemeral/session/temporary keys useful?

One reason that communication protocols use ephemeral keys is to help with implementing Perfect Forward Security. They're also used in SSL to go from using RSA to using a faster symmetric encryption. ...
1
vote
1answer
169 views

Offline session key agreement protocol

Is there any implemented solution to agree on a session key in offline way. I can exchange some keys before being offline but I need both sides to create the session key offline. I need implemented ...
0
votes
1answer
1k views

How to Check Strength of RSA Public Private Key

How to measure strength of RSA public private key pair. is it enough to only measure the length of primes used to generate N? how to check that primes p,q used to make N were selected truly randomly ...
1
vote
1answer
113 views

McEliece parameter tuple (n, k, t) through BouncyCastles (m, t, poly) [closed]

I am using BouncyCastles Java API and want to use McEliece encryption. After browsing through various paper for finding good parameters (e.g. How to choose McEliece's parameters?) I am now having the ...
5
votes
2answers
1k views

Where do key generation algorithms take the randomness from?

I was just wondering, because in many encryption tools like Veracrypt or GnuPG you have to generate pseudo randomness with your mouse movement. So, where do automatically generated keys take that ...
1
vote
1answer
602 views

Find inverse in RSA

I've been reading on RSA for a while but there's something I still can't understand. When generating the key: once you find n = pq and φ(n), you choose a number d coprime with φ(n) and then you need ...
0
votes
3answers
205 views

How to combine pepper in random string generation

I am writing a key generator program. Indeed it generates a key in the form of a random text string (not binary), with its characters chosen randomly from a set of defined characters, with a ...
2
votes
0answers
244 views

Rijndael - is there some difference in resistance between counter in generator input and in IV?

I am thinking about Rijndael implementation in order to store tokens (cannot be hashed) - one token for one user. And finally I get stuck with key/IV generation problem :( The questions are: 1) Is ...
1
vote
0answers
145 views

Time taken to break cryptographic key

Assume it takes 512 clock cycles to check if a 64 cryptographic bit key is correct. Given a 64 bit plain text and its ciphertext, how long does it take to check all keys using a single core of a 4 GHz ...
0
votes
1answer
74 views

Are there any downsides to key stretching an already high quality entropic key?

For example, if we grab 50 bytes from a high quality source and run them through a key stretching function like Argon2 and have it generate a 32 byte secret for AES. Is there any downside to this? Do ...
3
votes
1answer
105 views

Is there an asymmetric scheme where keys form a graph and a message can only be decrypted across a certain degree of separation?

Consider a network of trust, where each user u specifies some other set of users whom u "trusts". This forms a graph with users ...
1
vote
1answer
212 views

securing the keystore

When generating a public-private key pair you have the option to secure the keystore with a password. where is that password stored, is it a hashed version that is stored and if that is so which ...
2
votes
1answer
167 views

Why isn't ElGamal a symmetric-key scheme?

I was asked about this question by a friend. He considers that Alice and Bob share a secret key s=g^(xy). So why isn't it considered a symmentric-key scheme? ...
1
vote
1answer
376 views

CP-ABE Key generation random parameters

In the key generation algorithm of cp-abe there are attributes: $x_1, x_2,...x_n \in \{0,1\}^*$ $r, r_{x_1}, r_{x_2},...r_{x_n} \xleftarrow{R} Z_p$ are chosen randomly to generate the private key $...
1
vote
2answers
554 views

Guidelines for cryptographic key generation

I was wondering whether you know can point me to some general (basic) principles/guidelines one should follow for generating cryptographic keys? I have looked at NIST 800-133, but was hoping for some ...
2
votes
2answers
242 views

Generating DH key with specific bit-length

In PKCS#3 the generation for DH secrets mandates to generate them with a minimum size if length is specified: The central authority may optionally select an integer $\ell$, the private-value ...
1
vote
1answer
103 views

RSA key generation gives d=1

I was reviewing RSA by hand. I picked 53 and 59 as my primes. For e I picked 5. When I solved for d using extended euclid, I got 1 which obviously doesn't decrypt anything. I checked my answers online ...
5
votes
1answer
2k views

What are the differences between X9.31 RSA operation and PKCS#1 RSA operation?

NIST and other - mainly older - standards often don't just mention PKCS#1 RSA algorithms but also X9.31 RSA algorithms. What are the differences between X9.31 and PKCS#1 (v2.1) with regards to key ...
2
votes
1answer
102 views

Finding $f^{-1}$ in the YASHE keygen algorithm

In the YASHE (Yet Another Somewhat Homomorphic Encryption) algorithm, the beggining of the key generation step specifies: Sample $\ f',g ← χ_{key}$ and let $\ f = [tf' + 1]_q$. If $\ f$ is not ...
2
votes
2answers
85 views

How do I pick variable length passwords uniformly at random?

How do I pick passwords uniformly at random when given a min and max length? It seems that if I first pick a random length, then choose random characters, this procedure will choose shorter length ...
10
votes
2answers
2k views

Should RSA primes p and q differ in length by “a few digits”?

When generating RSA keys in the original RSA paper it is stated: to gain additional protection against sophisticated factoring algorithms, p and q should differ in length by a few digits Why is ...
54
votes
3answers
1k views

Do these new insights into prime numbers affect encryption security?

Quanta Magazine reports: Two mathematicians have uncovered a simple, previously unnoticed property of prime numbers [...]. Prime numbers, it seems, have decided preferences about the final digits ...
1
vote
1answer
129 views

Building multiple keys from the same input using a KDF [duplicate]

Let's say I have a single secret with high entropy, S, for the entire application. I want to generate keys K1, K2 for 2 ...
2
votes
2answers
2k views

Obtaining Diffie-Hellman generator

In the Wikipedia article on Diffie-Hellman, the algorithm calls for a large prime modulus, $p$, and a generator, $g$, which is a primitive root of $p$. As far as my knowledge of number theory goes, ...