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

learn more… | top users | synonyms

138
votes
7answers
10k views

How do certification authorities store their private root keys?

Knowledge of a CA private key would allow MitM attackers to transparently supplant any certificates signed by that private key. It would also allow cyber criminals to start forging their own trusted ...
29
votes
3answers
15k views

SSH key-type, rsa, dsa, ecdsa, are there easy answers for which to choose when?

As someone who knows little about cryptography, I wonder about the choice I make when creating ssh-keys. ssh-keygen -t type, where type is either of dsa,rsa and ecdsa. Googling can give some ...
12
votes
4answers
4k views

What are you doing when you move your mouse randomly during a truecrypt volume creation?

Is that called a 'round' every time you move your mouse when creating a new volume? I'm talking about the screen with the random numbers during the volume creation process. What is the purpose of ...
12
votes
2answers
682 views

How many iterations of Rabin-Miller should be used to generate cryptographic safe primes?

I am generating a 2048-bit safe prime for a Diffie-Hellman-type key, p such that p and (p-1)/2 are both prime. How few iterations of Rabin-Miller can I use on both p and (p-1)/2 and still be ...
11
votes
1answer
5k views

How should API keys be generated?

I want to make sure requests can't be forged and sent on to my server. In order to do this I need to generate an API key per user on my system. The purpose of the key will be to sign requests on the ...
10
votes
3answers
1k views

Why OpenSSL can't use /dev/random directly?

I couldn't find the answer for the reason anywhere, even the wiki page doesn't explain it. This seems like using a PRNG for seeding an another PRNG. The first one (/dev/random) may itself be seeded by ...
10
votes
3answers
349 views

Can I use the same password both for SRP and for client-side encryption?

Suppose a less-than-trusted server is used to store users' confidential data (encrypted at the client side), and both tasks - authentication and encryption/decryption - should be doable with a single ...
10
votes
1answer
3k views

Where do I get prime numbers for Diffie-Hellman? Can I use them twice?

I realise it's very hard to generate suitable prime numbers and generators for the Diffie-Hellman key exchange. What is the best way to generate them? And if I have one, can I use it twice? ...
9
votes
4answers
2k views

Generate cryptographically strong pseudorandom numbers in Javascript?

Is there any good way to generate cryptographically strong pseudorandom (or true random) numbers in Javascript? The crucial requirement: if a.com's Javascript generates some random numbers, no one ...
9
votes
3answers
969 views

Is TDEA (TripleDES) invulnerable to the weak keys of DES?

The key space of DES includes some keys that are weak, which results in a ciphertext that is extra vulnerable to cryptanalysis. Is TDEA (also known as TripleDES) invulnerable to those weak keys? Or, ...
8
votes
3answers
6k views

What is the DUKPT Key Derivation Function?

I'm tasked with decrypting ciphertext acquired from an encrypted card reader. The card reader utilizes DUKPT(derived unique key per transaction) scheme and 3DES encryption. I don't have a problem with ...
8
votes
1answer
551 views

Is a 2047-bit prime weaker than a 2048-bit prime?

I have a safe prime generator I'd like to speed up. I can benefit from a significant performance gain if the high order bit in the returned prime can be either 1 or 0. The returned prime would be ...
7
votes
3answers
228 views

How can I allow acces to encrypted data if only 2 out of 3 users provide a secret?

I want to encrypt data, but make sure that no single user can decrypt the data. Further, it is important not to require ALL users to be present to decrypt. This will allow for some flexibility and ...
7
votes
1answer
828 views

Would it make sense to use Bcrypt and PBKDF2 together?

I've read various opinions about whether Bcrypt or PDBKF2 is a better key derivation hashing method. The answer seems to depend on a lot of complicated factors that are not easy to analyze. Would ...
6
votes
2answers
612 views

What happens if two parties have a same pair of public&private keys

we know that we have to create Private key on server and generate its public key and create a certificate. But what if we get a private key which someone already has. Isn't the security becomes weak ...
6
votes
3answers
272 views

How much added security do I really get with a longer key size?

Imagine I have a cipher which supports keys of 128, 192 or 256 bits. Suppose that there are no vulnerabilities in the cipher regardless of key length. I'm going to use it to encrypt something, and ...
6
votes
3answers
3k views

Generate a PGP key with more than 4096 bits?

I would like to know if generating a PGP key with a number of bits higher than 4096 is possible and if so how?
6
votes
1answer
200 views

HKDF and key stretching

I thought that all key derivation functions would do a key stretching phase, by iterating some kind of process. But I can't see that process in HKDF. HKDF doesn't do key strengthening? If I have a ...
6
votes
1answer
825 views

Select a TripleDES key so that it effectively behaves as regular DES

I'm working with a smartcard (DESFire) that supports both TripleDES and DES. In the specs it is stated that both modes of operation use 16 bytes keys. When the first 8 bytes in the key are identical ...
6
votes
1answer
137 views

Creating a Private Key using Human Intervention

In a hypothetical system, lets say that a design requirement is that people who snoop around the database of a web application (sysadmin gone rogue, or what have you), do not have access to the plain ...
6
votes
4answers
199 views

Relationship of password strength and key strength

I have just started educating myself about cryptography, and while it is mostly making sense, a few things are still eluding me. One being: In systems that take a user's pass-word/-phrase in order to ...
4
votes
5answers
1k views

What does key signing mean?

What exactly does the "key signing" mean? So for example I have a private/public GPG key so that people could send me encrypted e-mail, because they know my public key. But: what does key signing ...
4
votes
2answers
1k views

TrueCrypt and Keyfiles hidden among 500,000 other .pdf files

A question from a newby: I have a USB or Standalone HardDrive with a TRUECRYPT hidden partition on it that needs one or more "keyfiles" and a password to access. What tells the attacker what kind ...
4
votes
2answers
3k views

Creating user specific authentication methods in SSH

I have configured sshd on an Ubuntu server to use key authentication and it is working fine. I had to disable password authentication for key authentication to work. Server is always accessed via ...
4
votes
2answers
100 views

Understanding PRGs: How can we expand randomness?

I am getting a bit confused with the PRGs employed in cryptography. Basically, a PRG is used to expand a random sequence (mostly a key) of length s to a length n>s, still looking random. Now while ...
4
votes
2answers
413 views

Best practice for password-protecting a secret key

What approaches are generally accepted for generating a password-protected symmetric key? My intuition is to generate and store a random string of appropriate length as the password-protected key, ...
4
votes
1answer
727 views

Security issues related to public keys and SSH

Do I have to mind something specific when using public keys and SSH? Well of course, I have to keep my private key secret (and therefore I should choose a strong pass phrase). But is there something ...
4
votes
2answers
136 views

What is the difference between DHE and ECDH?

I learned that perfect forward secrecy is implemented through DHE and ECDH but what is the difference between these 2 key exchanges? Also can someone explain how perfect forward secrecy works? I've ...
4
votes
3answers
237 views

Security in wireless ad hoc sensor network (without physical access)

I want to know without taking physical access, what are the methods that can steal the data in a node. When talking about eavesdropping, how can an attacker sniff the packets? Do they need to listen ...
4
votes
1answer
362 views

Asynchonous Linear Feedback Shift Register : test vectors

Well I've been working on coding LFSR structures for my research projects. Being able to find sources on the subject, I've been able to test a single LFSR with different initialisation and TAP ...
4
votes
1answer
294 views

Size of ECDH-P521R1 Private Keys

I'm trying to set up ECDH-P521 in Java and in Javascript. When using Java to generate a random private key. The generated key is either 1106 or 1107 bytes long (numbers only): This is an example: ...
4
votes
1answer
640 views

AES Key Generation Strategy/Algorithm For Offline System

Let say I have several application that aren't connected to any network, and I have one requirement that says each application could produce a token from an input that other application could validate ...
3
votes
4answers
419 views

Is it safe to have the salt equal to IV?

If I'm using AES-256 CBC to encrypt, getting the 32 byte key using multiple iterations of the PBKDF2 function with a 16 byte salt, is it safe for me to let IV be equal to the salt? (Edit: The salt is ...
3
votes
2answers
298 views

From password to key

Can you explain this passage from Wikipedia? When a password (or passphrase) is used as an encryption key, well-designed cryptosystems first run it through a key derivation function which adds a ...
3
votes
3answers
1k views

Can the salt for PBKDF2 be a hash of the user-entered password?

I want to derive a key from a password in a client application that will be used as a master key that decrypts a data key. As far as I understand the salt should be private knowledge. Would it be ...
3
votes
4answers
398 views

Is it possible to detect SSL private key changes?

I wonder if it would be possible to detect a change of an SSL private key? If you change the key, then I think one must issue a new certificate, but new certificates could be issued without changing ...
3
votes
1answer
163 views

Speed of key generation - Is old hardware safer?

I'm currently generating a new gpg cryptographic key, and I'm using a new laptop for this. I can notice that the key generation step, which involves the random generation, is extremely quick, while I ...
3
votes
3answers
218 views

Could using a generated key from an online service be considered a risk?

With some colleagues we're having a debate regarding the randomkeygen.com website. I do think that there is a security risk using the generated keys of this (or any of this kind) website. Why ? ...
3
votes
1answer
670 views

Key length and hash function in PBKDF2

On this page: http://www.ruby-doc.org/stdlib-2.0/libdoc/openssl/rdoc/OpenSSL/PKCS5.html they make a statement that strikes me as rather weird: Key Length Specifies the length in bytes of ...
3
votes
1answer
102 views

How to reduce the size of a key established with Diffie-Hellman?

When I generate a key with the a Diffie Hellman method (DH), the established shared key will be of the same size as the prime which is used. As far as I have read this should be at least 2000 bits for ...
3
votes
3answers
120 views

Should you notify software vendors that their software has been cracked?

Apologies if this is not the right place to ask this question, I will happily move it to another Stack Exchange site if need be. Before I explain the rationale behind the question, let me clear up a ...
3
votes
2answers
2k views

Import Public Private key pair to a Keystore

I have created a public private key pair using the KeyPairGenerator class in Java. From this key pair I have generated the CSR request using the PKCS10 class which has been sent to a CA for ...
3
votes
2answers
106 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
2answers
186 views

Is a random keyfile more secure than a derived key?

I'm devising an encryption layer for some proprietary cloud storage API. Basically this should act as a transparent adapter that encrypts whole binary blobs (files) on upload and decrypts them on ...
3
votes
0answers
410 views

MPPE-Send and Receive key derivation from MS-CHAPv2

I am trying to get the MS-MPPE-Send-key and MS-MPPE-Recv-key from the MS-CHAPv2 challenge material. I am able to follow the RFCs 2548 3078 and 3079 to the step of getting the GetNewKeyFromSHA() it is ...
2
votes
3answers
2k views

RSA 4096 with AES 256 Encryption Process Using PyCrypto

I have the following process for encrypting and decrypting data in a python script using the PyCrypto module: Encryption - Server A AES 256 shared key is generated Associated IV is generated Data ...
2
votes
2answers
135 views

Reducing crypto-random values to a useless entropy

Supposing I have generated random data from CryptGenRandom (or similar PRNG), at what point does futzing with the values make it not-so-random that it's useless? Or is sufficiently random in enough to ...
2
votes
1answer
135 views

Passing generated keys to another process

I am doing a project in which one process generates a key using a distributed algorithm. I need to pass this key to the calling process or procedure. Generally speaking, one can do this in the ...
2
votes
3answers
571 views

What is the recomended algorithm to create a key from a password?

In my new secret document encryption utility, the key for symmetric encryption = the hash of a random salt and a user provided password. It is necessary to have a slow hash function in order to ...
2
votes
2answers
744 views

Explain real world symmetric key encryption

I'm new to cryptography. While reading about symmetric key encryption, it was mentioned that it requires secret key exchange so that 2 parties can decrypt the ciphertext. Now, using some encryption ...