16
votes
9answers
5k views

RSA with small exponents?

Just to establish notation with respect to the RSA protocol, let $n = pq$ be the product of two large primes and let $e$ and $d$ be the public and private exponents, respectively ($e$ is the inverse ...
3
votes
2answers
220 views

Background for modular arithmetic function

I'm investigating this function: $a := ((b\cdot c) \bmod k) - (b \cdot c)/k$ where $/$ indicates integer division. Two things I've noticed: It's equivalent to multiplying a·b, and then ...
1
vote
1answer
28 views

Crypto lib that use files instead of passphrase

I would like to program an application to allow people to encrypt files without using a password or pass-phrase but an arbitrary long file. I'm searching for a library that allows me to safely create ...
17
votes
3answers
4k views

Cryptanalysis to reverse engineer a hash?

I understand this may not be the best place to ask a question like this, but I believe that this community may be the best/only place I can ask such a question. I have inputs and outputs from an ...
9
votes
1answer
263 views

Is the Representation Problem hard on elliptic curves?

The RP in ECC would be to find $a_1,\ldots,a_n$ (integers) given $P$ and $Q_1,\ldots,Q_n$ (points in the EC) such that $P = a_1 \cdot Q_1 + \ldots + a_n \cdot Q_n$. Is it hard when DH-like ...
5
votes
3answers
3k views

Calculating the amount of zero bits to be appended to the message

From FIPS 180-3 Suppose that the length of the message, $M$, is $l$ bits. Append the bit $1$ to the end of the message, followed by $k$ zero bits, where $k$ is the smallest, non-negative solution ...
11
votes
2answers
1k views

What is a hard-core predicate?

I read this article on Wikipedia: Hard-core predicate. Still I don't understand what exactly is a hard-core predicate. Is it possible to put this in simple English terminology, and perhaps with a ...
10
votes
3answers
1k views

Are there asymmetric cryptographic algorithms that are not based on integer factorization and discrete logarithm?

In the computer security class (in which cryptography is a big chapter) that I took, I remembered the professor said about current asymmetric cryptography algorithms are based on integer factorization ...
13
votes
2answers
1k views

Why do we append the length of the message in SHA-1 pre-processing?

As we know, SHA-1 is irreversible, so why do we append the length of the message to the preimage?
18
votes
4answers
3k views

Why does RSA need p and q to be prime numbers?

This is a clarifying thread after finding: What makes RSA secure by using prime numbers?. Despite the fact that this question was answered already, I am still struggling to really grasp the ...
10
votes
2answers
4k views

Encrypting and obscuring data between site/user without SSL

Im trying to figure out what the best way to encrypt data sent between a webpage and the user(both ways) is, when hosted in an environment that doesn't support SSL. The purpose of encryption would be ...
3
votes
0answers
53 views

How to generate an RSASSA-PSS signature with MGF1-SHA256?

As part of rooting a device, I need to generate a 256-byte RSASSA-PSS signature using SHA256 as the hash and MGF1-SHA256 as the mask function, for an update file I created. I can choose any 32-byte ...
1
vote
2answers
133 views

Verifying Without Knowing Key

Say user Bob sends an encrypted message to a server. People can download the message from this server and later get the key directly from Bob. Is it possible for the server to somehow verify that ...
2
votes
1answer
37 views

On the security definition of password-authenticated key exchange

I found in all PAKE papers, the security is defined as something like this: Let $Succ(A)$ be the probability that an attacker $A$ successfully distinguished the session key from a random string. Then ...
0
votes
3answers
85 views

Can $d$ and $e$ be the same number in RSA?

I'm reading about RSA and I have doubts: 1) To choose $e$, this value have to be between $1$ and $phi=(p-1)(q-1)$, with $mdc(phi, e) = 1$, right? 2) In my example, $p = 139$ and $q = 491$. So $n = ...
-3
votes
0answers
18 views

Man-in-the-middle-Attack three Parties [duplicate]

How does this work in Diffie Hellman ? I'm working for days on this but i'm a little bit Confused. If Oscar changes only the last key (for example Kabc ) is this enough ?
2
votes
1answer
22 views

Using a round function intended for an SP network in a Feistel network?

If I use the round function from a secure SP network (such as AES) and use it in a Feistel netwok, is this a good starting point for the second cipher? My thought is "yes" because: it already has ...
2
votes
1answer
33 views

Why are {0,1}-matrices almost-MDS only when n is 2, 3, or 4?

In this paper authors claim that {0,1}-matrices are almost-MDS (have branch number n - 1) on when n is 2, 3, or 4. For example, how can this two matrices have the same branch number? ...
1
vote
0answers
268 views

What are the problems of IKEv1 aggressive mode (compared to IKEv1 main mode or IKEv2)?

I would like to seek confirmation/clarification of the following statements about IKE: IKEv1 aggressive mode is supposed to be “insecure” if used with PSK. But as far as I can see, correct (or more ...
9
votes
1answer
182 views

State recovery of Micalli-Schnorr random number generator modulo a prime

Let $p$ be a public prime of $n$ bits. Define the sequence $x_i=z_{i-1}^e \bmod p$, where $z_i$ is the $k$ high-order bits of $x_i$, and $r_i$ the remaining $n-k$ bits of $x_i$ (thus ...
0
votes
1answer
13 views

Chosen Ciphertext Attack on the Public Key in PGP

In Secrets & Lies (2000), Schneier describes a chosen ciphertext attack on the public key under PGP: "Since RSA and ElGamal are malleable, known changes can be made to the symmetric key that ...
5
votes
1answer
300 views

What does 0…0 and 1…1 mean

I am very new to cryptography but can someone explain what exactly does 0...0 and 1...1 mean in general term. Is it that 1st and ...
1
vote
1answer
17 views

Can a compressed checksum be considered unique

I'm kind of guessing that the answer may be no. Since the compression is trying to reduce the output size using various optimization methods, this may cancel the properties of a hash algorithm. But ...
1
vote
1answer
51 views

How to create and validate potential grids when attacking a Playfair cipher?

First up: I am not asking you to decypher anything. This question is about attacking a Playfair cipher; more specifically – how to create potential grids when doing so. I'm currently working on a ...
14
votes
2answers
1k views

NIST Diffie-Hellman prime: how was it picked? Where did it come from?

According to this Matasano Crypto challenge, the NIST "likes" the following prime modulus, which appears to be expressed in hexadecimal: ...
6
votes
1answer
191 views

Is the “New Hope” Lattice Key Exchange vulnerable to a lattice analog of the Bernstein BADA55 Attack?

In the paper, "Post Quantum Key Exhange - A New Hope," the authors present a lattice-based key exchange based on the work of Chris Peikert. In this "New Hope" key exchange the authors try to gain ...
3
votes
0answers
62 views

XTS and 256-bit data blocks

I am developer of an application that uses XTS with ciphers which use 128-bit blocks (AES, Serpent and Twofish). I now want to use XTS with a cipher which uses 256-bit blocks (Shacal-2). AFAIK, I ...
3
votes
2answers
253 views

Which elliptic curves are quantum resistant? [on hold]

If I want to learn about quantum resistant crytography what are the best resources? Which type of elliptic curves should I be studying?
4
votes
0answers
23 views

Correlation Immunity Of 4 bit S Box

I have a 4 bit S Box byte[] S = new byte[16] { 0x9, 0xE, 0x5, 0x6, 0xA, 0x2, 0x3, 0xC, 0xF, 0x0, 0x4, 0xD, 0x7, 0xB, 0x1, 0x8 }; How can i calculate Correlation ...
3
votes
2answers
62 views

Can I use a block cipher in CTR mode to generate keys from a master key?

Suppose I have an AEAD mode based on a block cipher that requires two or more keys. In some cases, there is a complex proof that one key suffices. But finding such a proof is hard. An alternative ...
-2
votes
0answers
23 views

How to know the size of an encrypted key that is encrypted using public key

I encrypted a key with a size of 32 bytes. I encrypted it using a public key. How will I know how big is the encrypted key(ciph)? My code: ...
0
votes
0answers
44 views

What does Video Encryption Algorithm really do? [on hold]

So I read some paper suggesting video encryption algorithm (VEA) for encrypting video like MPEG, but when I google it, it only shows how it works in general, no mention about how it gets the key to ...
5
votes
1answer
57 views

Is ElGamal encryption still secure if the randomness is known to be even?

In ElGamal encryption $(g^r, g^mg^{kr})$, if the randomness $r$ is always chosen from even numbers, and the attacker knows about this, is it still provable secure?
4
votes
2answers
41 views

How long should a HMAC cryptographic key be?

In the top answer to this question the answerer says 'with a sufficently long key'. I am using a SHA1-HMAC (may switch to SHA256-HMAC) algorithm to verify cookies sent to clients as authentication ...
3
votes
0answers
38 views

Can the attack in https://eprint.iacr.org/2008/469.pdf be parallelized?

Can this attack be parallelized? It is a $2^{57}$ complexity collision attack on SHA-1 based on disturbance vectors. If it is practical it is easy on a GPU ($\approx1.1$ GPU-days). If it is ...
3
votes
1answer
25 views

How does Feistel cipher create diffusion between blocks?

From what I've read about Feistel ciphers, I can understand that within each block, there is both confusion and diffusion. But it is unclear to me how a Feistel cipher permutates among blocks of data. ...
0
votes
1answer
32 views

Creating ECDH using OpenSSL

For academic reasons, I'm playing around with OpennSSL 1.0.2g. I tested RSA encryption/decryption. I created key exchange with DHKE. But I'm struggling to find a way, to create ECDH, using only ...
3
votes
3answers
92 views

Can an adversary distinguish a private key from a pseudo-random string of the same length?

Apologies if this is a dumb question but allow me to describe the dilemma I have: Suppose that I am protecting a private key on a device using a password & PBKDF2. The obvious attack would be an ...
1
vote
1answer
204 views

How are calculated numbers in AES S-box?

I have a problem calculating the 0x02 value of the AES S-Box. I followed the steps descibed in “How are the AES S-Boxes calculated?”, but my answer is not correct. ...
-2
votes
0answers
30 views

How do Galios fields work in AES? [duplicate]

I am trying to learn how AES functions but I keep hanging at the subject of Galios fields. I am reading a lot about them but I just can not find an understandable explaination in how they work. Could ...
4
votes
2answers
637 views

Calculate the RSA private exponent from the CRT parameters

I am trying to make the RSA structure of Openssl manually, knowing the public key ($n$, $e$) and the CRT parameters $p$, $q$, $d_P$, $d_Q$, and $u = q^{-1} \mod p$. That is, I want to get the $d$ ...
1
vote
1answer
40 views

tweakable block cipher and ideal block cipher

Can the set of block ciphers obtained from a tweakable block cipher (using distinct tweaks) be considered as the set of ideal block ciphers ?
1
vote
1answer
40 views

Insecurity of CBC-MAC

Can anyone explain why CBC-MAC is not secure for variable length message? I read many books, but there are still some confusion. Such as the highlighted parts in previous pictures ...
3
votes
1answer
39 views

Is a chosen ciphertext attack on PGP still possible?

In a paper from 2002 (pdf), Jallad et al describe a chosen ciphertext attack on PGP by taking advantage of the CFB mode that the block ciphers use under PGP. It's quite a devastating attack. Is this ...
19
votes
3answers
13k views

How cryptographically secure was the original WW2 Enigma machine, from a modern viewpoint?

If cryptanalysts today were to crack the original Enigma machine, “how fast” or “how easily” could they do it? What methods would they use? The original cracking was significantly helped by operator ...
3
votes
1answer
47 views

The role of the dealer in visual cryptography

In visual cryptography schemes (VCS), there is special person called dealer. The dealer sets up the system, and the only one who knows about secret image. After encryption, the dealer distributes the ...
0
votes
1answer
37 views

Appropriate scrypt parameters when generating an scrypt hash

What values for CPU, memory and parallel difficulty should be used when generating an scrypt hash? i.e. ...
-3
votes
0answers
30 views

how a MITM attack works against tripartite in DH? [on hold]

Must Oscar change only the Key $K_{abc}$ (Alice, Bob and Charlie) or does he have one key for everyone of them ?
3
votes
2answers
590 views

How does blocksize affect security?

I have recently read about how blockciphers and how stream ciphers work, and although I think I finally got everything right, I'm still wondering how increasing blocksize increases security.
40
votes
1answer
4k views

What is a “freestart collision”?

In their work on SHA-1 collisions (cf. the EUROCRYPT-2016 paper “Freestart collision on full SHA-1” by Stevens, Karpman, and Peyrin) Stevens et al show that they are able to generate "freestart ...

15 30 50 per page