Questions tagged [key-generation]

Key generation is the process of generating keys for cryptography. A key is used to encrypt and decrypt whatever data is being encrypted/decrypted.

Filter by
Sorted by
Tagged with
6
votes
2answers
2k views

Can TPM "Storage Keys" be created outside the TPM?

I am interested in 'adding' preexisting keys to a TPM's storage hierarchy. An example of a desired key hierarchy can be shown as: (SRK)----->(User Storage Key)-------> User Working Key 1 ...
3
votes
1answer
632 views

OpenVPN Key Size 1024 vs 2048 and Eavesdrop vs Access?

OpenVPN recommends using a 2048 RSA key size for greater security, however, the hardware I'm using is somewhat weak and defaults to using a 1024 RSA key size. I'm trying to determine if it's worth ...
197
votes
9answers
118k views

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

Is it better to create a separate SSH key for each host and user or just using the id_rsa key for all hosts to authenticate? Could one id_rsa be malpractice for the privacy/anonymity policies? having ...
7
votes
2answers
2k views

Is "Math.random" the same as "crypto.getRandomValues" (JavaScript security)

This question may be a little off-topic, but is Math.random the same as crypto.getRandomValues? (JavaScript) Here's an example: Math.random(); // 0.11918419514323941 self.crypto.getRandomValues(new ...
25
votes
2answers
20k views

What exactly is a subkey?

I fairly understand the math behind RSA, Elgamal, AES, SHA but not how things are used in practise. How are subkeys different from master key? I understand its purpose from various websites but How is ...
11
votes
2answers
3k views

Why does an encryption key derived from your lock screen password give you stronger protection (in Android 11)?

Why does an encryption key derived from your lock screen password give you "stronger protection" than a key chosen by the machine (or at any rate not derived from your lock screen password)? ...
2
votes
1answer
245 views

How does algorithms ensure public/private keys uniqueness? - RSA

I'm new to security and crpyto, I know that Public/Private keys are generated in a different way depending on the used algorithm, But let's take RSA as an instance (Using prime numbers), Does the ...
1
vote
2answers
103 views

How to detect weak SSH keys affected by CVE-2021-41117

Recently, GitLab[1] and GitKraken[2] notified users about a vulnerability in GitKraken version v in range 7.6.0<=v<=8.0.0. Those versions are affected by CVE-2021-41117[3] and therefore, ...
4
votes
1answer
539 views

Connection between PIN/password and encryption keys in Android

I am trying to piece together some information about the security system in Android. Particularly about how user's password/PIN is connected with encryption keys in file-based encryption mode. I'm ...
0
votes
2answers
172 views

Storing a key in a symmetric encryption for password manager using cryptography module

I am making a password manager and generator. The user creates the login information, and then I hash their password. After that, I generate the password and encrypt the password with a key stored ...
65
votes
4answers
82k views

What are requirements for HMAC secret key?

I'm creating HTTP REST service which will be available over tls only. For authentication purposes I plan to generate JWT token for every user using HMAC HS256. I need a secret key for HMAC. What are ...
1
vote
1answer
72 views

Generate key pair and entropy

I would like to use the method described in https://connect2id.com/products/nimbus-jose-jwt/examples/jwk-generation to generate a key pair in a java application: import java.util.*; import com....
0
votes
0answers
71 views

Almost unattended generation of "a pretty good keypair"

I need to generate quite a lot of gpg-keys for different tasks on my Debian Bullseye (Stable) machine. Also I want the highest level of security while being able to automate as much as possible. ...
0
votes
0answers
63 views

How secure is Identity-Based Encryption and certificateless cryptography?

The above two standards encryption schemes are used to encrypt the messages in different applications. In both cases, a trusted third party is used to create a whole encryption environment, which is a ...
0
votes
1answer
179 views

derived key from email + password?

When deriving a private key from a password, will the resulting secret key be any weaker if the user email is included in the function input? Meaning, user email concatenated with the user password. ...
10
votes
4answers
3k views

How can you securely generate keys on AWS?

Our application needs to generate secure keys for long term storage on AWS using openssl. But I've seen some instance where entropy falls dangerously low on AWS machines and this doesn't appear to be ...
3
votes
1answer
187 views

GnuPG now uses ECC 25519 as default on new key generation - any compatibility issues to worry about?

TL;DR: I'm assuming that if GnuPG made it a default then it should be what we use, but it used "bad" defaults in the past so I'm wondering if there are any tradeoffs to this? More ...
0
votes
1answer
68 views

How to securely encrypt shared data for a dynamic amount of users?

Example: Bob uploads a file to my custom file server locked with a password, which then the file server generates a link for him to share Bob wants to be able to share this data to anyone that has ...
31
votes
2answers
38k views

ssh-keygen: What is the passphrase for?

When using ssh-keygen: What is the passphrase for? Why is it optional? What are the security implications of specifying (or not specifying) one? Below is an excerpt taken from a shell session (...
1
vote
2answers
74 views

Deriving digital signature key pair deterministically from an arbitrary secret

Is there a scheme that let people derive public/private key pair from arbitrary secrets? As you may know, digital signature schemes have versatile use cases. The problem is, the key pair handling is ...
0
votes
0answers
54 views

The hidden perils of trying to handle bad rare outcomes

I vaguely remember some story about some cipher (I think it was 3DES) having some "issue" where if the key happened to be especially bad (like 0x00000...) then the resulting encryption ...
1
vote
1answer
80 views

How is the initial request made to the Access Server in Kerberos?

I'm trying to understand how Kerberos works, in particular how the initial client sends a request to the Access Server. Some YouTube videos I've seen say the initial request is partially encrypted ...
0
votes
1answer
56 views

Generating a DER-encoded DSA public key of a particular file size

I am reverse engineering a binary that contains a raw, DER-encoded X.509 certificate containing a DSA public key. I want to replace this certificate with one that I have generated so that I have ...
2
votes
1answer
2k views

How to actually calculate Pairwise Transient Key?

I have following information: PTK-Pairwise Transient Key: A value derived from PMK, Authenicator nonce(Anonce), Supplicant nonce(Snonce), Authenticator Address, Supplicant Address. This is used to ...
1
vote
1answer
117 views

Key pairs extension / version

I read in some docs, there are several version of GPG key extension available. For ex: gpg, ascii, p12 I know .gpg extension is in binary, and Ascii is in text. But I want to know their differences ...
1
vote
1answer
160 views

How can we use a symmetric key for signing data on TPM2.0?

I am trying to sign some data with a symmetric key AES128 on the TPM2. However, I get this error during the signing ERROR: Unknown key type, got: 0x25 ERROR: bad signature scheme for key type! ERROR: ...
7
votes
2answers
2k views

TPM or OpenSSL for key generation?

I would like to know which method is more secured. I know that they can be combined, but I would like to understand why TPM or OpenSSL might be a more secure technique to generate (encryption, ...
1
vote
1answer
266 views

How to convert 64byte openssh-key-v1 to the resulting 32byte ed25519 private key

I wrote an openssh-key-v1 Protocol reader and extracted all fields according to the format definition: "openssh-key-v1"0x00 # NULL-terminated "Auth Magic" string 32-bit length,...
0
votes
0answers
39 views

How does collecting mouse movements increase cryptographic strength? [duplicate]

Excuse me if this is obvious, but while encrypting one of my disks, I got bored and read the text on the window. And the question came to me, how the heck can I move a mouse in a way that a computer ...
1
vote
1answer
66 views

Private keys with or without password for webservices?

What is the industry standard on this matter? How do you handle the keys for your websites, apis, micro-services, etc. If I create private keys without password they will be 100% compromised if one ...
0
votes
0answers
103 views

symmetric key generation in TLS 1.3

Am trying to understand the phase where the symmetric key is getting generating. From what I am understanding Diffie-Hellman is used to derive the symmetric key in TLS1.3 I am reading this tls ...
0
votes
1answer
85 views

Difference between these two extracted public keys?

I generated an RSA Private Key using openssl genrsa -out mykey.pem 2048 To extract the public key I have found 2 commands, one using openssl : openssl rsa -in mykey.pem -pubout > mykey.pub And the ...
15
votes
2answers
868 views

What research suggests that user's mouse movements are (not) sufficiently unpredictable for secret key generation?

I have not been able to find any credible source which tried to prove or disprove the randomness of mouse movements. A Google Scholar search for "mouse movement entropy" gives surprisingly few ...
3
votes
1answer
307 views

Are many rounds of SHA needed for a random veracrypt key

Assume that I've used white noise from the classic "zener breakdown" circuit to produce 512 bits of random data. If I use these as the key to a Veracrypt volume, is there any benefit to running 200,...
1
vote
1answer
104 views

Android hardware Keypair Info

Basically I would like to use Android Keystore to sign requests going to a server from an Android phone. My goal is to have a way of verifying the origin of the request. Does Android Keystore offer ...
0
votes
3answers
351 views

Does a X.509 Certificate contain an ID of the Private Key?

Does a X.509 Certificate contain some kind of ID that is associated with the Private Key that was used to create the Certificate? So if i had a database of all my Private Key IDs, i could then look at ...
8
votes
1answer
421 views

Why we are still required to move the mouse when generating the keys in VeraCrypt?

During the setup of a new encrypted volume, the VeraCrypt requires a random mouse movement within the window. If someone looking from the outside can see that a monkey sitting in front of a computer ...
1
vote
0answers
46 views

Reusing content-encryption key in cms enveloped data

OpenSSL keeps the structure CMS_ContentInfo opaque and in the case of enveloped data generates and manages the content-encryption key completely by itself. It is not possible to provide a content-...
0
votes
2answers
1k views

Is User Account Login Related to BitLocker Encryption Key

When I enabled BitLocker on my system-drive, I wasn't asked to select an unlock-method. I didn't have to enter any new passwords/keys. I only selected a few options for the encryption, and the process ...
0
votes
0answers
108 views

Client-side encryption of data, but the server can also add data without reading stored data

For a new application I'd like to store messages for each user's account on a centralized server. The user accesses the application through a SPA javascript web app through their browser. These ...
1
vote
1answer
499 views

gpg --quick-generate-key user-id [algo [usage [expire]]] - Any way to include a comment?

I am doing some unattended key generation using --quick-gen-key and --quick-add-key. I am not clear if the user-id mentioned in the man page offers a way to include a comment: --quick-generate-key ...
0
votes
0answers
73 views

Does hashing client-side increase attack surface (assuming TLS and serverside salt+hash)? [duplicate]

This question asks whether one should hash on the client or the server. I want to know if there is any reason, aside from having to maybe handle one extra hashing library (if it's not already in your ...
0
votes
1answer
385 views

gpg: How do we Cross-Sign Keys? (--default-key vs. --local-user)

I'm trying to figure out how to cross-sign two keys. One reference says we should use: gpg --local-user 0xfedcba98 --edit 0x76543210 sign gpg --local-user 0x76543210 --edit 0xfedcba98 sign That's an ...
0
votes
1answer
118 views

What's a secure way to generate a keypair from a secret password?

I like to generate a public-private key pair that is seeded from a string. So having the string and the generation algorithm is enough to recreate the keys. I want to do this because I can then ...
11
votes
1answer
8k views

Which ECC to choose with GPG?

I want to generate a key pair with gpg2 2.1.11 and libgcrypt 1.6.5. I use the command gpg2 --expert --full-key-gen. This allows me to choose an ECC: Please select what kind of key you want: (1) ...
0
votes
1answer
137 views

Is there any added benefit to using a random keyfile of more than 512 bits?

Most of the online guides I found about using dm-crypt with a random keyfile use files bigger than 512 bits (64 bytes). For example: dd bs=512 count=4 if=/dev/urandom of=keyfile iflags=fullblock As ...
2
votes
2answers
108 views

Password relevance in key derivation function

I'm questioning the password used in a key derivation function, whether It makes sense to make it unique for every generated symmetric key and why
0
votes
2answers
118 views

Is it OK to use two halves of a key independently?

If I ask AWS Key Management Service for a 64-byte key, is it OK to split it in half and use each half as a separate key? e.g. the first half for encryption and the second for HMAC? I figure that it ...
0
votes
1answer
206 views

How does winrar know I typed the right key?

As far as I know WinRar uses the password you type and derives the key from it. But how exactly does it check if the key I typed is correct? What I think is that it compares your guess with the right ...
0
votes
1answer
1k views

Where to locate my private key to SSH?

In my understanding, to ssh login to my server, I need a private key: However, the key I get when generating seems to be a public key: Do you know where to locate my private key? Manually ...

1
2 3 4 5
7