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

RSA Algorithm Question

Suppose the primes p and q used in the RSA algorithm are consecutive primes (meaning they differ by 2). How would you factor n = pq? The ciphertext 10787770728 was encrypted using n = 10993522499 and e = 113. The factors p and q of n were chosen so…
Steph
  • 11
0
votes
1 answer

Decrypting a Vigenere cipher with affine key

Consider a cipher where the method of encryption is to perform a Vigenere cipher on a plaintext, with the key word being an affine cipher of the letters a,b,c,...,z. How strong would this cipher be? Would it be possible to crack under a ciphertext…
0
votes
1 answer

Date is encoded. Can't figure it out.

I have dates that are encoded in a MSSQL db but we need to crack the date encoding to build some software that can plug-in to the db(which belongs to us). 01/20/2011 = 76724 03/08/2011 = 76771 10/11/2011 = 76988 11/10/2011 = 77018 Any ideas on the…
pythondjango
  • 103
  • 1
0
votes
1 answer

What can be a good equation to encode a natural number to bigger, visually random natural number and decode it back?

I need to visually encrypt (make the information uninterpretable by a non-prepared human) a natural number (known to be below some x) representing it as a much bigger, seemingly (for an unprepared observer) random (so just a+x doesn't work) natural…
Ivan
  • 939
0
votes
2 answers

Solve cryptogram - ciphertext given

(Wade's rewording) There is a phrase that contains $4$ words and $22$ total letters (not counting the three spaces between the words). One letter appears four times, no letter appears three times, three letters appear twice, and $12$ letters appear…
Shawn
0
votes
1 answer

Wouldn't it be easy to find private keys with the Diffie Hellman exchange?

I recently watched this video by Computerphile, where Mike explains the mathematics of the Diffie Hellman exchange. I've been wondering, since as explained $g$, $g^a$ and $g^b$ is public, can't you just do this equation $$ \frac{1}{log_{(g^a)}(g)} =…
Henryk
  • 3
  • 1
0
votes
1 answer

What background is needed to understand lattices?

I'm trying to read the paper Finding a Small Root of a Bivariate Integer Equation; Factoring with High Bits Known but the subject matter is over my head. I have an academic background in Applied Mathematics but I have not applied that knowledge in a…
ender
  • 23
0
votes
0 answers

RSA factorization

I am working on the following exercise on the RSA algorithm: Suppose that Eve has a magic box which creates decryption exponents for $(n, e)$ for a fixed modulus $n$ and for a large number of different public exponents $e$. Let $n = 225022969$.…
0
votes
0 answers

How is the Schnorr digital signature working what is the intution behind its working

To the best of my understanding any digital signature scheme takes message and private key as input and generates the digital signature for the message and that signature can be verified using message,signatue(message(256 bits)),public key . If you…
0
votes
0 answers

How to use the Chinese Remainder Theorem (using PARI) to find x in the DLP instance?

By raising $7 ≡ 5^x(mod 18)$ to the powers 2 and 3, we get: $13 ≡ 7^x(mod 18)$ and $1 ≡ 17^x(mod 18)$, respectively. Solving DLP in the first subgroup gives us $x ≡ 2 (mod 3)$. What is x in the second subgroup? How to use the Chinese Remainder…
0
votes
1 answer

What are the elements generated by 5^2 modulo 18 and 5^3 modulo 18?

Let the DLP instance in Z∗18 be 7 ≡ 5^x(mod 18). Since n = 6 = 2 × 3, let p = 2, and q = 3. What are the elements generated by 5^2 modulo 18 and 5^3 modulo 18? My answer is: For 5^2 modulo 18: (5^2) % 18 = 25 % 18 = 7 (5^4) % 18 = (7^2) % 18 = 49 %…
0
votes
2 answers

Help with RSA cryptography

I need to find c of the encryption of m = 100 using RSA given " p = 89, q = 101 and e = 7 ". Then, i need to decypher the obtained c I have already calculated n = p * q, which is 8,989 and φ(n) = (p-1)(q-1) which is 8,800 For calculating d i found…
0
votes
2 answers

How to calculate $-(a)$ mod $b$?

How do we calculate $-13$ mod $40$ to get $27$? My though process is: $40/-13 = -3$ $-3 \cdot( -13) = 39 $ $40 - 39 = 1 $ I'm getting the answer as $1$!
zain
  • 21
0
votes
1 answer

In the following proof sketch, how Eq (9) and Eq(10) are rewritten?

I am trying to understand the UF-CMA and UF-NMA proof sketch of Dilithium Signature Scheme. I can't understand how the authors have used the outputs of the helping function to rewrite Eq (9) and Eq (10).
0
votes
0 answers

Issue in solving d for private key of RSA

I'm struggling in a specific step in the Extended Euclidean Algorithm (EEA) while trying to find the value for d in the private key of the RSA Cryptosystem. **Calculation of d = e^(−1) mod φ(n) = 49−1 mod 640 using EEA: 640 = 13 · 49+3 49 = 16 ·…
zain
  • 21