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

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
112 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
174 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 ...
142
votes
7answers
11k 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 ...
5
votes
2answers
126 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
354 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 ...
11
votes
3answers
382 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 ...
2
votes
1answer
146 views

Where can I find resources to help me implement a key server?

I would like to implement a fairly basic but nonetheless robust key server for generating and managing symmetric encryption keys. Are there guidelines or best practices out there that I should peruse? ...
2
votes
2answers
2k views

DUKPT - Sample data other then in X9.24

I wrote some code that does PIN encryption/decryption according to rules in X9.24. It works great with examples provided in ANSI doc, but doesn't work with actual device from the client. Where can I ...
0
votes
1answer
581 views

Does ssh-keyscan tell you if a server supports RSA or DSA keys?

A question came up on the Unix & Linux SE site: Checking if passwordless ssh authorization is possible without permission for sshd_config?. I immediately thought you could possibly infer this ...
4
votes
2answers
2k 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
1answer
411 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: ...
9
votes
4answers
3k 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 ...
3
votes
1answer
913 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
4answers
480 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
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 ...
2
votes
4answers
1k views

SSH: reusing public keys and known-man-in-the-middle

Usually, people recommend to use a single private-public key pair everywhere (if we're not talking about a possibility of compromising the private key): Best Practice: “One per-user ssh key” or ...
3
votes
2answers
220 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 ...
2
votes
1answer
147 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 ...
0
votes
4answers
1k views

Does a renewed certificate open old messages?

I have a digital certificate that I use to exchange messages with peers, my certificate expiration date is due next year, suppose I renew this certificate before it expires, will I be able to open the ...
0
votes
2answers
390 views

Network security: Public and Private keys

In Pretty Good Privacy, it is said that Sender sends compressed message and encrypts the message with the private key of himself. And then Receiver will decrypt that message with the public key of the ...
6
votes
3answers
290 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 ...
4
votes
3answers
245 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
2answers
485 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, ...
0
votes
1answer
248 views

How key_derivation and key_verification functions are implemented of a 7-zip archive's encryption mechanism?

I am curious about how password recovery works for password protected files. And I want to know the exact flow of the 7-zip encryption mechanism :) !! 7-zip uses the AES-256 encryption algorithm in ...
4
votes
1answer
698 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 ...
9
votes
3answers
7k 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 ...
11
votes
1answer
7k 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 ...
4
votes
1answer
379 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 ...
12
votes
2answers
741 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 ...
4
votes
2answers
4k 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 ...
7
votes
1answer
859 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 ...
2
votes
1answer
162 views

Inner Workings of Public Key Encryption

After watching this video explaining PKE with tennis balls (interesting), it left me with a few particular questions that I'm having trouble finding answers to: I assume that they keys used to ...
1
vote
2answers
133 views

Can a biometric device serve as a user based entropy source?

I am wondering if a biometric device can be used to generate some entropy or key material that would be stable across each authentication. The contrary would be for biometric devices to act like an ...
2
votes
1answer
3k views

Is your PGP passphrase used to decrypt an encrypted private key, or needed in conjunction with the private key to decrypt the message?

If the former, then if the private key can be used to digitally sign messages, why doesn't your client offer to encrypt this highly sensitive piece of data? If the latter, then if someone had access ...
2
votes
1answer
2k views

Convert RSA public key to the right format

I need to send a public key to my bank. I'm using CoreFTP which allows the generation of keys using RSA. It says that it generates "OpenSSH compatible certificates [sic]" when you press the generate ...
0
votes
2answers
286 views

What are the pitfalls while generating a random number from a random data set?

I am relatively new to the GPG key system and I have been been learning about the system through experimentation. I now know that while generating a random seed for the key generation, the random ...
2
votes
3answers
617 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 ...
4
votes
1answer
821 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 ...
6
votes
2answers
653 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
1answer
964 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
142 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 ...
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 ...
9
votes
3answers
1k 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, ...
2
votes
1answer
1k views

RSA Key Pair generation with Javascript

I need to generate a RSA key pair with Javascript. This key pair will be used for encrypting a one time blob of data (20-100kb), then discarded. This data can be reduced to a couple of hundred kb or ...
2
votes
4answers
460 views

Hash/Digest of string; multiple clients and reverse lookup must be impossible

Ok so i need a technique (could be a system or just an algorithm) to generate a hash/digest of a string on a client app without me (admin of a server app) being able to determine what the original ...
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? ...