MHB Calculating RSA Signature at Message m=2 w/o Hash Function

  • Thread starter Thread starter mathmari
  • Start date Start date
mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hey! :o

1. Construct a pair of private/public key RSA, where the prime numbers that we use are $p=11, q=13$.
2. Describe how we can calculate a RSA signature at the message $m=2$ without using a hash function.
3. Show that, given the above signature, we can calculate a valid signature at the message $m'=8$ without using the private key.

I have done the following:

1. $n=p \cdot q=11 \cdot 13$

$\phi(n)=(p-1)(q-1)=10 \cdot 12=120$

We choose a $e$ such that $(e,\phi(n))=1$. We take for example, $e=7$.

Then we calculate $d$ such that $ed \equiv 1 \pmod {\phi(n)}$. So, $d=13$.

The private key is $d=13$ and the public key is $(e, n)=(7, n)$.

2. The signature is $c=m^d \pmod {\phi(n)}$.

3. There is a $m_1$ such that $m=m'm_1$.

$c=m^d \pmod {\phi(n)} \Rightarrow c=m'^dm_1^d \pmod {\phi(n)} \\ \Rightarrow c(m_1^d)^{-1}=m'^d \pmod {\phi(n)} \Rightarrow cm_1^{-d}=m'^d \pmod {\phi(n)} \\ \Rightarrow ((cm_1^{-d})^{-e})^{-\frac{1}{e}}=m'^d \pmod {\phi(n)} \Rightarrow (c^{-e}m_1^{ed})^{-\frac{1}{e}}=m'^d \pmod {\phi(n)} \\ \Rightarrow (c^{-e}m_1)^{-\frac{1}{e}}=m'^d \pmod {\phi(n)}$

That means that the signature of the message $m'$ is $(c^{-e}m_1)^{-\frac{1}{e}}$.

Could you tell me if it is correct what I have done?? (Wondering)
 
Mathematics news on Phys.org
mathmari said:
Hey! :o

1. Construct a pair of private/public key RSA, where the prime numbers that we use are $p=11, q=13$.
2. Describe how we can calculate a RSA signature at the message $m=2$ without using a hash function.
3. Show that, given the above signature, we can calculate a valid signature at the message $m'=8$ without using the private key.

I have done the following:

1. $n=p \cdot q=11 \cdot 13$

$\phi(n)=(p-1)(q-1)=10 \cdot 12=120$

We choose a $e$ such that $(e,\phi(n))=1$. We take for example, $e=7$.

Then we calculate $d$ such that $ed \equiv 1 \pmod {\phi(n)}$. So, $d=13$.

The private key is $d=13$ and the public key is $(e, n)=(7, n)$.

2. The signature is $c=m^d \pmod {\phi(n)}$.

3. There is a $m_1$ such that $m=m'm_1$.

$c=m^d \pmod {\phi(n)} \Rightarrow c=m'^dm_1^d \pmod {\phi(n)} \\ \Rightarrow c(m_1^d)^{-1}=m'^d \pmod {\phi(n)} \Rightarrow cm_1^{-d}=m'^d \pmod {\phi(n)} \\ \Rightarrow ((cm_1^{-d})^{-e})^{-\frac{1}{e}}=m'^d \pmod {\phi(n)} \Rightarrow (c^{-e}m_1^{ed})^{-\frac{1}{e}}=m'^d \pmod {\phi(n)} \\ \Rightarrow (c^{-e}m_1)^{-\frac{1}{e}}=m'^d \pmod {\phi(n)}$

That means that the signature of the message $m'$ is $(c^{-e}m_1)^{-\frac{1}{e}}$.

Could you tell me if it is correct what I have done?? (Wondering)

Hi mathmari,

The first part is correct. For the second part the signature is $c=m^d \pmod {n}=2^{13}\mbox{mod 141}$. For the third part you can use the homomorphic property of the RSA scheme. That is, $c^3=m^{3d}\pmod{n}$.
 
Last edited:
Sudharaka said:
The first part is correct.

I calculated again $13 \cdot 7 \pmod {121} \equiv 91 \pmod {121}$. So, it is wrong, isn't it?? (Wondering)
Sudharaka said:
For the second part the signature is $c=m^d \pmod {n}=2^13\mbox{mod 141}$.

Oh, I wrote $c=m^d \pmod {\phi(n)}$ instead of $c=m^d \pmod {n}$. (Tmi)
Sudharaka said:
For the third part you can use the homomorphic property of the RSA scheme. That is, $c^3=m^{3d}\pmod{n}$.

So, is my idea completely wrong?? (Wondering)
 
The requirement that $ed \equiv 1 \pmod{\varphi(n)}$ is actually too strong. All you need is that:
$$ed \equiv 1 \pmod{\mathrm{lcm}(p - 1, q - 1)}$$
But, yes, that is still wrong, as the lcm of 10 and 12 is 60, so 91 doesn't work out. A working $d$ is for example $d = 103$, or $d = 43$. Though $d = 13$ still "works" for a little more than half of all possible plaintext inputs, so the error isn't immediately visible. An example of failure, with $M = 2$:
$$2^7 \equiv 128 \pmod{143}$$
but
$$128^{13} \equiv 24 \not \equiv 2 \pmod{143}$$
 
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Thread 'Imaginary Pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Back
Top