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
4
votes
0 answers

Analyzing an Obfuscation Algorithm

I'm a software developer, not a mathematician. I saw a question about decoding ciphertext so I'm assuming this is not off-topic in this forum. I have a legacy database that seems to be obfuscated, and the original program used to record this data is…
4
votes
2 answers

RSA solving for $p$ and $q$ knowing $\phi(pq)$ and $n$

I want to determinate $p$ and $q$ in RSA. I know that $n = 172451$ and $\phi(n) = 171600$. $$171600 = pq - (p+q) + 1 = 172451 -(p + q) + 1$$ $$p + q = 172451-171600+1 = 852$$ $$(p-q)^2 = (p+q)^2-4pq = (852)^2 - 4(172451) = 36100$$ Now I'm stuck at…
Favolas
  • 803
  • 1
  • 8
  • 15
4
votes
1 answer

Decrypt an RSA-message when it's encrypted by same modulus

Suppose 2 entities have a different RSA key-pair, but have the same modulus n. Suppose also that a message M has been encrypted by both pairs. How can one recover M with a reasonable probability? We know the public keys $e_1$ and $e_2$ of both…
4
votes
1 answer

"Discrete logarithm problem in many groups of cryptographic interest"?

In many articles and papers I find the phrase ...discrete logarithm problem in many groups of cryptographic interest... commonly used. I would like what groups are they exactly referring to when they mention "groups of cryptographic interest" when…
4
votes
1 answer

How is the Schnorr Signature insecure in the following 2 scenarios:

When there is no hash function used, $s = k-x \cdot m \mod {q}$ instead of $s = k-x \cdot H(m||r) \mod{q}$? When a hash function is defined as $H(m)$ instead of $H(m||r)$? Ref: Schnorr Signature
4
votes
3 answers

Using the fermat test to show 513 is not prime

I've been asked to use the fermat test for the base a=2 to show that 513 is not a prime number. Could someone please help explain what a base exactly is in this context? Thanks in advance!
Edward
  • 41
4
votes
1 answer

RSA when N=pq and p = q

I was curious what's to happen when $p = q$ for $N=pq$ in RSA scheme. First I realize that one can easily find out $p$ and $q$ by taking a square root of $n$. However, it appears to me that under $\pmod{N}$ where $p = q$, one cannot reliably…
Maurice
  • 43
4
votes
1 answer

question based RSA Algorithm

The RSA system was used to encrypt the message M into the cipher-text C = 6. The public key is given by n = p q = 187 and e = 107. In the following, we will try to crack the system and to determine the original message M. (a) What parameters…
Aditya
  • 41
3
votes
3 answers

Irreversible Math Function

Is there any function which will take two inputs, (a+b) as one input and c as another, and return a result from which c can only be computed only if a and/or b are known individually? Basically I want to modify c with (a+b) in such a way that you…
3
votes
0 answers

crack the key or not: generated key

Let $T \in F^{n \times n}$ , $F$ be a field Let $U_1, U_2 \in F^{n \times n}$ be randomly chosen by user 1 resp. user 2. user1 sends $U_1\cdot T$ to user2 , user2 sends $T\cdot U_2$ to user1 . Both are now able to compute the secret key $K=U_1\cdot…
3
votes
0 answers

Does there exist an operation like bitwise-xor over non-power-of-2 domains?

I want a function for enciphering a single letter that takes two letters as input, produces one letter as output, and has the same properties as bitwise XOR. The problem is that the range of inputs (26 letters) is not a power of a prime number. IE,…
blake8086
  • 163
3
votes
1 answer

Why isn't RSA trivially broken using Multiplicative Inverse?

Standing back from the details, RSA does $m^{ed}=m \mod pq$ Where e is a constant and d is the private key. Now $e$ and $pq$ are coprime, so $e^{-1} \mod pq$ should be easy to determine using the extended euclidean algorithm. (Note, $\mod pq$, not…
Tuntable
  • 133
3
votes
2 answers

What is the probability to crack this hash/equation?

So the plaintext is "hello" (example). I change it to [8, 5, 11, 11, 15] (offset of each letter in the alphabet) I multiply the matrix by itself [64, 25, 121, 121, 225] Then I separate all of the numbers: [6,4,2,5,1,2,1,1,2,1,2,2,5] And find the…
alexyorke
  • 420
3
votes
2 answers

Find the Hill cipher key matrix that can realize this permutation

Find the Hill cipher key matrix $K$ that can realize the permutation $$f: (1,2,3,4,5) \to (3,5,1,4,2).$$ I am not sure how to find a $5\times 5$ matrix that satisfies this. My guess is $$K=\begin{bmatrix} 0 & 0 & 1 & 0 & 0\\0 & 0 & 0 & 0 & 1\\ 1…
Dreamer78692
  • 488
  • 6
  • 14
3
votes
1 answer

Matrix multiplication in AES' MixColumns step.

In Advanced Encryption Std, say after a ShiftRow operation, I want to perform MixColumns. State MixColumn Matrix Mixed ┏ ┓ ┏ ┓ ┏ ┓ ┃ d4 e0 b8 1e ┃ ┃ 02 03 01 01 ┃ …
Frenzy Li
  • 3,685
1
2
3
18 19