Questions tagged [cryptography]

Questions on the mathematics behind cryptography, cryptanalysis, encryption and decryption, and the making and breaking of codes and ciphers.

Please only post questions about the mathematics of cryptography here.

  • Coding and implementation specific questions should go to Stackoverflow with encryption or cryptography tags.
  • You may also consider asking at Cryptography Stack Exchange which is for asking questions about the mathematics and properties of cryptographic systems, their analysis ("cryptanalysis") and subsidiary topics that generally make up cryptology.
1915 questions
3
votes
2 answers

Encryption Scheme & Perfect Secrecy [Katz & Lindell]

An encryption scheme consists of the following data a plaintext space $\mathcal M$ a ciphertext space $\mathcal C$ a key space $\mathcal K$ a key generating algorithm Gen encryption and decryption algorithms $\operatorname{Enc}_k$ and…
3
votes
1 answer

What's unusual about the paragraph below?

"This is a highly unusual paragraph. Do you know why? If you try to find what is odd about it too quickly, it probably won't occur to you. Study it without hurrying and you may think of what it is. Good luck." It appears as a problem in the…
Acid2
  • 577
3
votes
1 answer

Unconditionally secure cryptosystem

I need some explanations about a cryptographic notion called unconditionally secure cryptosystem. The definition is as follows: $\forall m_0, m_1 \in M, \mid m_0\mid = \mid m_1\mid$. $\forall c \in C, \text{ Pr}[\text{Enc}(k, m_0) = c] =…
3
votes
3 answers

Enigma Machine and how it works

After reading the wiki page on Enigma's, I am still confused as to how it works. Are there some sources that run through how the enigma machine works that is easy to follow. Which also gives information about the how codes are encrypted and…
picakhu
  • 4,906
3
votes
3 answers

I need help understanding "the inverse"

Towards the bottom of this page. where it says Solving systems of equations modulo 26 is slightly more difficult than solving them normally, but it is still quite easy How did D go from -15 to 11? and how is the inverse of D 19? I don't understand…
3
votes
1 answer

What type of cipher is this?

I've created a type of alphabet cipher in which each character is defined based on how distant it is (in the alphabet) from the preceding character. So, assuming that $A=0$, $B=1$, $C=2$, etc., and you have a text input of "GOOSE," you would…
jawns317
  • 287
3
votes
2 answers

Proving that a set Rn (relatively prime with respect to any n) is a group

Question: prove that the set of all Rn (relatively prime with respect to any n) is a group ... there is a theorem that states Rn is a group for n > 0, but i dont know where that came from... (Just to be clear, for example, the set of all Rn and n =…
2
votes
3 answers

Why is hash function $h$ ($h(w_1 \oplus w_2) = h(w_1) \oplus h(w_2)$) not good?

Suppose $h$ is a hash function, $h \colon \{ 0, 1 \}^* \rightarrow \{ 0, 1 \} ^n$ and for all $w_1$, $w_2$ it holds: $$h(w_1 \oplus w_2) = h(w_1) \oplus h(w_2).$$ $\oplus$ is the XOR operation. Why isn't $h$ a cryptographically good hash function?
2
votes
2 answers

Why does this method for the average salary problem fail?

In my Computer Science class, we were introduced to the Average Salary problem, where a group of people want to determine their average salary, but they don't want anyone to be able to determine the salary of anyone else. I proposed a solution…
HashFail
  • 185
2
votes
3 answers

Is 6 a generator of this Group?

I've had the opportunity to learn about the mathematics behind Diffie-Hellman key exchanges, prime numbers, generators of groups, and all that good stuff. I wish I understood it, it's discomforting writing code you don't fundamentally…
Joe
  • 123
2
votes
1 answer

If the same message is sent to Alice and Bob who are using different public keys, how can somoene following the channel find $m$

Alice and Bob are using different public keys, Alice is using ($N_{1,2}$) and Bob ($N_{2,2}$). A message, $m$ is sent to both of them using their RSA systems. It is also true that $N_1$ and $N_2$ are relatively prime. Can anyone explain how Eve can…
2
votes
2 answers

Plaintext attacks: affine cipher

Consider an affine cipher with encryption function $e$, key $k=(k_1,k_2)$ and some prime $p$. The encryption function $e$ is defined as $e(m)=k_1m+k_2$ modulo $p$, where $m$ is some message (integer). Suppose $p$ is known. I know that if both $k_1$…
bobbo
  • 59
2
votes
1 answer

RSA cryptosystem with special prime

Let $p < 2^{1000}$ and $q=3 \cdot 2^n - 1$ for $500 < n < 1000$ be primes and set $n=pq$ to be the modulus of the RSA cryptosystem. Find an attack on this system and how many operations that are required to succeed. My attempt at a solution:…
2
votes
0 answers

Given odd number $n$ count the bases to which $n$ is Euler pseudoprime

As the title says we are given an odd number $n$ and wish to find the number of bases $b$ such that $n$ is an Euler pseudoprime; That is, $\gcd(b,n)=1$ and $b^{(n-1)/2} \equiv \left( \frac{b}{n} \right) \mod n$. I wrote a simple function in Matlab…
2
votes
0 answers

Queston concerning cracking an RSA message

I don't have a clue how to solve this exercise: Let m be an RSA modulus, g an encryption Exponent and N be a space of Messages. You know that $k^g$ is such that $k \in S \subset N$ with an S of cardinality $\log_2{(m)} $. How do you find m? It seems…
1 2
3
18 19