Most Popular
1500 questions
29
votes
2 answers
Using same keypair for Diffie-Hellman and signing
Are there any security risks using a single key-pair for both key-exchange and signing?
I'm mainly interested in using Curve25519 for key-exchange and Ed25519 for signing. But similar combinations, such as EC-DH and EC-Schnorr or even EC-DSA with…
CodesInChaos
- 25,121
- 2
- 90
- 129
29
votes
2 answers
HMAC vs MAC functions
I've read definitions of MAC and HMAC, but can't say I've completely grasped the differences.
What are principle differences?
When to use one and when the other?(Typical Use Cases)
Matteo
- 1,171
- 2
- 12
- 23
29
votes
2 answers
How bad it is using the same IV twice with AES/GCM?
I understand that initialization vectors (IV) should not be used twice when using AES/GCM. I am using a counter as an initialization vector. Every time I send out a new packet (I am developing an UDP based protocol that needs packet encryption) I…
Matteo Monti
- 1,477
- 2
- 14
- 19
29
votes
2 answers
Unpredictability of X.509 serial numbers
About X.509 certificates serial numbers the RFC 5280 says:
The serial number MUST be a positive integer assigned by the CA to each certificate. It MUST be unique for each certificate issued by a given CA (i.e., the issuer name and serial number…
Jcs
- 521
- 1
- 7
- 12
29
votes
2 answers
How does a chosen plaintext attack on RSA work?
How can one run a chosen plaintext attack on RSA?
If I can send some plaintexts and get the ciphertexts, how can I find a relation between them which helps me to crack another ciphertext?
user1829
29
votes
3 answers
How is XOR used for encryption?
I am a programmer, so when I hear XOR, I think about the bitwise operator (e.g. 0110 ^ 1110 = 1000).
The mention of "XOR" comes up quite a bit in cryptography. Is this the same XOR as the bitwise operator? If so, how is it used to encrypt a large…
IQAndreas
- 397
- 1
- 3
- 8
29
votes
3 answers
How does a rolling code work?
I have general questions regarding rolling codes. Basically there is a sender and a receiver. Both have a sequence generator. The receiver checks if the received sequence matches the newly generated. An example used is KeeLoq.
Assuming a car opener…
matcauthon
- 393
- 1
- 3
- 6
29
votes
4 answers
Is there a hash function that's more expensive for an attacker than for the server?
Say a server wants to hash a password $p$. It would use a secure hash function $H$ and a unique salt $s$ to hash the password as $H(p,s)$. If one has access to the salt, each password candidate requires one run of the hash function to be ruled out;…
n-l-i
- 1,084
- 5
- 15
29
votes
9 answers
Why not the one-time pad with pseudo-number generator
I am very new to cryptography (so be kind), but I have a question that may seem silly.
If the one-time pad is the perfect cipher and impossible to crack, why would the following algorithm not be one of the strongest:
To encrypt:
generate a random…
dardawk
- 401
- 1
- 4
- 6
28
votes
3 answers
How can I use SSL/TLS with Perfect Forward Secrecy?
I'm new to the field of cryptography, but I want to make the web a better web by setting up the sites that I host with Perfect Forward Secrecy. I have a list of questions regarding the setup of Perfect Forward Secrecy. Here it goes:
Can my choice…
Clay Freeman
- 421
- 1
- 4
- 8
28
votes
2 answers
Why is Diffie-Hellman considered in the context of public key cryptography?
In all textbooks I used the Diffie-Hellman key exchange is under "public key cryptography".
As far as I can see it is a method to exchange a key to be used with a symmetric cryptographic algorithm, so it falls very naturally in the area of symmetric…
Mr_and_Mrs_D
- 383
- 1
- 3
- 10
28
votes
5 answers
Why is it important that phi(n) is kept a secret, in RSA?
Why is it important that $\phi(n)$ is kept a secret, in RSA?
johankj
- 385
- 1
- 3
- 8
28
votes
5 answers
What is the post-quantum cryptography alternative to Diffie-Hellman?
Post-quantum cryptography concentrates on cryptographic algorithms that remain secure in the face of large scale quantum computers. In general, the main focus seems to be on public-key encryption algorithms and public-key signature algorithms - but…
Nakedible
- 1,460
- 11
- 15
28
votes
5 answers
What is Indistinguishability Obfuscation?
I've been studying functional encryption. I recently read that a multi-input functional encryption (MIFE) implies indistinguishability obfuscation (IO).
Can someone please brief me: what is indistinguishability obfuscation (IO), and are its…
user45080
28
votes
7 answers
Is calculating a hash code for a large file in parallel less secure than doing it sequentially?
I would like to improve the performance of hashing large files, say for example in the tens of gigabytes in size.
Normally, you sequentially hash the bytes of the files using a hash function (say, for example SHA-256, although I will most likely use…
Michael Goldshteyn
- 391
- 1
- 3
- 7