1. ## RSA cryptosystem

Just looking through my notes about RSA digital signature, and I dont understand what this means:

ALICE has public key

BOB has public key

Alice wishes to send to sign and send Bob the message M which is on a single block. We are also assuming that . Incase , Alice must invert the order she carries out her 2 calculations that follow and Bob must do the same.

Alice calculates:

Alice sends Bob C.

I'm not exactly sure what it means by Alice must invert the order she carries out her 2 calculations that follow. Does this mean I just do them in reverse order, or do the M, C and S values swap round but the d and e values stay the same? Because if it just means swapping the order then I'll be left with S...but then Alice is meant to send C....very confused!

2. Remark: Don't forget that the RSA only work if the exponent is lower than the modulo.

Usually, if $\displaystyle n_A<n_B$, Alice first encrypts the message with her private key and then with Bob's public key.
$\displaystyle M^{d_A}\equiv S$ (mod $\displaystyle n_A$) where $\displaystyle S<n_A$.
Because $\displaystyle n_A<n_B$, $\displaystyle S<n_B$, we can encrypt S without any problem (c.f. remark).

But if $\displaystyle n_A>n_B$, S can $\displaystyle >n_B$ and the RSA won't work.

3. Cheers for the reply Klaus, but the reason I'm confused about this is because I'm trying to do a past paper question:

6. Bob wishes to send Alice the following signed message:

SEE YOU TONIGHT. BOB

Bob and Alice communicate using the RSA system on two letter blocks
and their alphabet consists of the letters A, ..., Z, b (for space) and s (for
stop). The letters are numbered consecutively from 0 to 27 in this order.
Bob has public key (nB = 1739, eB = 529) and private key dB = 19. He
can look up (from a public directory) Alice’s public key which is
(nA = 1357, eA = 31).

Calculate the first signed block of Bob’s message.

So Bob's n is greater than Alice's n....
But if you're saying the RSA won't work then how would I answer this question?!

Thanks again!

4. I'm not sure that what your notes say is correct.

Invert means that you first encrypt and then you sign. But $\displaystyle S<n_B$ doesn't mean anyway that $\displaystyle S<n_A$...

The solution is to sign, make blocks again and then encrypt. Here, everything will work fine.

5. So I first sign using:

$\displaystyle S^{e_A} = C mod n_A$

and then encrypt using:

$\displaystyle M^{d_B} = S mod n_B$

So I'm left with S, so Bob sends S to Alice instead of C? In this right?

Cheers.

6. Do you have the numerical answer of the paper ?
From that, I could give you the way to get it, because there are some methods to use digital signature...

7. We're not allowed to have the answers to past papers for some reason, that's why I'm trying to make sure I go through the method carefully...

I'll just have to leave this question then, taking up way too much time!

Thanks for all the help though!