2
votes
1answer
121 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
3answers
98 views

How encryption/decryption works 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 PBKDF2 algorithm (or any such algorithm).For encrypting a file I'll input my ...
1
vote
2answers
144 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 ...
-2
votes
2answers
113 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
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 ...
0
votes
1answer
3k 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 = ...
6
votes
1answer
201 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 ...
2
votes
4answers
974 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 ...
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 ...
0
votes
1answer
229 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 ...
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 ...
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 ...
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 ...
2
votes
1answer
151 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 ...
2
votes
1answer
2k 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 ...
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 ...
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 ...
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 ...
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 ...
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?
9
votes
3answers
970 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
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 ...
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? ...
0
votes
1answer
161 views

Safer k128 key schedule

Can someone explain to me how safer 128's key schedule works? there are many parts that make no sense because they were not described at all in the paper (pages 3 and 5 in the pdf). The second ...
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 ...
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 ...
12
votes
2answers
683 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 ...