Shared secret = $mnQ$:
{{{id=8| m*nQ /// (725327750899527824758631414965 : 947924444229864748024362125753 : 1) }}} {{{id=9| n*mQ /// (725327750899527824758631414965 : 947924444229864748024362125753 : 1) }}} {{{id=14| /// }}}Recall: RSA involves working in $\ZZ/ pq \ZZ$ and keeping the factorization of $pq$ secret. It allows one to do things that Diffie-Hellman doesn't, including publishing a public key (an exponent $e$), getting messages, digital signatures, etc.
However, there is another cryptosystem called ElGamal that has similar good properties to RSA, but works using an elliptic curve group (or even the group $(\ZZ/p\ZZ)^*$. It was used by Microsoft in one of their first ever DRM (=digital rights management) schemes a few years ago:
We define the parameters of Microsoft's DRM cryptosystem:
{{{id=13| p=785963102379428822376694789446897396207498568951 /// }}} {{{id=37| len(str(p)) /// 48 }}} {{{id=12| p.str(16) /// '89abcdef012345672718281831415926141424f7' }}}Question: How could you construct your own "nerdy prime"?
{{{id=18| E = EllipticCurve(GF(p), [317689081251325503476317476413827693272746955927, 79052896607878758718120572025718535432100651934]) E /// Elliptic Curve defined by y^2 = x^3 + 317689081251325503476317476413827693272746955927*x + 79052896607878758718120572025718535432100651934 over Finite Field of size 785963102379428822376694789446897396207498568951 }}} {{{id=17| time E.cardinality() /// 785963102379428822376693024881714957612686157429 Time: CPU 0.00 s, Wall: 0.06 s }}} {{{id=38| is_prime(E.cardinality()) /// True }}} {{{id=21| P = E([771507216262649826170648268565579889907769254176, 390157510246556628525279459266514995562533196655]) /// }}} {{{id=22| P.order() /// 785963102379428822376693024881714957612686157429 }}}Our heroes Nikita and Michael share
digital music when they are not out fighting terrorists. When Nikita
installed the DRM software on her computer, it generated a private key
$$
n = 670805031139910513517527207693060456300217054473,
$$
which it hides in bits and pieces of files. In order for Nikita to
play Juno Reactor's latest hit juno.wma, her web browser contacts a
website that sells music. After Nikita sends her credit card number,
that website allows Nikita to download a license file that allows
her audio player to unlock and play juno.wma.
When Nikita shares both juno.wma and the license file with
Michael, he is frustrated because even with the license, his computer
still does not play juno.wma. This is because Michael's computer
does not know Nikita's computer's private key (the integer $n$ above),
so Michael's computer can not decrypt the license file.
To illustrate the ElGamal cryptosystem, we
describe how Nikita would set up an ElGamal cryptosystem that anyone
could use to encrypt messages for her. Nikita chooses a prime p, an
elliptic curve $E$ over $\ZZ/p\ZZ$, and a point $B\in E(\ZZ/p\ZZ)$, and
publishes $p$, $E$, and $B$. She also chooses a random integer $n$,
which she keeps secret, and publishes $nB$. Her public key is the
four-tuple $(p,E,B, nB)$.
Suppose Microsoft wishes to encrypt a message ("you can play this music" -- the license file) for Nikita.
If the message is encoded as an element $P\in E(\ZZ/p\ZZ)$,
Microsoft computes a random integer $r$ and the
points $rB$ and $P+r(nB)$ on $E(\ZZ/p\ZZ)$.
Then $P$ is encrypted as the pair
$(rB, P+r(nB))$. To decrypt the encrypted message,
Nikita multiplies $rB$ by her secret key $n$
to find $n(rB) = r(nB)$, then subtracts this from
$P+r(nB)$ to obtain
$$P = P+r(nB)-r(nB).$$
Returning to our story, Nikita's license file is an encrypted message
to her. It contains the pair of points $(rB,P+r(nB))$, where
The $x$-coordinate $14489646124220757767$ is the key that unlocks juno.wma (the music file).
If Nikita knew the private key $n$ that her computer generated, she
could compute $P$ herself and unlock juno.wma and share her
music with Michael. Beale Screamer found a weakness in the
implementation of this system that allows Nikita to detetermine $n$,
which is not a huge surprise since $n$ is stored on her computer after
all.
Implementing DRM schemes that really work is evidently difficult: Ubisoft DRM cracked in a day
More about elliptic curve cryptography:
See Certicom challenge website: http://www.certicom.com/index.php/the-certicom-ecc-challenge
{{{id=33| len(p.str(2)) /// 160 }}} {{{id=39| /// }}}