The Art of Encryption from Ancient Egypt to Quantum

Download Report

Transcript The Art of Encryption from Ancient Egypt to Quantum

The Art of Encryption from Ancient
Egypt to Quantum Cryptography
Emre Altug Yavuz
Ph.D. candidate, Datacom Lab.
Dept. of Electrical & Computer Engineering
UBC, Vancouver, BC, Canada
Objectives
• To chart the evolution of codes
A code is constantly under attack from code breakers until a
method is found which reveals its weakness and makes it no
longer useful leading it either to extinction or evolvement into a
new, stronger code.
• To demonstrate how the subject is more relevant
today than ever before.
- World War I --> chemists’ war (mustard gas & chlorine)
- World War II --> physicists’ war (atom bomb)
- World War III --> ???
? Mathematicians’ war ?
Early Methods; Scramble & Hide
Steganography; achieved by hiding the existence of a msg.
• Ancient Chinese writing on fine silk, scrunching it into a
tiny ball and covering it with wax to swallow.
• Italian scientist, Giovanni Porta’s method of using a hardboiled egg (with a mixture of alum & vinegar).
• Writing in invisible ink, (milk of thithymallus plant) or an
improvised version of it; the urine.
• Using both scrambling and hiding; German agents’
microdot method.
Branches of Cryptography
• Transposition;
simply
rearranging the letters of
the messages (con; not
many combinations for
short words). e.g. Rail
Fence, Spartan scytale.
• Substitution; one of the
earliest description appears
in Kama Sutra.
- CODE; replace words
- CIPHER; replace letters.
e.g. Caesar cipher.
Renaissance in the West
• Between A.D. 800 and 1200, while Europe was stuck in
dark ages, Arab scholars were working on cryptanalysis.
• Secret writing were only studied in monasteries in Europe
to study Bible in search of hidden meanings.
• Frequency analysis of enciphered message.
• Spot “e” then “h” frequently goes before “e” (as in the
then, they etc.) but rarely after “e” and goes on.
Frequency Analysis of an Enciphered
Message
Le Chiffre Indechiffrable
• Florentine polymath Lean Battista Alberti proposed using
two or more cipher alphabets, switching between them.
• The idea is developed by Trithemius and Porta until
Vigenere put it in its final form giving his name to it.
• Vigenere Square.
• To unscramble the message, the intended receiver needs to
know which row of the square has been used to encipher
each letter --> keyword.
•
WHITEWHITEWHITEWHITEWHI
divert trropstoeastridge
ZPDXVPAZHSLZBHIWZBKMZNM
Perfect Security ?
• NO…!!! Personality of the languages e.g. letter “q”, only
followed by one letter, “u”.
• Find a symbol that is only ever followed by three particular
symbols.
• But still much more secure than a straight forward mono
alphabetic cipher.
• Ancient Greek historian Aeneas suggested conveying a
secret message by pricking tiny holes under particular
letters in a apparently innocuous page of text. 2000 years
later thrifty Victorians used it !!!
The Mechanization of Secrecy
• In 1894, Marconi invented the radio, which had a great
advantage over the telegraph - signal travelling through air.
• Despite critics that argued the limited range of radio
transmission, Marconi proved that a message can be sent to
a distance of 3500km.
• Poldhu (Corwall) to St. John’s (Newfoundland) - mystery ?
• Reflections between the ionosphere and the Earth.
• Result; lots of intercepted messages during WWI, like
German ADFGVX cipher (convoluted, mixture of
substitution & transposition)
Strength of the Keyword
in Vigenere Cipher
• A plain text of 1000 letters encrypted according to
Vigenere cipher with a keyword of
• 5 letters long --> frequency analysis 5 sets of 200 letters.
• 20 letters long --> freq. analysis 20 sets of 50 letters.
• 1000 letters long --> 1000 sets of 1 letter (impossible)
• But not practical since in a single day an army might
exchange hundreds of messages, containing thousands of
characters.
The most fearsome system ENIGMA
• Developed by German inventor Arthur Scherbius and
Richard Ritter in 1918.
• How does an Enigma machine look like ?
• How did Scherbius design it ?
• Just a quick calculation about the possibilities;
• Scrambler orientations; 3 scrambler set in one of 26
orientations --> 26 x 26 x 26 = 17,576
• Scrambler arrangements, positioned in any of 6 orders.
• Plugboard; 6 pairs of letters out of 26 --> 100,391,791,500
• Total ~ 10,000,000,000,000,000.
You think there is NO way to
crack ENIGMA !!!
• In 1931, Hans-Thilo Schmidt allowed a French secret
agent to photograph the related documents in exchange for
10,000 marks.
• But driven by overconfidence and lack of motivation after
WWI, French didn’t bother building a replica, thinking that
cracking it, is impossible.
• Process could be weakened by the repeated use of a single
day key, but Germans cleverly used the day key settings to
transmit a new message key for each message.
• But the Polish cryptanalists were undaunted, Rejewski
invented an adaptation to check the scrambling settings.
Operation Ruthless from
the creator of “007”
• Naval Enigma was made harder by not sending
stereotypical messages, putting extra scramblers, a variable
reflector and a new system for exchanging messages.
• An alternative strategy - stealing keys - is developed by
two, one of who was Ian Fleming to capture German naval
code books which was canceled later.
• Capture of the books made the Battle of the Atlantic to
swing in favor of the Allies.
• Bletchley Park also succeeded in deciphering Italian and
Japanese messages.
Remembering the Natives
• More complex cipher machines than Enigma, were used by
British and American armies but they were painfully slow.
• Having attended American colleges, many Japanese
soldiers were fluent in English, including the profanities.
• Solution --> Navajo language, the only tribe in US, that
has not been infested with German students.
• The Navajo Alphabet code.
World’s First Computer
• The bombes were able to carry out a specific task at high
speed, but weren’t flexible enough.
• In order to mechanize the effort, Max Newman, designed a
machine that was capable of adapting itself to different
problems.
• Thinking that this design is impossible to implement, the
project is shelved. But Tommy Flowers built Colossus
consisting of 1500 electronic valves.
• Like everything else destroyed after the war, the plans for
the world’s first computer were lost forever.
ENIAC (Electronic Numerical
Integrator and Calculator
• In 1945, J. Presper Eckert and John W. Mauchly completed
ENIAC consisting of 18 000 electronic valves, capable of
performing 5000 calculations per second.
• First restricted to military and government, computers
became widely available after 1947 when AT&T labs
invented the transistor.
• Commercial computing became reality in 1951.
• In 1953, IBM launched its first computer.
Alice and Bob Go PUBLIC
• IBM product Lucifer was developed by Horst Feistel and
officially adopted on November 23, 1976 and was called the
Data Encryption Standard (DES).
• Key distribution problem comes back again.
• Diffie & Hellman’s story of Alice and Bob exchanging keys.
The problem was the order of encryption and decryption, it
should obey “last on, first off”.
• Diffie & Hellman looked for a one way function like mixing
yellow and blue paint to make green, easy to mix but
impossible to unmix it.
Modular Arithmetic as Solution
• Hellman’s scheme for solving the key exchange problem.
• This would enable Alice and Bob to establish a secret via
public discussion but it wasn’t perfect for its convenience,
since it hinders the spontaneity of e-mail.
• Asymmetric key approach; Alice could create her own pair
of keys: an encryption key (public key) and decryption key
(private key).
• No suitable candidate for one way function at first - they
created a workable but imperfect system called Diffie Hellman - Merkle.
RSA - Rivest - Shamir - Adleman
• The race to find an asymmetric cipher was won by another
trio of researchers, RSA.
• The security of the RSA system relies on the difficulty of
factoring very large numbers.
• Choose two large prime numbers, p and q and compute
n = p * q and x = (p-1)*(q-1)
• Choose a number relatively prime to x and call it d, find e
such that e * d = 1 (mod x)
• To encrypt: C = Pe (mod n), To decrypt: P = Cd (mod n).
• The public key is thus: (e, n) and the private key is (d, n)).
RSA in Practice
• Public key Authentication;
M -> A’s private key -> A’s public key -> M
• Digital Signatures;
M -> A’s private key - B’s public key -> B’s private key ->
A’s public key -> M.
• The Politics of Encryption (bans, putting backdoors)
• Security; if N is 256 bits or shorter, it can be factored in a
few hours, should be at least 1024 bits long.
• Speed; RSA is slower than DES and others.
• Key distribution; man in the middle attack.
The Alternative History
• In 1969, the British military asked James Ellis, to look into
ways of coping with the key distribution problem. Similar
ideas to those of Diffie, Hellman and Merkle except that he
was several years ahead of them.
• Unfortunately, he was not a mathematician, but by 1975,
with the help of Clifford Cocks and Malcolm Williamson,
they discovered all the fundamental aspects, yet they had
to remain silent.
Pretty Good Privacy - PGP
• Phil Zimmermann attempted to encourage the widespread
use of the strong encryption, panicking America’s security
experts by threatening.the effectiveness of the billion-dollar
National Security Agency.
• In practice, actual process of RSA encryption required a
substantial amount of computing power.
• In contrast Zimmermann believed that everybody deserved
the right to the privacy offered by RSA, so he started a
project called PGP.
• PGP combines some of the best features of both
conventional and public-key cryptography.
How does PGP work ?
Problems and the Happy Ending
•
•
•
•
•
Copyright from RSA Data Security Inc.
US Senate’s 1991 omnibus anticrime bill.
Investigation by FBI.
Response from Human’s Right’s Groups.
Echelon system; scanning e-mails, faxes, telefaxes and
telephone calls searching for particular words.
• In 1996, the cases against Zimmermann were dropped,
since PGP had already spread on Internet and a settle
achieved with RSA and obtained a license.
Quantum Cryptography - The Future
• “If all the personal computers in the world - approximately
260 million computers -were to be put to work on a single
PGP encrypted message; it would take on average an
estimated 12 million times the age of the universe to break
a single message”
William Crowell - Deputy Director of NSA
Is It Really Practically
UNBREAKABLE ?
• Tempest attacks; aiming to detect the electromagnetic
signals emitted by the electronics in a computer’s display
unit.
• Viruses and Trojan Horses.
• Intentionally built backdoors to be exploited later on.
• Breaking code by factoring the public key N takes
unreasonable amount of time, so a short cut should be
found to find p and q or do it faster --> quantum
computers.
What is the difference ?
• At macroscopic level quantum laws and classical laws are
almost indistinguishable.
• But they diverge at microscopic level.
• David Deutsch; developed the idea in 1985.
• 1’s and 0’s are represented by the spinning direction of the
particles.
• Considerable amount of parallel computing power which
will help cracking DES ciphers really short amount of
times.
Quantum Cryptography
• Quantum money invented by Stephen Wiesner.
• Charles Bennett & Gilles Brassard developed quantum
cryptography. What’s the recipe that they developed ?
• A sends B a series of photons, and B measures them.
• A tells B on which occasions he returned them in correct
way (but not the result).
• A and B discard the measurements that B made incorrectly
and concentrate on those he made correctly.
• A & B check the integrity by testing a few of the digits.
• If satisfactory, they can use the onetime pad to encrypt
otherwise they know that photons were tapped by Eve.
BASED ON “THE CODE
BOOK”
by
“SIMON SINGH”