Most Popular
1500 questions
62
votes
4 answers
Why hash the message before signing it with RSA?
The diagram below illustrates the process of digitally signing a message with RSA:
As diagram shows, the message is first hashed, and the signature is then computed on the hash, rather than on the full message.
Why hash the data before signing it?…
evening
- 1,383
- 3
- 15
- 22
62
votes
4 answers
Polynomial-time Quantum Algorithms for Lattice Problems
A new paper, by Yilei Chen, whose title is Quantum Algorithms for Lattice Problems (https://eprint.iacr.org/2024/555) appeared on eprint and it claims to solve hard lattice problems, such as the approximate (gap) shortest vector problem…
Hilder Vitor Lima Pereira
- 7,476
- 1
- 25
- 45
61
votes
3 answers
Hashing or encrypting twice to increase security?
Over on the bitcoin forums I asked why the bitcoin client computes SHA-256(SHA-256(x)) as its cryptographic hash for a variety of purposes. The leading theory--since the bitcoin author has disappeared--seems to be that from a security standpoint it…
maaku
- 711
- 1
- 5
- 4
61
votes
6 answers
Soft question: Examples where lack of mathematical rigour cause security breaches?
Cryptographic tools can often become adopted even when their security proofs lack mathematical rigour - or altogether missing.
Are there famous cases of security breaches in the industry, where the underlying cryptography was (up until then)…
Snoop Catt
- 1,307
- 8
- 14
61
votes
4 answers
Difference between stream cipher and block cipher
I read that
A typical stream cipher encrypts plaintext one byte at a time, although a stream cipher may be designed to operate on one bit at a time or on units larger than a byte at a time.
(Source: Cryptography and Network Security, William…
Ravindra Bagale
- 791
- 1
- 8
- 10
61
votes
2 answers
Understanding the length extension attack
I have been trying to understand exactly how a length extension attack works on SHA-1. I'll detail below what I've understood so far so that I can convey my understanding of the same and hopefully get advice on where I'm going wrong.
Let's assume…
user114
61
votes
8 answers
How does asymmetric encryption work?
I've always been interested in encryption but I have never found a good explanation (beginners explanation) of how encryption with public key and decryption with private key works.
How does it encrypt something with one key and decipher it with…
Senad Meškin
- 621
- 1
- 6
- 7
61
votes
2 answers
What makes a hash function good for password hashing?
Using a cryptographic hash to store e.g. passwords in a database is considered good practice (as opposed to storing them plaintext), but is subject to attacks on said cryptographic hash, assuming the database is compromised.
Which properties of a…
You
- 713
- 1
- 5
- 9
61
votes
2 answers
What are the advantages of TOTP over HOTP?
HMAC-based One Time Password (HOTP) was published as an informational IETF RFC 4226 in December 2005. In May, 2011, Time-based One-time Password Algorithm (TOTP) officially became RFC 6238. What advantages does it introduce?
Jader Dias
- 723
- 1
- 5
- 7
60
votes
4 answers
Why isn’t SHA-3 in wider use?
SHA-3 was released by NIST just over 4 years ago this week. In my experience it does not seem to be as widely used as I might have expected. I see SHA-2 and even SHA-1 more often. What are your opinions on why this is the case?:
RixN
- 792
- 1
- 5
- 8
60
votes
2 answers
What is the difference between MAC and HMAC?
In reference to this question, what are the "stronger security properties" that HMAC provides over MAC. I got that MAC requires an IV whereas HMAC doesn't. I also understood that MAC may reveal information about plaintext in contrast to HMAC. Is my…
TheRookierLearner
- 1,011
- 1
- 11
- 15
60
votes
2 answers
What advantages does Keccak/SHA-3 have over BLAKE2?
Keccak/SHA-3 is new NIST standard for cryptographic hash functions. However, it is much slower than BLAKE2 in software implementations. Does Keccak have compensating advantages?
Demi
- 4,853
- 1
- 22
- 40
60
votes
3 answers
"SHA-256" vs "any 256 bits of SHA-512", which is more secure?
In terms of security strength, Is there any difference in using the SHA-256 algorithm vs using any random 256 bits of the output of the SHA-512 algorithm?
Similarly, what is the security difference between using SHA-224 and using any random 224 bits…
Pacerier
- 1,265
- 2
- 10
- 16
60
votes
3 answers
RSA encryption with private key and decryption with a public key
When using the RSA cryptosystem, does it still work if you instead encrypt with the private key and decrypt with the public key? What about in the case of using RSA for sender authentication?
Humam Shbib
- 755
- 1
- 6
- 4
60
votes
4 answers
Is secp256r1 more secure than secp256k1?
Curves secp256r1 and secp256k1 are both examples of two elliptic curves used in various asymmetric cryptography.
Googling for these shows most of the top results are Bitcoin related. I've heard the claim that…
Satoshi picked non-standard crypto…
ripper234
- 1,077
- 1
- 10
- 13