Tagged Questions

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
0answers
6 views

RSA Private Key: set Common Name [migrated]

I create an RSA private key openssl genrsa -out mykey.key 2048 Using a certificate and the generated key, I create a .p12 file openssl pkcs12 -export -inkey mykey.key -in certificate.pem -out ...
1
vote
0answers
81 views

Running openssl s_client with an aes encrypted key fails

I'm trying to verify a 2-way SSL connection using the openssl s_client command openssl s_client -connect localhost:8883 -CAfile ca.pem -cert client.crt -key client.key The openssl s_client fails ...
2
votes
1answer
128 views

Why is using [x] to generate random keypairs a bad idea?

Anyone who has generated large GPG public/private keypairs has come across this annoying message: "Not enough random bytes available. Please do some other work to give the OS a chance to collect more ...
1
vote
2answers
61 views

How to properly transition from standard PGP keys to using subkeys?

When I initially set up PGP, PGPTools didn't prompt me to create separate subkeys, as explained in the article "Creating the Perfect PGP Keypair". Now that I've learned a bit more about PGP, I'd like ...
2
votes
1answer
178 views

What are the typical ways to generate a One Time Password?

I'm looking for the typical ways to generate a One Time Password. I know about the HOTP and TOPT. But, in my case, the problem is that the "server" only has a display as interface and the ...
1
vote
2answers
105 views

Is it possible to find CryptoKey from orginal password and hashed password?

WebsitePanel is a windows hosting control panel that uses a CryptoKey to hash passwords into the databases. We have lost WebsitePanel config file and lost CryptoKey. We have to reinstall WebsitePanel ...
0
votes
2answers
53 views

Can I generate multiple PGP key pairs for later use

I was just wondering if I can generate couple of PGP key pairs and save them for later use or backup. In addition can I be sure that other wont generate and use some of my key pairs in the meantime. I ...
1
vote
1answer
85 views

Generate public key from private key [closed]

Can we generate a public key from a private key?
3
votes
2answers
232 views

Can the human brain generate cryptographically secure random numbers?

A security conscious friend of mine was attempting to generate entropy using random dice rolls to generate a random password, and I became curious about the security of random number generators and ...
0
votes
1answer
76 views

Can i know how chosen ciphertext attack work on textbook RSA

I am very new to cryptography and I am confused with something? Here is the homework question I am having trouble with: Write a program to attack the Textbook RSA Encryption Scheme, in order to ...
0
votes
2answers
97 views

How to combine a key and a password in practice

Alice wants to encrypt her data. She is not comfortable with using only a password. While she prefers to use a properly random crypto key, she isn't confident she can protect the key file from theft ...
0
votes
1answer
83 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
74 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
260 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 ...
2
votes
3answers
105 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
420 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
64 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
116 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
128 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
124 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
32 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
342 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
182 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
710 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
65 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
175 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
54 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
326 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
554 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
163 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
157 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
260 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
87 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
269 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
306 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
89 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
109 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
4k 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 ...
5
votes
2answers
740 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
86 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
297 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
133 views

Is this adaptation of using a One Time Pad safe?

For example, lets say there are two people named, Bob, and Jim. Bob wants to send Jim a long secret message, and he decides to use a OTP to encrypt his message. Both Bob and Jim know a secret ...
2
votes
1answer
500 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
232 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
698 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
180 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
302 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
143 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 ...