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

0
votes
1answer
34 views

How can I generate some public and private keys on both sides with low overhead?

We have an Authority Center (CA) generating some public and private keys for each client (more than one pair for each client). One method for sending keys to client is sharing a secret key between CA ...
0
votes
2answers
62 views

How to generate a superkey to decrypt strings

I'm working on an application where users have a key or password generated by me that is used to encrypt a string. Each user has their personal key, and no user should be able to decrypt another ...
15
votes
4answers
2k views

Is there any reason someone wouldn't use a longer key?

Larger key sizes are said to be more difficult to bruteforce; is there any reason someone would then decide to instead use a smaller key? Is there any negative effect in using a larger key size, such ...
0
votes
1answer
63 views

ECC Public Key length differs from bit representation

A 256 Bit ECC key-pair (256 Bit is supposed to be the length of the public key) generated with OpenSSL using this command from the manual: openssl ecparam -name secp256k1 -genkey -noout -out key.pem ...
0
votes
3answers
56 views

What does the pgp public key length depend on?

What does the pgp public key length depend on? Does a long private key result in a long public key? The longer public key the better; or is it even the private key the crucial factor?
4
votes
1answer
290 views

Diffie-Hellman key exchange

The following image attempts to explain the diffie-hellman key exchange for people not strong in maths such as myself: I do understand how the colour/paint example illustrates the idea. But I'm a ...
0
votes
1answer
50 views

“Reverse” approach to one-time key generation

Suppose we have a master key, and we want to encrypt some file(s). We then generate one-time key for that file, use it to encrypt file contents, and finally encrypt one-time key using master key (with ...
0
votes
2answers
77 views

How to compare encrypted private keys?

Is it possible to compare encrypted private keys if you do not have the passphrase? E.g.: openssl genrsa -out unencryptedprivkey.pem 2048 openssl rsa -in unencryptedprivkey.pem -aes128 -out ...
0
votes
1answer
73 views

Which default encryption does openSSL use?

If I create a private key via: openssl req -x509 -newkey rsa:2048 -out cert.crt then openssl writes the private key to the file privkey.pem and if you do not provide the "-nodes" command it will ...
0
votes
1answer
88 views

Multi user symmetric key encryption

I realize SIMILAR questions have been asked before but I'm looking for certain specifics I can't seem to find elsewhere. The following question closely resembles mine but falls short for me on ...
9
votes
6answers
2k views

Should I hash a password if it is randomly generated

The best practice is we should hash a user password using algorithms such as bcrpyt to protect the user, however, given the following conditions, is hashing in the backend still matters? the ...
0
votes
1answer
29 views

Does methods such as Generalized Mersenne are safe way to find p and q? [closed]

There are many methods for finding very large primes fast. Most of them have complete lists. Is it possible an attacker try to guess that p or q was generated using a such kind of method? If yes, ...
0
votes
1answer
126 views

What is the point to the IPEK in DUKPT?

I'm trying to understand the DUKPT (Derived Unique Key Per Transaction) system used for PIN devices, but I'm getting hung up on the IPEK. This blog post has an image where the sequence is: BDK ...
3
votes
2answers
133 views

Random token and email confirmation key of 10 chars sufficient?

I have a function that returns random unguessable keys with the following characters: a-z A-Z 0-9. I have set the key length to 10 and I am using that for my form tokens to prevent CRSF and I will be ...
2
votes
1answer
358 views

Storing encryption keys on a server using Node.js and MySQL

I am writing a web backend/api for an iOS application using Node.js and MySQL. In my database I have a table for posts. I would like the posts content to be encrypted. Let's say I'm using this AES for ...
1
vote
2answers
60 views

Is it possible to sign/verify a key-pair?

We currently have the need to authenticate and verify generated keypairs. Our system allows users to register for our service which generates them a key-pair for use on our network. We are in need of ...
2
votes
1answer
143 views

Should generating gpg keys ever result in an identical key to an older key?

I recently had a situation where I lost an old private key (write error; realized this too late). In regenerating keys and replacing the public keys on various sites, I noticed that the public keys ...
1
vote
0answers
52 views

Wireless entry systems why not use pre-shared noise?

I think the title question speaks for itself, but here are the details: You have 4 bits for the buttons, 16 bits for the counter, and a fix 16 bit ID. The transmitter would send out these bits plus ...
6
votes
4answers
253 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 ...
1
vote
3answers
270 views

How does encryption/decryption work when one generate random key?

I am new to this and want to ask a basic question. Suppose I used my password (say "ABC123") to generate a key using the PBKDF2 algorithm (or any such algorithm). For encrypting a file I'll input my ...
2
votes
2answers
150 views

safe methods of generating session keys

So I have this web app where I'm supposed to generate my own session key to use in the session manager. I just have few questions about safe approaches to this. I believe to make this safe it should ...
3
votes
3answers
133 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
3answers
242 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 ? ...
0
votes
1answer
77 views

Encryption key generation performance

A question for cryptography experts. Imagine we have a conceptual Notes.app: There are notes (title|content) stored as AES-256 encrypted strings Application has to present a list of all notes ...
7
votes
3answers
256 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 ...
1
vote
2answers
213 views

why are the first few characters of a DSA Private Key similar?

I noticed most DSA private keys often start with the same few characters, MIIBvAIBAAKBgQD . For example, generate a private key on Ubuntu, by running: ssh-keygen -t dsa -N '' -f /tmp/id_dsa This ...
0
votes
2answers
72 views

Difference between key generation and key agreement

Please excuse my ignorance as I am new to information security. Could someone please explain in simple terms what the difference is between key generation and key agreement. In which situation would ...
1
vote
1answer
104 views

Which part is the longest when gerating RSA key pairs?

Whether I use openssll or gnutls's certtool, I end in a single threaded part which take several minutes. When I try to compile the libraries with auto-parallelizer advanced efficient tools. It sill ...
12
votes
4answers
3k 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 ...
4
votes
2answers
281 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 ...
1
vote
1answer
69 views

Is there an advantage to applying pbkdf2 to a key that's used to generate a MAC?

We need to generate tamper-resistant URLs to access a service, which are then shared with the end-user. The URLs don't contain any confidential data, but we need to ensure that they have not been ...
2
votes
1answer
246 views

Using Diffie–Hellman key protocol to create a safe secret key

Let's say, I have a friend far from me and I want to send some secret messages to him. I have to say, I'm pretty newbie in security. That's why I'm wondering, does the Diffie–Hellman key exchange ...
-2
votes
2answers
119 views

Is this a possible solution to the impractical requirements of using a One Time Pad?

For the sake of example, lets say there are two people named, Bob, and Jim. The Problem Bob wants to send Jim a long secret message, and he decides to use a OTP to encrypt his message. Both Bob and ...
2
votes
1answer
337 views

AES key management

I am encrypting a secret in a db field. I am encrypting using AES with a 256-bit key and a random IV per encryption. They AES key is hard coded in the code. Each IV is stored in clear in another ...
3
votes
2answers
167 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 ...
4
votes
4answers
531 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 ...
2
votes
2answers
156 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 ...
0
votes
1answer
234 views

Challenge, Authentication and session key

I programmed an application on Linux using C, I added an authentication and cryptography layer that's going like this : 1 -client sends connection request. -server send a random challenge to client. ...
0
votes
1answer
129 views

Can the random keys generated during handshake be guessed

During the handshaking of an SSL connection, the server sends its public key, the client generates a random password, encrypts it with the pk, and sends it back, then the server decrypts it and all is ...
2
votes
2answers
882 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 ...
0
votes
1answer
91 views

I want to store a large number of relatively short-lived symmetric keys

Each encrypted blob will have a well-defined, but different lifetime. Some will be around for 5 minutes, some for a day, some for a week, none for over a month. I would like to be able to "delete" ...
1
vote
1answer
4k views

Create RSA public, private key pair having numbers generated already

I want to know to to generate working RSA key pair, with correct syntax. Let's say i have already generated somehow my numbers for 512bit key, which are: e = 00065537 d = ...
3
votes
1answer
111 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
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
3answers
3k views

What is the 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 host to authenticate? Could one id_rsa be a malpractice for the privacy/anonymity policies? ...
3
votes
1answer
173 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 ...
2
votes
1answer
95 views

Does padding an AES key hurt security (besides lowering the strength of the key)? [closed]

I've been reading about solitare and its weaknesses, and thinking about clever ways of hiding keys. It seems like you could encode an 52-bit AES key in the vertical orientation of cards in a deck (or ...
5
votes
2answers
125 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 ...
7
votes
1answer
352 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 ...
3
votes
3answers
567 views

Where to get/buy a CSR generated S/MIME certificate

I'm not sure if the question is eligable for this board as I ask for concrete service providers which can be kind of advertisement, but there is also technical issue involved, so I give it a try. My ...