|  | 
 | 
A synopsis for a season three episode is as follows:
PLAYING WITH FIRE
On a mission to secure detonation chips from a terrorist organization's heavily armed base camp, Nikita is captured as a hostage by the enemy. Or so it is made to look. Michael and Nikita have actually created the scenario in order to secretly rendezvous with each other. The ruse works, but when Birkoff [Section One's master hacker] accidentally discovers encrypted messages between Michael and Nikita sent with Walter's help, Birkoff is forced to tell Madeline. Suspecting that Michael and Nikita may be planning a coup d'état, Operations and Madeline use a second team of operatives to track Michael and Nikita's next secret rendezvous... killing them if necessary.
What sort of encryption might Walter have helped them to use? I let my imagination run free, and this is what I came up with. After being captured at the base camp, Nikita is given a phone by her captors, in hopes that she'll use it and they'll be able to figure out what she is really up to. Everyone is eagerly listening in on her calls.
Nikita remembers a conversation with Walter about a public-key cryptosystem called the ``Diffie-Hellman key exchange''. She remembers that it allows two people to agree on a secret key in the presence of eavesdroppers. Moreover, Walter mentioned that though Diffie-Hellman was the first ever public-key exchange system, it is still in common use today (e.g., in OpenSSH protocol version 2, see http://www.openssh.com/).
Nikita pulls out her handheld computer and phone, calls up Michael, and they do the following, which is wrong (try to figure out what is wrong as you read it).
 and a number
 and a number  with
 with 
 .
.
 .
.
 .
.
 .
.
 to Nikita.
 to Nikita.
 ,
which both Nikita and Michael can easily compute.
,
which both Nikita and Michael can easily compute.
![\includegraphics[width=\textwidth]{graphics/nm_comm.eps}](img948.png) 
Here's a very simple example with small numbers that illustrates what Michael and Nikita do. (They really used much larger numbers.)
| 
 | 
Nikita and Michael are foiled because everyone easily figures
out  :
:
 ,
,  ,
, 
 , and
, and 
 .
.
 such that
such that 
 , which exist because
, which exist because 
 .
.
 , so everyone knows Nikita's
secret key
, so everyone knows Nikita's
secret key  , and hence can easily compute the shared
secret
, and hence can easily compute the shared
secret  .
.
To taunt her, Nikita's captors give her a paragraph from a review of Diffie and Hellman's 1976 paper ``New Directions in Cryptography'' [#!dh76!#]:
``The authors discuss some recent results in communications theory [...] The first [method] has the feature that an unauthorized `eavesdropper' will find it computationally infeasible to decipher the message [...] They propose a couple of techniques for implementing the system, but the reviewer was unconvinced.''