The Cayley–Purser algorithm was a public-key cryptography algorithm published in early 1999 by 16-year-old Irishwoman Sarah Flannery, based on an unpublished work by Michael Purser, founder of Baltimore Technologies, a Dublin data security company. Flannery named it for mathematician Arthur Cayley. It has since been found to be flawed as a public-key algorithm, but was the subject of considerable media attention.
During a work-experience placement with Baltimore Technologies, Flannery was shown an unpublished paper by Michael Purser which outlined a new public-key cryptographic scheme using non-commutative multiplication. She was asked to write an implementation of this scheme in Mathematica.
Before this placement, Flannery had attended the 1998 ESAT Young Scientist and Technology Exhibition with a project describing already existing cryptographic techniques from the Caesar cipher to RSA. This had won her the Intel Student Award which included the opportunity to compete in the 1998 Intel International Science and Engineering Fair in the United States. Feeling that she needed some original work to add to her exhibition project, Flannery asked Michael Purser for permission to include work based on his cryptographic scheme.
On advice from her mathematician father, Flannery decided to use matrices to implement Purser's scheme as matrix multiplication has the necessary property of being non-commutative. As the resulting algorithm would depend on multiplication it would be a great deal faster than the RSA algorithm which uses an exponential step. For her Intel Science Fair project Flannery prepared a demonstration where the same plaintext was enciphered using both RSA and her new Cayley–Purser algorithm and it did indeed show a significant time improvement.
Returning to the ESAT Young Scientist and Technology Exhibition in 1999, Flannery formalised Cayley-Purser's runtime and analyzed a variety of known attacks, none of which were determined to be effective.
Flannery did not make any claims that the Cayley–Purser algorithm would replace RSA, knowing that any new cryptographic system would need to stand the test of time before it could be acknowledged as a secure system. The media were not so circumspect however and when she received first prize at the ESAT exhibition, newspapers around the world reported the story that a young girl genius had revolutionised cryptography.
In fact an attack on the algorithm was discovered shortly afterwards but she analyzed it and included it as an appendix in later competitions, including a Europe-wide competition in which she won a major award.
Notation used in this discussion is as in Flannery's original paper.
Like RSA, Cayley-Purser begins by generating two large primes p and q and their product n, a semiprime. Next, consider GL(2,n), the general linear group of 2×2 matrices with integer elements and modular arithmetic mod n. For example, if n=5, we could write:
\begin{bmatrix}0&1\ 2&3\end{bmatrix}+ \begin{bmatrix}1&2\ 3&4\end{bmatrix}= \begin{bmatrix}1&3\ 5&7\end{bmatrix}\equiv \begin{bmatrix}1&3\ 0&2\end{bmatrix}
\begin{bmatrix}0&1\ 2&3\end{bmatrix}\begin{bmatrix}1&2\ 3&4\end{bmatrix}= \begin{bmatrix}3&4\ 11&16\end{bmatrix}\equiv \begin{bmatrix}3&4\ 1&1\end{bmatrix}
This group is chosen because it has large order (for large semiprime n), equal to (p2−1)(p2−p)(q2−1)(q2−q).
Let
\chi
\alpha
\chi\alpha\not=\alpha\chi
\beta=\chi-1\alpha-1\chi,
\gamma=\chir.
The public key is
n
\alpha
\beta
\gamma
\chi
The sender begins by generating a random natural number s and computing:
\delta=\gammas
\epsilon=\delta-1\alpha\delta
\kappa=\delta-1\beta\delta
Then, to encrypt a message, each message block is encoded as a number (as in RSA) and they are placed four at a time as elements of a plaintext matrix
\mu
\mu
\mu'=\kappa\mu\kappa.
Then
\mu'
\epsilon
The receiver recovers the original plaintext matrix
\mu
λ=\chi-1\epsilon\chi,
\mu=λ\mu'λ.
Recovering the private key
\chi
\gamma
\alpha
\beta
\chi\beta=\alpha-1\chi
However, the system can be broken by finding a multiple
\chi'
\chi
d
d\left(\beta-\alpha-1\right)\equiv\left(\alpha-1\gamma-\gamma\beta\right)\pmodn
Observe that a solution exists if for some
i,j\in\left|\gamma\right|
x,y\inZn
-1 | |
x\left(\beta | |
ij |
-\alphaij\right)\equivy\pmodn.
If
d
dI+\gamma=\chi'
\chi
\chi
λ=\kappa-1=v-1\chi-1\epsilonv\chi
This flaw does not preclude the algorithm's use as a mixed private-key/public-key algorithm, if the sender transmits
\epsilon