cryptography help

• May 14th 2008, 03:07 AM
cryptography help
1) Your RSA public key is n=115. Bob sends you an encrypted letter of
the alphabet, which he encrypted by cubing it modulo n.
The transmission you received from Bob is 03. Use your decryption key
to figure out what letter of the alphabet Bob sent you.

2) Alice's RSA public key is n=1050589. Bob wants to send her a message consisting of one letter
of the alphabet together with some nonsensical padding. (The padding could be anywhere in the message.)
Bob encrypts his message by cubing it modulo n. By eavesdropping, you discover that
the transmission Alice receives from Bob is 306720. Using the knowledge that Alice carelessly
chose her two primes too close together, crack her RSA code, and then figure out what letter of the alphabet
Bob sent to her in his message. (Crack the code means find her decryption key.)
Hint: To simplify the computations, I chose 306720 so that its order mod n is only 10.
You may use a calculator for this problem (e.g., the Google calculator).

3) Let a and b be (congruent to) squares mod p, and let c and d be (congruent to) nonsquares mod p,
where p is an odd prime not dividing abcd. (For example, if p=7, then a could be 23 and b could be 11
and c could be 12 and d could be 13.) In general, which of the following are always squares mod p,
and which of the following are always nonsquares mod p?
(i) ab (ii) ac (iii) cd
Justify.
• May 15th 2008, 09:56 AM
Moo
Hello,

Quote:

1) Your RSA public key is n=115. Bob sends you an encrypted letter of
the alphabet, which he encrypted by cubing it modulo n.
The transmission you received from Bob is 03. Use your decryption key
to figure out what letter of the alphabet Bob sent you.

So $\displaystyle n=115=5 \cdot 23=pq$
p=5; q=23

Because he cubes the message he wants to send, e=3.
(n,e) is the public key.
C=3, it's the coded message you receive.
M is the message he sent.

Hence, we have $\displaystyle C=M^e \mod n$

Let d be such that $\displaystyle ed= 1 \mod \varphi(n)$

$\displaystyle C^d=M^{ed} \mod n = M \mod n$ (you should know that..)

So if you want to get M, calculate $\displaystyle C^d$ modulo n.
~~~~~~~~

Calculating d :

$\displaystyle 3d \equiv 1 \mod \varphi(115)$
$\displaystyle \varphi(115)=4 \cdot 22=88$

We know that $\displaystyle 3 \cdot 29=87=-1 \mod 88$
Therefore, $\displaystyle 3 \cdot (-29)=1 \mod 88$

$\displaystyle -29=59 \mod 88$

So $\displaystyle \boxed{d=59}$

~~~~~~~~

$\displaystyle M=C^d \mod 115$

$\displaystyle C^d=3^{59}$

Either you use a calculator, either you do it by hand. I've tried parts but this yields to numbers I don't like and that are not kind to deal with...

This looks like a draft, but I just tried to make it the simpliest way xD
• May 21st 2008, 01:52 AM
closebelow
cryptography exercises/equations [help needed]
Good evening,

I have two exercises that I'm stuck with at the cryptography course

1)first one I've reached a good point (it's probably almost finished)
this is what I have :

30^30 = 1 (mod31)

I have to prove that this equation is true.

2)here is the second exercise:

Prove that the following is true: 11^n + 5^n = 0 (mod7) when n = 3 (mod6)
Hint: You can use (it is proven) that 11^3 = 1 (mod3) and 5^3 = -1 (mod3)

Many thanks in advance to anyone who spends time reading and trying to help, it means a lot, thank you.
• May 21st 2008, 04:15 AM
Isomorphism
Quote:

Originally Posted by closebelow
Good evening,

I have two exercises that I'm stuck with at the cryptography course

1)first one I've reached a good point (it's probably almost finished)
this is what I have :

30^30 = 1 (mod31)

I have to prove that this equation is true.

Trivially follows from Fermats little theorem. He says $\displaystyle a^p = a \text{ mod } p$. So choose a = 30 and p = 31, we get $\displaystyle 30^{31} = 30 \text{ mod } 31 \Rightarrow 30^{30} = 1 \text{ mod } 31$
• May 21st 2008, 06:25 AM
closebelow
Thank you very much for the help. I believe it is a reasonable solution.