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

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

How to load EC private key to keystore

I want to load EC private key (private.pem) to keystore. $ cat private.pem -----BEGIN EC PRIVATE KEY----- -------some text ----------- -----END EC PRIVATE KEY----- After reading lot of SE answers, ...
0
votes
0answers
37 views

Can I hide the key pair from the issuing authority?

Let's say I want to issue certificates to create a network of machines authorized to communicate based on my authority as the issuer. But, I want the new key pair to be completely and permanently ...
2
votes
1answer
51 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 ...
0
votes
0answers
20 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
25 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
398 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, ...
0
votes
0answers
89 views

Using RSA private key as AES key for encryption

Example application need: An application pulls down data from a web service and needs to encrypt and persist this data locally to disk. Only this application should be able to decrypt the data stored ...
1
vote
1answer
29 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
83 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
59 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
127 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
122 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
69 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
87 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
84 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
108 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
418 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
29 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
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
278 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
192 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
158 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
75 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
109 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
60 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
107 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
373 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
588 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
556 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
447 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
44 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
65 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
875 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
665 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
412 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
99 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
43 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
261 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
108 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
670 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
5k 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
89 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
290 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 ...