Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
38 views

Which encryption algorithm for cloud backup?

I want to backup my data to the cloud. Before that, I want to encrypt it using GPG (gpg (GnuPG) 2.2.11 and libgcrypt 1.8.4). The backup is just for me, so I don't care about interoperability I only ...
6
votes
1answer
225 views

Preparing to change over to new GPG-key - what to do with my old ones?

I've just created a new off-line GPG-key with a sign/certify master-key and two sub-keys - one for signing and one for encrypting. 5 yr expiration for the master, 2 yr for the subs. My master-key got ...
16
votes
2answers
281 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 ...
0
votes
0answers
54 views

Generate symmetric key programmatically using openssl EVP

Am learning OpenSSL EVP API and trying to understand the ways to generate a symmetric key using OpenSSL EVP in C++ program. I have two questions in this regard: 1) To understand what the command ...
0
votes
2answers
139 views

How to generate the most secure private key? [closed]

I need to generate the most secure private key. Usually I use a command: openssl genrsa -des3 -out mykey.key 2048 Is triple DES secure enough? Is 2048 large enough? Are there any other ways to ...
0
votes
2answers
83 views

RSA generating private and public keys

I'm trying to implement RSA encryption in PHP. I'm stuck at generating the public and private keys. I have P = 61, Q = 53, MOD = P * Q = 3233, N = (Q - 1) * (P - 1) = 3120. How do I chose the value ...
0
votes
1answer
128 views

Key Encryption / Obfuscation

I got a GUI Program, which loads the Logic from a webserver if the entered License Key is valid. The actual connection string I hexed and xor'd with a secret key. (which is unfortunately static) The ...
0
votes
2answers
185 views

Rotating encryption keys - how does it work?

I haven't found a duplicate which explains with sufficient clarity how does the process of rotating encryption keys work in simple layman terms. I know how private/public key cryptography works, I ...
2
votes
1answer
80 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
1answer
53 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 ...
1
vote
0answers
33 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 ...
1
vote
2answers
557 views

Details of a good WPA2 pre-shared key (password)?

From the following answer, I understand a strong pre-shared key must be 15 characters at minimum and randomly generated: https://security.stackexchange.com/a/56646/37051 However, from other reading, ...
2
votes
2answers
68 views

Security Appliance Key Generation

For devices like decrypting HTTPS proxies, there is often a built-in mechanism for generating a key-pair and CSR. An admin can then have their in-house authority sign the CSR with a subordinate CA ...
0
votes
1answer
216 views

Server-side encryption mechanism (Nextcloud)

I've been looking around how server-side encryption works. Thanks to the nextcloud doc I understand the implementation. Basically, when you first log in a key pair is created, and the private key ...
0
votes
0answers
101 views

Compatibility advantages of RSA-4096 over RSA-3072

I am targeting a security level of 128 bits for GnuPG, so I am using SHA-256 and AES-128. Now I need to choose between RSA-3072 and RSA-4096. According to multiple sources RSA-3072 security level is ...
1
vote
1answer
711 views

Is the JDK standard EC KeyPairGenerator suitable for use with both ECDSA and ECDH algorithms?

I've seen various references on the web for generating Elliptic Curve KeyPairs in Java, and the two most commonly referenced examples (unsurprisingly) use the JDK default provider and BouncyCastle. ...
2
votes
2answers
312 views

Should the client or the server generate the client's public-private key pair?

Say I have a mobile messaging app. There is a central server that manages stuff (like a directory of users, onboarding, etc.) and there are all the clients. My app is professional, so it uses ...
-2
votes
1answer
75 views

Does a private key file created with a passphrase need to be decrypted before use

Let's say that I have created a private key file with some passphrase in ssh-keygen. Now someone sends me a message encrypted with my public key. To decrypt the message I need a private key. Do I ...
0
votes
1answer
34 views

Remote host identification is different on different networks

When I ssh to a server - let's call it x.x.x.x - over one network, Network A, I get a message that the remote host identification has changed. If I use one of two other networks - call them Network B ...
0
votes
1answer
112 views

Using the user's GUID-id as a salt for Rfc2898DeriveBytes

I use the Rfc2898DeriveBytes for creating an AES key for protecting the user's data. For the salt value I would like to use the user's id, which is a guid. My understanding is, that the only drawback ...
2
votes
1answer
92 views

Secure Key Storage

We have a security solution that is deployed on premise to companies with big technical infrastructures. We do real time vulnerability/configuration assessment of all critical assets in the network. ...
2
votes
2answers
111 views

Error tolerant password from quiztest

I want to use gpg with a symmetric password for encrypting a message. How to do this is explained here in the forum itself, but also in the internet. I'm aware that a symmetric key has the general ...
4
votes
1answer
2k 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 (...
0
votes
0answers
30 views

What is the process by which the OpenSSL utility generates a symmetric key from a password? [duplicate]

In the book Network Security with OpenSSL from O'Reilly Media, it says that when you provide a password for a symmetric cipher, the OpenSSL command line utility generates a key randomly from the ...
0
votes
1answer
68 views

Key Generation on FIPS device or using SW with FIPS generator

I would like to understand the difference between these two options how to generate AES key. AES key is generated directly in FIPS 140-2 Level 3 device with validated AES algorithm AES key is ...
1
vote
0answers
1k views

Using PBKDF2 for hash and AES key generation implementation

I am writing a Java application that is required to locally authenticate a user with a password and then use the password to generate an AES-256 key for local file encryption/decryption. I understand ...
5
votes
2answers
327 views

Generating temporary passwords/tokens using RNG

In my web application I generate temporary tokens/passwords for accessing files using this method: ALPHABET = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_" ALPHABET_LENGTH = 64 ...
1
vote
2answers
193 views

Is it safe to hide secrets this way?

I have n secrets to hide, my goal is to remember only a seed and derive them from the seed. Is this a safe aproach? Calculate n keys: k(1) = seed XOR secret(1) ... k(n) = seed XOR secret(n) Store ...
3
votes
1answer
185 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,...
3
votes
0answers
82 views

EAP-EKE with RADIUS, is the derived key useful?

If someone run a successful EAP-EKE for authentication with a RADIUS Server, the client will end up being authenticated (will have access to the network) and will have in place a session key that at ...
0
votes
1answer
162 views

SSL/TLS - Does the client select symmetric key for data encryption?

After reading the excellent answers here and documents about how SSL works. I have a doubt about what the function of the ClientKeyExchange step is. In the above linked answer and document it says ...
0
votes
1answer
67 views

Reverse a key diversification algorithm

What are the possible ways of reversing a key diversification algorithm? This is used to generate a different key for each user. I know the operands involved (three 4 bytes values) and the result (...
11
votes
4answers
3k views

What's the best length for randomly generated passwords? (Security vs. compatibility)

It's generally recommend to use a unique password for each online service, a random password generator to create them and a password manager to store them. I've started to replace all my online ...
1
vote
1answer
191 views

When generating PKI key pair with a smart card, who decides if the key is exportable?

I'm in the process of obtaining a code signing certificate from a CA that requires the use of a smart card for the generation of the PKI key pair. However, I would like to be in the possession of the ...
0
votes
1answer
454 views

Generating debian SSH keys with Python (paramiko library)

I'm creating a python script that generates SSH keys for my raspberry pi SD card installation before I boot the SD for the first time, so I can get the fingerprints without having to boot it for the ...
1
vote
2answers
808 views

Which keystore type is good for java / Tomcat based applications

Our application is based on Java and Tomcat server. Which type of keystore is better ? does JKS or PCKS12 ? I understand JDK keytool by default creates JSK type then for which uses-cases one should ...
0
votes
1answer
749 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 ...
0
votes
2answers
517 views

Generating RSA keypair (safety/performance) in REST service

There is a REST API service. An endpoint is responsible for creation of user accounts. Each user is supposed to have an RSA keypair generated and stored on a server. To protect the private keys from ...
1
vote
0answers
34 views

Are all categories of assymetric key generation applicable to all categories of assymetric key exchange? [closed]

Context assumption and aim: Using asymmetric crypto to help Alice and Bob (members belonging to the same basketball club. The club has its own servers) to communicate together without the ...
0
votes
0answers
50 views

Derive Asymetric Key Pair from Password and Salt [duplicate]

I may have just invented a new security tool, but I would prefer to find a standard or tool for this already made. Ideas are easy, finishing is hard. Process: Salt (and thumbprint) is provided from ...
1
vote
2answers
68 views

Generating partical Eliptic Curve Diffie-Hellman keys [closed]

I want to generate a pair of ECDH keys (64 bytes each), where the first 12 bytes of the public key will suit my format. For example, if I have a unique sequence "13456789ABC" I'd like to use it as ...
4
votes
0answers
2k 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) ...
1
vote
2answers
1k views

Why are hardware based random number generators considered better than software based generators?

Hardware based random number generators (RNG) get their randomness from the noise around. Software based generators get this usually from user input, like moving the mouse over a screen (like ...
5
votes
2answers
811 views

Securing data on Android app using a 6 digit PIN

Lets say that on an Android app the user has to enter a 6-digit PIN on startup. Let's also say that we have some sensitive data in this application that we'd like to encrypt. The way I would to this ...
3
votes
1answer
512 views

Vulnerabilities of using HMAC of random ID as shared secret?

Assume that a server has a random secret key, uses it to generate <id = random(), secret = hmac(id, key)> credential tuples, and hands these <id, secret> tuples out to clients freely (over ...
0
votes
1answer
103 views

What's the minimum access code length considered secure?

I'm building a remote management software that will allow remote access to work equipment. To get access, the user will have to enter a code which is shown on the device to be accessed. The user will ...
1
vote
1answer
44 views

Which public key encryption method should I choose to sign?

I need to sign a basic string of information (e.g. seq number:host:port:id:TTL), which is about 50 characters. I want to use public key encryption for the signing of this, so that any other party can ...
3
votes
3answers
113 views

Does the strength of a password depend on the process which generated the password?

In this question, discussing whether http://howsecureismypassword.net is safe to use, @ThomasPornin commented "Mathematically, the strength of a password depends on the process which generated the ...
1
vote
1answer
34 views

Generating many keys: how many CSPRNGs to use?

Say I want to create many random AES keys and have access to a secure source of random numbers SecRand. I see two extremes of how I could write a key factory. Use the same random source for all keys:...
1
vote
0answers
778 views

How to create most secure SSH keys and D-H moduli on standard Linux PC?

These are two questions so closely related that I am asking them together - hope that's OK. When I create new SSH keys (e.g. with ssh-keygen -t rsa -b 4096 or ... 8192); and when I create new prime ...