Questions tagged [key-generation]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
14 views

Key distribution protocol involves only 2 parties, given E[k1,E(k2,m)]=E[k2, E(k1, m)]

Given an one-key cipher such that: E[k1,E(k2,m)]=E[k2, E(k1, m)] Is there any key distribution protocol that involves only two parties (Alice and Bob) without the key distribution center? The protocol ...
user avatar
  • 1
1 vote
0 answers
19 views

Should proving key be kept as a secret in NIZK?

Hi I am quite new to NIZK. I know a trusted party (Generator) generates proving key and verifying key and then distributes them to Prover and Verifier. Apparently, the verifying key can be seen as ...
user avatar
  • 31
0 votes
1 answer
98 views

How proxy re-encryption works - layman perspective

Here is the use case: A uses B's public key to encrypt a message and sent it to B. In later stages, a new member C joins and B would like to let C be able to see this encrypted message (i.e., give the ...
user avatar
  • 47
1 vote
0 answers
53 views

What are the uses of shared cipher texts and signatures?

In Distributed Key Generation(DKG), why is there a need to actually create a master secret which can then derive into a single public and private keypair(for signatures) and a secret key(encryption)? ...
user avatar
  • 91
0 votes
0 answers
27 views

Enumerating values from a linear congruential generator java Random()

During my research on a java application, I discovered that the nextInt(64) function of the java.Random() class is used to ...
user avatar
1 vote
1 answer
58 views

Salt value in scrypt algorithm

I see there are a lot of questions relating to handling of a salt value but nothing I have seen so far has cleared the following question. When using a KDF such a scrypt, I believe the value of the ...
user avatar
  • 55
2 votes
1 answer
82 views

If the symmetric key is stolen; can I key revoke without reencrypted data?

I have a question about database security. This is a scenario I have. The data is encrypted using symmetric (i.e., AES) and stored in a database, while the secret key is stored on the client side, so ...
user avatar
  • 21
0 votes
0 answers
34 views

Distributed key generation when all parties need to participate

Suppose $n$ parties where $t$ are honest want to perform a distributed key generation protocol. There are many existing schemes. In the simpler setting where all $n$ parties must be online, otherwise ...
user avatar
  • 325
2 votes
2 answers
391 views

Why do most authenticated encryption primitives expect an unpredictable and uniformly random key in order to be secure?

I've noticed that keys for authenticated encryption primitives like AES must be unpredictable and uniformly random in order to be secure. IV values and seeds for PRNGs also have to be unpredictable ...
user avatar
  • 23
0 votes
1 answer
27 views

Usage of cookies in IKE

While creating secret keys in IKE protocol, sides use cookies but I did not understand where they come from, how they are generated and why they are used. Can someone explain? Thanks.
user avatar
  • 27
1 vote
0 answers
14 views

Requirements of dedicated broadcast channel in Joint-Feldman protocol

I am currently reading through Secure Distributed Key Generation For Discrete-Log Based Cryptosystems, which describes a secure variant of the Joint-Feldman protocol. In this paper, in section 2 (...
user avatar
  • 111
1 vote
1 answer
33 views

Generating a public-private key pair from another key pair

Is the following problem a known cryptographic problem? Find algorithms for functions $f$ and $g$, such that $$ f(x, \alpha_{enc}) \rightarrow \beta_{enc}\\ g(x, \alpha_{dec}) \rightarrow \beta_{dec} $...
user avatar
  • 113
0 votes
3 answers
126 views

AES Key vs RSA Key

I am compeletely new to cryptography and recently tried to understand it a bit more thoroughly. My question is: How does the Generation of keys differ in the case of AES and RSA. I understood, that ...
user avatar
  • 1
1 vote
1 answer
56 views

Best practice to create an old-style installation key

All current best practices about creating and using cryptographic keys I've found, refer to creating an encrypted data out of raw data. However, there is (or at least was a few decades ago) a practice ...
user avatar
  • 503
0 votes
2 answers
96 views

How can I dentify the ECDHE group value used in a TLS session

In ECDHE, the group is a public value. I want to get this value for a session. I inspected the session using Wireshark. Under the ServerHello -> Key share extension -> Key share entry, I found ...
user avatar
1 vote
0 answers
28 views

Choice of random in RSA-KEM [duplicate]

This may be nit-picking, I’m not sure so feel free to say so. In RSA-KEM as described e.g. in Wikipedia or this answer, we choose a secret $x : 0 \leq x < n$, and send $x^e \bmod n$ for public ...
user avatar
1 vote
1 answer
62 views

Generate asymmetric key pairs based on keywords such that any public key based on set containing the generating subset is valid

Let's assume we have a ton of users, and each user has a list of fruits they like - Those will be keywords. I want my users to be able to encode any data they store (Let's say, the location of their ...
user avatar
  • 111
2 votes
2 answers
94 views

Why is there a slight mismatch most of the time in X25519 private keys depending on functions used, but public keys always match (same seed for both)?

I'm trying to wrap my head around going from a seed to a SigningKey, and also obtaining a ...
user avatar
  • 97
0 votes
0 answers
39 views

Questions about Blake2x: Its state size (internal state) and its security when generating keys with size more than 256/512bits

I read the Blake2x paper: https://www.blake2.net/blake2x.pdf It says Blake2x can be used to build a "DRBG" (CSPRNG): https://csrc.nist.gov/glossary/term/deterministic_random_bit_generator &...
user avatar
1 vote
1 answer
57 views

AWS IoT - Unique Keys per each device - Data encryption

(Probably not the right board to ask. But here goes) I'm designing an IoT Solution with RPi as client and AWS as the server. On the client hardware, I have an Security Chip that can securely generate ...
user avatar
  • 11
1 vote
0 answers
69 views

Hashing function: Generate unique 3 letters Identifier [closed]

I need to create an id generation function that takes 4-digit number and returns a unique 3-letter identifier. I already have a function that generates a 2-letter id from 3-digit number with some ...
user avatar
0 votes
1 answer
42 views

Issues generating keys/cyclic group for Cramer-Shoup Cryptosystem with OpenSSL

I'm trying to implement a Cramer Shoup cryptography system in C but I've run into problems with generating the keys. From what I have found on the wiki and in other papers, to generate keys for Cramer ...
user avatar
  • 21
2 votes
2 answers
296 views

How is Argon2 used for key derivation? [duplicate]

By my understanding, a key derivation is when you take some data, say a password, and use a function to convert it into a number that can be used as a secret key in say elliptic curve cryptography. ...
user avatar
0 votes
0 answers
52 views

How to decompose a public key into subgroups EC?

Is it possible to decompose the public key into its own subgroups? Suppose we know the order P with which the public key was generated ...
user avatar
1 vote
1 answer
244 views

RSA key generation: why use lcm(p-1, q-1) instead of the totient ϕ(n)?

As far as I can see, generating a private key from two prime numbers p and q, having calculated ...
user avatar
1 vote
1 answer
103 views

HMAC key generation and encoding

I've this piece of .NET code that is based on a Microsoft sample on how to generate a key and sign using HMACSH256. But I've altered the key generation a little bit and also decided to use Base64 to ...
user avatar
0 votes
0 answers
29 views

Is it safe to use the same seed phrase for different cryptocurrency protocols

I want to use the same seed phrase for severl cryptocoins (Bticoin, Ethereum, Nano, etc.). I understand that each protocol has its own phrase length and possibly a different way of generating the ...
user avatar
  • 101
0 votes
0 answers
24 views

How can I change the McEliece main parameters?

I use the Bouncy Castle Crypto API to implement McEliece in Java. I have also managed to encrypt and decrypt a message and it works without any problems. When I use the debugger, I see that the ...
user avatar
7 votes
4 answers
3k views

Can we pick which key is private or public in asymmetric encryption? Do the keys actually encrypt and decrypt a cipher text?

Could you help me better understand how the key-pair works in Asymmetric encryption? I'm studying cryptography at the surface level first. While reading multiple texts and talking with colleagues I'm ...
user avatar
0 votes
1 answer
48 views

Necessity of PBKDF2 in current Setup?

I have a single password which is random bytes that encrypts a database. Right now I am using an encryption scheme of https://gist.github.com/jbtule/4336842. To summarize, we take our one password, ...
user avatar
1 vote
0 answers
77 views

Encryption of data with multiple possible decryption keys

I'm new to the Cryptography Stack Exchange, so my question might be very naive. What encryption algorithms are out there that will allow different decryption keys to decrypt the same piece of ...
user avatar
0 votes
0 answers
85 views

Design an algorithm to generate random session key

good day. I am asked to design the a simple algorithm to generate random session key id of block length of 8 and change continuously every time it refreshes. Is there any simple algorithm to create ...
user avatar
2 votes
1 answer
611 views

How is it possible to derive the public exponent from an RSA private key?

I am gonna write down formulas that I know and use to generate RSA keys. we choose $p$, $q$ $N = p\cdot q$ $\varphi(n) = (p-1)\cdot(q-1)$ choose $e$ such as $1 < e < \varphi(N)$ $e$ is coprime ...
user avatar
0 votes
1 answer
50 views

When using prime factorization for key gen, is there a limit on the size of the prime factors?

If there is a limit, does that leave a limited number of prime numbers that can be used for key gen? And, if that is the case is the encryption system vulnerable?
user avatar
1 vote
2 answers
73 views

What is this meaning disconnected from processes performing key generation or zeroization in cryptography modu

In FIPS 140-2 Part 2:Interfaces and Port in the security policy of product told : 1- "the output data path is provided by the data interfaces and is logically disconnected from processes ...
user avatar
  • 29
1 vote
1 answer
82 views

How feasible is it to guess the private key of libsodium by taking into account generation time?

So suppose you are doing this locally (so no network noise), and know the exact specifics of your processor too. Is it feasible to figure out the private key (while having access to the public-key) ...
user avatar
  • 637
1 vote
1 answer
90 views

Gennaro & Goldfeder Key Generation Protocol

As I am going through the “Fast Multiparty Threshold ECDSA with Fast Trustless Setup” paper by Gennaro & Goldfeder, 2018, I am stumbled by the key generation protocol (Sect. 4.1, p.10): In Phase ...
user avatar
  • 197
0 votes
1 answer
54 views

RSA encryption key conditions

I recently read the RSA cryptosystem but now I confused in key generation phase. According to the Euler's Theorem, we have just one condition: e.d = k.ϕ(N) + 1 where: "e" is encryption ...
user avatar
  • 125
2 votes
0 answers
505 views

What does it mean for “1^n”(i.e., the security parameter written in unary)? [duplicate]

As it is mentioned above, I am confused about “Gen takes as input $1^n$ and outputs a key“. Does it mean that the input of Gen is 1111....111 with length of n?
user avatar
2 votes
0 answers
168 views

Kleptographic attack of ECDSA key generation?

Kleptographic attacks can be designed for RSA key generation, Diffie–Hellman key exchange, DSA/ECDSA signing, etc. Is it also possible for ECDSA key generation? More detailed: Is it possible for an ...
user avatar
  • 121
1 vote
0 answers
49 views

Secret key generation in the BGV scheme in HElib

This question is about secret key generation, based on section 4.7 in the design document: https://homenc.github.io/HElib/documentation/Design_Document/HElib-design.pdf It seems that if $m$ is not a ...
user avatar
  • 21
2 votes
2 answers
206 views

How many low-order bits of an RSA modulus can we safely fix to 1?

It's easy to generate an RSA modulus $n=p\,q$ of $k$ bits with $n\equiv-1\pmod{2^\ell}$, for $\ell$ up to about $k/2$: we can choose $p$ as usual, fix the $\ell$ low-order bits of $q$ to $-p^{-1}\...
user avatar
  • 122k
0 votes
0 answers
30 views

Symmetric and Asymmetric indistinguishabilty experiment

In each of those experiments, we have a function $Gen(x)$ who generates the key or a pair of keys respectively for symmetric or asymmetric algorithms. $x = 1^n$ : I read on other questions that is a $...
user avatar
6 votes
1 answer
145 views

Schnorr groups allowing fast modular reduction, vs GNFS

I'm looking for Schnorr groups allowing fast modular reduction. Say, using the notation in DSA, with 256-bit prime $q$ and 3072-bit prime $p$, and $p\equiv1\pmod q$. Are there standards, RFC, or other ...
user avatar
  • 122k
1 vote
1 answer
197 views

NTRU Euclidean algorithm the inverse of f modulo p

I am very new to the world of cryptography and have just began my research in the post quantum cryptography sector. I have been reading and trying to understand NTRU key generation and am struggling ...
user avatar
0 votes
2 answers
373 views

Diffie-Hellman key generation

We all see X509 certificates with 2048/4096-bit RSA key pairs; however, it is difficult to understand how they work in the DH part of the TLS handshake. At most, they authenticate and sign. DH 4096-...
user avatar
  • 35
0 votes
0 answers
56 views

SHA3_512 as dynamic SBOX generator

I'm creating a substitution-permutation cipher (for learning purposes only of course) and I'd like to implement dynamic SBOXs. The cipher will have a block size of 128, and 32 rounds. These SBOXs will ...
user avatar
  • 421
0 votes
0 answers
87 views

How to generate private SSH RSA key from given primes?

I have two primes and public exponent. How I can generate private key with this values and "ssh-rsa" format?
user avatar
1 vote
2 answers
678 views

Recovery Passphrase Collission for BIP-39 and BIP-44

Referring to the standards of [BIP-39] and [BIP-44]: a 'master password' consisting of 12 words uniformly selected from a 2048-word dictionary corresponds to 128 bits of entropy, that is then used as ...
user avatar
  • 327
0 votes
1 answer
130 views

How to correctly (good practice) generate gpg keys in batch mode (unattended) WITH a passphrase

I'm writing a web interface in PHP to generate keys. I'm familiar with gpg's command line options, particularly --batch. I'm also familiar with PHP's GnuPG API. I can't find a way to safely pass the ...
user avatar