Take the 2-minute tour ×  I've been looking for a simple which
signs a number with some randomly generated key and then
verified(decrypts the original number) with the public key,
which is generated by the private.  All the examples I've found
does not feature an example with real numbers, and all the
keys/numbers described with a single letter, which is not really
that clear.  share|improve this question add comment  1 Answer
up vote 2 down vote accepted  I'll give a simple example with
(textbook) RSA signing. I'm going to assume you understand RSA.
First key gen: $p\gets 7,q\gets 13,n\gets pq=91, e\gets 5,
d\gets 29$  Thus your public key is $(e,n)$ and your private key
is $d$.  Say we want to sign the message $m=35$, we compute
$s=m^d\bmod{n}$ which is $s\gets 42\equiv 35^{29}\bmod{n}$.  The
message and signature get sent to the other party
$(m,s)=(35,42)$. Who takes the signature and raises it to the
$e$ modulo $n$, or $42^{5}\equiv 35 \bmod{n}$. Then makes sure
that this value is equal to the message t