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
1
vote
0 answers

Adding and multiplication in jacobian coordinates

Please tell me how i can to derive formulas for adding and multiplication of 2 points in jacobian coordinates $((x,y)=(\frac{X}{Z^2},\frac{Y}{Z^3}))$ over elliptic curve? Thanks a lot beforehand. I'm really need it, could somebody give me a clue how…
dima_k
  • 11
  • 3
1
vote
0 answers

p and q are safe primes and with 1000 digits. Argue for or against if its easy on a Laptop to solve RSA-problem using Fermat's factorization method

Question: p and q are safe primes and with 1000 digits. Argue for or against if its easy on a Laptop to solve RSA-problem using Fermat's factorization method. Answer: First note that when p and q are approximately of the same size, the have the most…
Linelina
  • 205
1
vote
1 answer

What is the real formula for Hill Cipher? (Book Correction)

My book "Cryptography Theory and Practice" by Douglas R. Stinson states that the formulas for encrypting and decrypting on page 19 are follow: For a key $K$, we define $$e_K(x)=xK$$ and $$d_K(y)=yK^{-1}$$ Where all operations are performed in…
user516076
  • 2,200
1
vote
1 answer

Rabin Cryptosystem Proof

The system is explained here: https://cryptography.fandom.com/wiki/Rabin_cryptosystem I am trying to prove that the roots $r \equiv y_p \cdot p \cdot m_q + y_q \cdot q \cdot m_p \pmod{N}\\ -r \equiv N - r \pmod{N}\\ s \equiv y_p \cdot p \cdot…
Sarah
  • 57
1
vote
0 answers

Prove that if $S \circ S$ has perfect secrecy, then $S$ has perfect secrecy

Consider a cryptosystem $S=(X,X,K,e,d)$. In this case, the set of ciphertexts is the same as the set of plaintexts, so we can make the following definition: We define the cryptosystem $S \circ S = (X,X,K \times K, e',d')$, which is the composition…
Leafar
  • 1,723
1
vote
0 answers

What's in general de minimum distance of cyclic codes of length 2^m?

I've been asked to first verify that $(1+x)^{2^m} = 1+x^{2^m}$ in $\mathbb{F}_2 [x]$, then to make a prediction of the minimum distance of cyclic codes of length and proof such prediction. We managed to figure out that with m=2 the minimum distance…
1
vote
2 answers

Double Vigenere Cipher

I have given a ciphertext: vpitqjcahpzkcvdtmttmtnmjuigf and two Keys: k1 = SECRET, k2 = KEY. Decryption is done by applying the keys one by one, but you can also encrypt k1 with k2, which yields k3 = CIABIR. Then it is also possible to use k3 for…
1
vote
1 answer

Cryptography friends: How to prove that a hash function can produces a length-fixed output?

Consider the following hash function based on RSA. $M_i < n$. The hash value of a message consisting of two blocks is calculated by $H(M) = H(M_1,M_2) = ((M_1^e\ mod\ n)\ XOR\ M_2)^e mod\ n$ Q1.Does this hash function can produce fixed output…
1
vote
3 answers

$φ(n)=(p-1)(q-1)(r-1)$

Let $p, q, r$ be three distinct primes. Show that $φ(n)=(p-1)(q-1)(r-1)$ So far I have: There are $qr-1$ multiples of $p$ in $1,...,pqr$ There are $pr-1$ multiples of $q$ in $1,...,pqr$ There are $pq-1$ multiples of $r$ in $1,...,pqr$ We counted…
Sarah
  • 57
1
vote
1 answer

Probability of collision in S-box

I'm trying to understand a cryptanalysis of the Blowfish cipher, and I need to calculate the probability of collision in the cipher's S-boxes. Basically an S-box is a list of 256 semi-random 32-bit numbers. We can assume that the values are random…
1
vote
2 answers

In galois field- how does modular arithmetic

The following is given in the text that I have: In $GF(2^8)$ [Galois Field] let: $$h(x)=x^8+x^4+x^3+x+1$$ $$x^8 \bmod h(x)= [h(x)-x^8]$$ I basically don't understand the second step I think $h(x) mod x^8=[h(x)-x^8]$, is the text mistaken or am I ?…
1
vote
2 answers

Scientific Source that states, that a one way hash function is not encryption

I am currently writing my master-thesis and I want to state in a subsection, that a one way hash function is not a method of encryption. But because it is a thesis, I must supply a scientific source for such a statement. My first guess was "Applied…
Demento
  • 113
1
vote
1 answer

Understand a factor base method to compute discrete logarithms

I am going through my cryptography notes in a section about sub exponential factor base methods for computing discrete logarithms, and I come across a statement I don't understand about an algorithm to compute discrete logarithms: Consider $p$ a…
1
vote
0 answers

Understand an algorithm to find a prime of bit length $k$

My cryptography notes gives this algorithm for finding a prime of bit-length larger than or equal to $k$. Determine an optimal bound on the set of small primes to be sieved $(2,3,...,p_t)$ and let $M=(2)(3)...p_t$. Generate a random integer $x$…
1
vote
1 answer

Key Exchange Protocol attack

I am working on the exercise below which ask about whether it is possible to attack the following key exchange protocol on sharing session key $K_s$ between user $X$ and $Y$: $X \rightarrow Y : X \| r$ $Y \rightarrow X : E (r \| K_s, K_{xy})$ $X…
Mlui
  • 21