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
0
votes
1 answer

Cryptography key question

Okay, I have this question. First time taking the cryptography course so I have some confusions. First of all, "A Brilliant Detective" part does it mean anything ? I mean, Does it refer to something ? Also, as far as I am concern decryption should…
Mark
  • 33
0
votes
0 answers

How to prove that a pseudorandom generator is a pseudorandom generator or not

Let $F,G:\{0,1\}^n\rightarrow\{0,1\}^{2n}$ be pseudorandom generators. For each of the functions below, prove or disprove that $H$ is necessarily a pseudorandom generator. $H(s_0s_1...s_{n-1}):=G(s_{n-1}s_{n-2}...s_0),$ where $s_0,s_1,...,s_{n-1}$…
Krish
  • 1
0
votes
1 answer

Affine encryption and frequency analysis. Need help seeing where I'm going wrong.

QUESTION: An affine encryption function $f(n) \equiv an+b \ mod(41)$ has been used on plaintext composed of symbols from the alphabet $$ \begin{array}{cccc} &A&B&C&D&E&F&G&H&I&J&K&L&M&N&O&P&Q&R&S&T&U&V \\ &0 &1 &2 &3 &4 &5 &6 &7…
Swayy
  • 181
0
votes
1 answer

Short question about key of Hill Cipher

Is the key of Hill cipher for example for $m=2$, the determinant always an odd number? Because when I try to make a key and the determinant is even number, I can't find the inverse in modulo 26.
user516076
  • 2,200
0
votes
1 answer

Hill cipher, different result when decrypting

I have a key $$K=\begin{pmatrix} 2 & 1\\ 3 & 4 \end{pmatrix}$$ The $K$ is invertible, so we can find the chipertext from that key. I want to encrypt "il" with Hill Chiper. We know il=(8,11). And what i got after encrypted it was (23,0) that is…
user516076
  • 2,200
0
votes
1 answer

Decrypting ElGamal messages

You're Eve. Bob has made it public that he is using ElGamal, p = 29, g = 2, and his public key is 28. You intercept the following message: (9, 5), (16, 12), (28, 5), (1, 13), (20, 5), (23, 14), (20, 20), (1, 1), (13, 18), (22, 25). Decrypt the…
Ryusei
  • 3
0
votes
0 answers

Using RSA, and stumbles upon secret exponent: find primefactorization

Using RSA: we know N, two public exponents ($e_1$ and $e_2$) and two secret exponents ($d_1$ and $d_2$). Find primes p and q if $N=pq$. We know: $\gcd(e_1,(p-1)(q-1))=1$, $\gcd(e_2,(p-1)(q-1))=1$, $e_1d_1\equiv 1$ and $e_2d_2\equiv 1$…
Linelina
  • 205
0
votes
0 answers

Can someone explain this equation?

Okay, here is the exact phrasing: We want to get two values $A$ and $B$, where we test many values of $A$ to get the smallest value of $B$. $B$ is the coefficient of $x^{15}$ in the result of: $(1 + x)^A \pmod{p, x^{38} - 5}$. $p =…
badosky
  • 123
0
votes
1 answer

Explain with example numbers in more detail symmetric homomorphic encryption

I am trying to understand the lowest level of homomorphic encryption proposed by this thesis : https://crypto.stanford.edu/craig/ and through this simple version: https://crypto.stanford.edu/craig/easy-fhe.pdf I think this part it is in second link,…
Enigmae
  • 11
0
votes
0 answers

Reconstruction of a clock using n out of m pieces

Suppose a clock that is broken into four distinct pieces, that run from (12 - 9), (3-12), (6-3), (9-6). The clock can be reassembled from any two out of the four pieces, but no single piece can be used to create a full clock. I’ve been trying to…
0
votes
1 answer

How to manually decrypt simple RSA messages?

For instance I'm asked to decipher the following message: 2206 0755 0436 1165 1737 where I'm given the private key, $\ d=2437$ and with respect to modulo $\ n=2747$ I get $\ 2206^{2437}$ $\cong$ $\ 617$ $\ $mod $\ 2747$ and proceeding so on for…
Mike
  • 137
0
votes
1 answer

How to find modulo inverse if two number are not relatively prime for Hill cipher?

While practicing for Hill Cipher I choose a random Key matrix of $ 2*2 $ given as follows : $ K = \begin{bmatrix}3&2\\1&0\\\end{bmatrix} $ Say the Text to Encrypt is ATTACK By using the Following Equation $ C=K * P \mod 26 $ I got the encrypted…
Gaurav
  • 103
0
votes
1 answer

How to figure out a 615 digits long decryption key given these RSA properties?

I have a public key $(n,e)$ where modulus $n$ has 615 decimal digits. a decryption exponent $d$ with 8 decimal digits currupted with known positions. a plaintext-ciphertext pair $c_1 = m_1^e \bmod n$ just a ciphertext c_2 encrypted with the…
Rob Bor
  • 147
  • 1
  • 6
0
votes
1 answer

motivation for encryption algorithms

I'd like to address this question to encryption algorithms in general, but, just for the moment taking DES for instance. When studying the DES algorithm, we're shown the structure and how the algorithm works with some mathematical processing. To a…
0
votes
1 answer

Common modulus attack question RSA.

If we are in the context of understanding how Common Modulus Attack for RSA: $C_1=M^{e_1} \pmod{n} $ $C_2=M^{e_2} \pmod n $ We know that if $\gcd(e_1,e_2)=1$ the attack works fine. ¿What would happen if $\gcd(e_1,e_2)>1$?
Lecter
  • 449