# All Questions

76 views

### What is the fastest modular reduction algorithm available?

I have been browsing for the fastest and most efficient modular reduction algorithms and came across quite a few. But the one in A Fast Modular Reduction Method (2014) by Zhengjun Cao, Ruizhong Wei ...
430 views

### Applicability of birthday attack to AES brute force

Is the following snippet from a recently published cryptography book correct? EDIT: Expand the snippet from the book to make the context (symmetric key search) more clear. You can apply this to ...
83 views

### Understanding WPA2 authentication in details

As far as I know, WPA2 authentication consists of a 4-way handshake. The first message is from the AP, containing the ANounce, a random number generated by the AP, The second message is from the ...
91 views

### Why do the subexponential algoriths for the DLP not work for the ECDLP?

Elliptic curve cryptography is much more secure for the same parameters because attacks that work on the DLP do not work on the ECDLP. Why do the attacks fail in the latter case?
71 views

### k(k-1)/2: Combinations and the Birthday bound

Disclaimer: I'm new to cryptography. Background: I'm reading Cryptography Engineering by Ferguson, Schneier, and Kohno, where, in Chapter 2, the authors write this: Question: What is $k(k-1)/2$ ...
31 views

### How do we calculate DHKey using A's public key and B's private key?

I have 2 set of public/private keys. I would like to know how I can calculate DHKey. e.g: ...
36 views

### Are there any historic examples of breaking the one-time pad because of a careless key re-use? i.e simple attack on a multiple-time pad?

It doesn't have be using a truly random key, (it could be the Enigma) but the attack must be based on XORing two parts of ciphertext.
80 views

### Is it okay for a non-cryptographer to submit crypto code to an open source probject? [closed]

I am not a cryptographer, nor do I claim to be. However, at times I have wanted to contribute to open source cryptography projects such as libsodium. The maintainer of libsodium is a cryptographer, ...
170 views

### Implementing hmac+bcrypt in bash script

I was recently reading Mozilla's Secure Coding guidelines and found their password storage method interesting. They combine an hmac hash of the password with bcrypt which allows for added security ...
38 views

### DES_cblock and Key Recovery

I'm trying to get my hands on the key that OpenSSL uses for a DES encryption. The key is based off a random number generator with a seed taken as parameter. The code used is below, provided as part ...
41 views

### What information about the ciphertext can an attacker discern if a key is used too many times?

Suppose that I use Blowfish or XTEA (both secure block ciphers with 64-bit block size) in CTR mode. In these cases, I need to change the key after $2^{16}$ blocks to avoid leaking information with ...
33 views

### Are timing attacks exploitable if each key is used only once?

Suppose that one performs (for example) AES-GCM encryption and decryption using an algorithm that is vulnerable to timing attacks, but each key is used only once. Is it still possible to perform a ...
88 views

### What does the comma mean in m, c := E(K, m)

Disclaimer: I'm a beginner to cryptography. Background: I'm reading Cryptography Engineering by Ferguson, Schneier, and Kohno, where the authors use this image: Question: What do the commas mean ...
112 views

### Differential Cryptanalysis for Hash functions

How is differential cryptanalysis used to attack hash functions? I've been struggling through a couple academic papers and thesis's on the subject but they all sound like greek to me. Does anyone know ...
21 views

### C implementation of GEA/3 [closed]

Can somebody please point me to an implementation of GEA/3 (an encryption algorithm) in a high-level language (preferably C/C++)? I looked for a while but could only find block diagrams and ...
39 views

### How would the opponent defraud this secure communication?

I am new in the cryptography and the information security problems, I try to understand things as much as I can and I know it's really complicated in the beginning. Considering the communication ...
84 views

### Does a stream cipher provide perfect secrecy?

From WAR10CK here: If I actually do create a machine using RC4 or AES-CTR and have a TRNG continually feed it a constant steady stream of random bits. Provided that the stream of bits is purged ...
61 views

### Difficulty to find any preimages $a$ and $b$ for given $V$ so that $H(a) \oplus H(b) = V$?

Suppose I have the values $a$, $b$, and $V = H(a) \oplus H(b)$ with inputs $a \neq b$ and $H$ being SHA-224. None of these values are a secret. How secure is it to assume that no other possible values ...
74 views

### Shouldn't a signature using ECDSA be exactly 96 bytes, not 102 or 103?

Attempting to use openssl to create a signature is confusing on several levels: If I'm using it to sign a hash that I've already created (HMAC-SHA-384-192, specifically), a. why must I specify ...
75 views

### Historical algorithm which is frequency analysis resilient

Long ago, I've read an article on wikipedia which describe a cipher algorithm, used by kgb (if I remember well) with the property that all ciphered letters has the same (or nearly) probability to ...
40 views

### What do associated data and message numbers mean?

I'm reading an article about authenticated encryption and don't understand some inputs to an encryption function. They are associated data, public and secret message numbers. Can you explain me their ...
58 views

### Practicality of codebook in current-day secret communications

Codebook appears, if I don't err, to be an antiquitated topic rarely touched upon in discussions of modern cryptography. Couldn't codebook nonetheless be of high practical utility and even be ...
49 views

### Universal reencryption for signatures

Universal reencryption is an interesting encryption primitive. Attempts to build signatures schemes or protocols with authentication incorporating it have frequently failed though. A plausible ...
29 views

### Does extra encryption improve the security of CBC and CTR?

I am learning about cryptography and during my research and reading I had a question. When looking at information leakage and CBC mode, I asked if there is a way to improve this with by using the ...
75 views

### How to perform AES MixColumns as matrix multiplication in GF(2) (boolean values)?

AES MixColumns is done by multiplying a $4 \times 4$ matrix and a column of the AES state (a vector). Addition and multiplication are done in $\operatorname{GF}(2^8)$. In the paper White-box AES, the ...
85 views

### How to decrypt RSA if ciphertext is less than the modulus and e=3?

I'm given a public key. Using openssl rsa ..... I got the public key has the exponent as 3. When I calculated the size of the ciphertext, it is 8 bits smaller than the 2048-bit modulus. How can I ...
16 views

### How does the speed of fast stream ciphers compare to non-cryptographic PRNGs?

Modern stream ciphers are so fast that I am wondering if they are good choices for non-cryptographic applications. Specifically, I am wondering how much slower optimized ChaCha8 or hardware-...
282 views

### Is there any reason to use RSA or DSA when we have ECC?

I am having trouble coming up with a use case for RSA or DSA. It appears that ECC is better in every way. Is this true? I am looking for cases where RSA/DSA is superior to ECC, not where it is used ...
184 views

### Is it secure to send the hash along the message without encryption?

Lets suppose Alice send to Bob a message $M$ along with its hash value say $H$ which is calculated using SHA3 algorithm. It is sent on the network where it got read by Eve and she does not make any ...
227 views

### How is a per round key generated in DES algorithm?

I am reading over a slide that I found online regarding the DES algorithm for encryption and I am a little confused about the per round key generation. From the slide below, I understand that each per ...
53 views

### Gaussian function in lattices

Probability density function of gaussian distribution is $$1/{\sqrt{2 \pi} \sigma} \times {e^{{(x-c)^2/ 2{\sigma}^2 }}}$$ in lattices we assume $$\sigma =s/\sqrt{2 \pi}$$so the gaussian ...
77 views

### Advantages of HS1-SIV over ChaCha20-Poly1305-SIV?

What advantages does HS1-SIV have over ChaCha20-Poly1305-SIV? I know that both use the ChaCha stream cipher, but I am trying to understand why HS1-Hash is a better MAC. Edit: To hide the Poly1305 ...
62 views

### Effective key length of Two-Key Triple-DES

What's the effective key length of Two-Key Triple-DES, for some (possibly several) reasonably well-defined and sensible definitions of effective key length, say assuming attack using ample chosen ...
126 views

### Is all of encryption based on xor?

For a long time I've been under the impression that all of encryption uses xor at its basic level. Is this true? What other method could be used to encrypt plaintext with a key? Asymmetrically, as ...
24 views

### Is RSA safe anymore? [duplicate]

Some people may have heard of Shor's algorithm. It allows for integer factorization on a quantum computer. This wasn't a problem a little while ago since we didn't have any quantum computers. Google ...
43 views

29 views

### Is it okay to bail out early when length mismatch is detected?

Is it okay to bail out early when length mismatch is detected? Specifically, when verifying authenticated encryption, is it okay to bail out early if the wrong amount of ciphertext or the wrong ...
103 views

### Do 2DES and 3DES2 have the same effective key length?

I am following the notes "Introduction to Modern Cryptography" by Bellare and Rogaway, and on the chapter about blockciphers there is the following claim (page 11 of https://cseweb.ucsd.edu/~mihir/...
134 views

### AES implementation to encrypt files

I'm making a small python program to encrypt an arbitrary text file. Currently I have a file to store passwords (hashed values), so nothing stored in plaintext. The user enters the command line ...
50 views

### Order and cofactor of the base point? [duplicate]

What is the order and cofactor of a base point? Is it possible to deduct the order and cofactor, given just the basepoint. What about the other way around from order and cofactor to basepoint?
67 views

### How does the verification process associated with this signature scheme work?

My cryptology professor asked us to show that while the following signature scheme is conceptually valid, that it is inherently insecure, however, I am not sure how to demonstrate that the associated ...
50 views

In the ideal/real proof paradigm we sometimes find simulators with the capacity of set adversary random tape. My question: when do we have to consider the necessity of simulators set adversary random-...