Stack Exchange Network

Stack Exchange network consists of 174 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

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
12 views

Why do we need a condition e < (p-1)(q-1) in generating the keys in RSA? [migrated]

I think we are so familiar with the algorithm for generating the public and private keys in RSA: Choose two large prime numbers p, q. N = p * q Choose a random integer e such that 1 < e < (p-1)(...
1
vote
1answer
26 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
50 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
50 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
40 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. ...
1
vote
2answers
69 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
65 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
32 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
76 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
80 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
107 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 ...
1
vote
1answer
160 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
28 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
59 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
908 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
247 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
191 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
141 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
63 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
94 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
51 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 (...
10
votes
4answers
1k 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
85 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
356 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
488 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
480 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
1answer
377 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
32 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
42 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
62 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 ...
3
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
656 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
610 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
365 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 ...
-1
votes
1answer
94 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
42 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 ...
0
votes
0answers
241 views

How would I generate a CRC-96 of a files contents?

I have an XML file I want to generate this for. There is a specific reason, a program I use checks the contents against an internal hash and if you change the file it kills the program. But for the ...
3
votes
3answers
101 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
33 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
619 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 ...
0
votes
1answer
4k views

java keytool - how to modify a keystore's Owner and Issuer information?

I have a product that initially used a keystore in which the certificate as the Owner and Issuer information as "unknown". Now for security policy reasons and still guaranteeing back compatibility I ...
2
votes
0answers
83 views

Key Management and Authentication in Note Taking App with Client-Side Encryption

I've been working for some time on a pet project of mine: a note-taking application similar to Evernote with the difference that all content is client-side encrypted. I would like to get some feedback ...
0
votes
1answer
245 views

Generate and add new encryption subkey?

My encryption subkey (but not my signing or other subkeys) expired. How do I generate and add a new encryption subkey using gpg?
5
votes
1answer
1k views

How AWS access key id and secret access key are generated internally

According to AWS's documentation, for accessing AWS resources programmatically or via CLI, you can generate an access key in AWS console like: Access Key ID: AKIAIOSFODNN7EXAMPLE Secret ...
0
votes
1answer
54 views

Would it be secure to procedurally generate passwords based on a master key and an account label? [duplicate]

So the idea would be to have one master password that is combined with a label (key+hotmail) to create a password specific to that account. Now I can have one complex password I can remember but ...
1
vote
0answers
153 views

Vulnerable Keys? CVE-2008-0166 openssl DSA Key Signature Blacklist coverage?

Would the current set of DSA key blacklists detect a DSA key that was generated with openssl on an affected/vulnerable system, BUT whose DSA parameters (dsaparam) were generated on an unaffected ...
5
votes
1answer
459 views

All weak Debian openssl DSA keys

More weak keys? 32768 weak keys can be downloaded for analysis, but are there more? Three times as many? There is much information about DSA-1571-1 openssl -- predictable random number generator. ...
3
votes
2answers
111 views

Proving zeroization

Is there a way to prove a program doesn't leave keys in memory after it exists? Some programs are designed to zeroize sensitive fields after they are used. If you knew the values of these fields you ...
3
votes
1answer
528 views

How to Determine the State of a Random Number Generator?

Its always been said that to get strong cryptographic numbers in computing, a good random number generator is needed. Without a good source of randomness, it could be possible for an attacker to ...
1
vote
1answer
302 views

Router password generation - why do vendors use SSID / Router ID?

We know - for example - that UPC did use the Routers Serial Number and its SSID to generate the default password for a specific router. My question is: Why go through the hassle to correlate the ...