I would like to calculate a secret key, $s$:
$$ s = \sqrt{\frac{1}{v}} \mod n $$
where v is the public key, n is a product of two primes p and q. (maybe we can use something simple like 7 in this example?)
Can someone please provide a step by step example (short prime numbers so that we can calculate it by hand)? Much appreciated.
It's based from this:
Precalculation: An arbitrator generates a random modulus n (512-1024 bits) which is the product of two large primes.The arbitrator generates a public and private key pair for Peggy, by choosing a number, v, which is a quadratic residue mod n (i.e. x^2 = v mod n has a solution, and v^-1 mod n exists). This number, v , is the public key. The private key is then the smallest s for which s = sqrt(1/v) mod n.
I have learnt to do it the other way round $ v = (\pm 1) (s^2)^{-1} \mod n$