Cryptography - Case Notes

SCI Home | SCI Faculty Page | Cover Sheet | Reference List | Users Notes

Author - Martin Zhao - Summer 2004
 

Cryptography

An Extended Case for SCI 105

 

Prepared by Martin Zhao

For The SCI Summer Workshop 2004

 

Required Text

The Code Book

By Simon Singh

Anchor Books, 1999

ISBN: 0-385-49532-3

 

Case Overview

For thousands of years, various encryption techniques have been invented and used to protect messages of critical military and/or political values from falling into the wrong hands.  At the same time, codebreakers have attempted to break these codes so as to steal the secrets.  “The history of codes and ciphers is the story of the centuries-old battle between codemakers and codebreakers, an intellectual arm race that has had a dramatic impact on the course of history.”

 

With the Information Era comes, more and more companies and individuals rely on the Internet to transmit valuable commercial and personal information to do business or as a life style.  We are experiencing ever growing high demands on reliable and efficient encryption techniques to secure the order of our society.

 

By conducting this case study, the students can gain a good knowledge of the underlying scientific methodologies and techniques involved in the evolution of encryption practices, so as to get insight on science’s impact on the human history from a unique perspective.

 

Approaches

The way to achieve the goals of this case study can be approached through the two main emphases of the text as revealed by its author:

-         The first is to chart the evolution of the code:

o       The evolutionary struggle in which the breakage of an existing code will force the arising of a stronger code to replace it.

o       The ongoing battle between codemakers and codebreakers has inspired a whole series of remarkable scientific breakthrough.  [That is why this book is worth of using in SCI 105.]

-         The second is to demonstrate how the subject is more relevant today than ever before.

o       As information becomes an increasingly valuable commodity, and as the communication revolution changes society, encryption will play an increasing role in everyday life.

 

This case study also provides a good opportunity to examine the practices of encryption in the social, ethical, and political contexts.  By studying the confliction between

-         the public’s growing demand for cryptography, and

-         the needs of law enforcement and national security

o       civil libertarians are pressing for the widespread use of cryptography to protect the privacy of individual

o       the forces of law and order are lobbying governments to restrict the use of cryptography

the students can clarify their opinions in the form of a debate or an essay.

 

By reviewing the evolutionary battle between the codemakers and codebreakers, and looking into the future, another question may also be used as debate or essay topic:

-         Will codemakers ever design a truly unbreakable code and succeed in their quest for absolute secrecy?

-         Will codebreakers build a machine that can decipher any message?

This can be used either as an alternative topic for the last class unit or additional assignment if time allows.

 

Case Design Details

This case is intended to be used over a period of proximately two weeks.  It will be divided into a number of smaller modules, so that it can fit in six 50-minute units or four 75-minute units. 

 

The contents, as to be detailed shortly, include short lectures introducing key concepts and explaining mathematical models and techniques, group exercises to make and break codes, debate or group presentation sessions. 

 

The students will be asked to read selected chapters, prepare presentation materials, conduct encryption and decryption in and out of class, participate in class discussion and/or debate.  Web-base tools will be made available to students by Spring 2005 to help students conduct frequency analysis and text manipulation.

 

 

 [Introduction & Chapter 1]

Unit I

Introduction

-         Key concepts

-         Historical incidences

 

Unit II

Monoalphabetic Encryption

-         Caesar shift cipher

-         ROT 13

-         Hands-on exercise I-A (encryption)

 

Unit III

Frequency Analysis

-         Standard distribution in English literature

-         Decipher Caesar shift cipher using frequency analysis

-         Hands-on exercise I-B (decryption)

 

[Chapter 2]

Unit IV

Polyalphabetic Encryption

-         Vingenere square and Vingenere cipher

-         Encryption using Vingenere square

-         Hands-on exercise II-A (encryption)

 

Unit V

Breaking Vingenere Ciphers

-         Determine the length of the keyword

-         Determine the keyword

-         Hands-on exercise II-B (decryption)

-          

[Chapter 6]

Unit VI

The Birth of Public Key Cryptography – group presentation

-         Coding machines using in the WWII

-         DES encryption

-         The story of Alice, Bob, and Eve

-         Factoring big numbers (or the GCHQ efforts)

 

Unit VII

Crunching the Numbers

-         Factoring big numbers

-         Hands-on exercise III

 

[Chapter 7]

Unit VIII

PGP – group presentation

 

Unit IX

Is There a Compromise? – group debate or presentation

-         more restrictive regulation for law enforcement and national security

-         lose regulation for privacy

-         who will win the game eventually: codemakers or codebreakers?

 

 


Case Design Details

Unit I

Introduction                                                                                                  5

 

Unit II

Monoalphabetic Encryption                                                                       

 

Unit III

Frequency Analysis                                                                           8

 

Unit IV

Polyalphabetic Encryption                                                              

 

Unit V

Breaking Vingenere Ciphers                                                                        10

 

Unit VI

The Birth of Public Key Cryptography

 

Unit VII

Crunching the Numbers                                                                              18

 

Unit VIII

PGP – group presentation

 

Unit IX

Is There a Compromise?                                                                             19                   

 


Unit I

Introduction

 

The history of secret communication

Communication in general:

-         using pigeons to carry messages (4000 years ago?)

-         beacon-fire – towers are built near borders on which fire would be lit to give alarm when a neighboring country is attempting an invasion (3000 years ago)

 

Incidences achieved/attempted by steganography

-         Demaratus, an expelled Greek, sent a message (which was written on a pair of wooden folding tablets and covered with wax) to warn the Spartans of Xerxes’ (the Persian king) invasion plan. (480 B.C.)

-         Histaiaeus, in order to encourage Miletus to revolt against the Persian king, sent him a message written on the messenger’s shaved scalp and then covered with re-grown hair

-         Emperor Xian (Xian-Di) of the Han Dynasty (about 220) attempted to send a message (referred as an imperial edict) hidden in a belt to loyal nobles to advocate attack on betrayed prime minister.

o       http://www.threekingdoms.com/chapter.php?c=20
Romance of the Three Kingdoms/Chapter 20/Verses 54~102

Influential cryptography techniques

-         Transposition

o       rail fence transposition: a message is written with alternate letters on separate upper and lower lines

o       Spartan scytale, the first military cryptographic device (5th century B.C.):

-         Substitution

o       Caesar shift cipher: the plain alphabet is replaced with a cipher alphabet, which has been shifted by three places (or anywhere between 1 and 25)

o        Vigenere square:

 

Kerckhoff’s Principle:

The security of a cryptosystem must not depend on keeping secret the crypto-algorithm. The security depends only on keeping secret the key.

 

-         A cryptosystem should be easy to implement

-         It should allow for a wide range of keys

-         It should be hard to decipher without the knowledge of the key

 

The key should be as simple as possible


Definitions

 

 


Units II & III

Monoalphabetic Encryption & Frequency Analysis

 

In ancient times, steganography was used more than cryptography when messages needed to be sent secretly.   But hiding a plain text message under some kind of cover is not secure, since the information can be readily read if the disguise is revealed. 

-         What would happen if Cao Cao took the robe and girdle from Dong Cheng and did the same thing to get the hidden decree?

-         What if Histaiaeus’s messenger was caught and had his hair shaved?

Although an encrypted message itself suggested the conspiracy, the content of the message could still be kept unknown.

 

Simple encryption techniques, such as the Caesar-shift cipher, were applied to messages written in alphabetic languages. 

 

Monoalphabetic cipher: only one cipher alphabet is used

 

Well-known examples

 

Caesar shift cipher:

a

b

c

d

e

f

g

h

i

j

k

l

m

n

o

p

q

r

s

t

u

v

w

x

y

z

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

A

B

C

 

Rot 13:

a

b

c

d

e

f

g

h

i

j

k

l

m

n

o

p

q

r

s

t

u

v

w

x

y

z

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

A

B

C

D

E

F

G

H

I

J

K

L

M

 

In general, the difference between the two lines can be anywhere between 1 to 25 letters.  It is easy to ignore that a key is needed in even the simplest ciphers as shown above.  You can think the starting letter in the cipher alphabet will suffice the (encryption) key, and the decryption key is to rotate the original alphabet to the same amount in the opposite direction.  However, generally speaking, it is the whole alphabet that should be deemed as the key.  Examples are random permutation of the alphabet as the key, instead of just shifting the original alphabet by a number of letters.  A random permutation is obviously stronger than, say Caesar cipher.  But it put a heavier burden on key distribution, which will be discussed in greater details in a later class.

 

[Attach examples on encryption and code-breaking by frequency analysis.]
Caesar’s Cipher

 

A substitution cipher used by Caesar. In its original usage, each letter in the message was replaced with the letter three places further down the alphabet.  More generally, x can be used to replace three, so long as x is within the range from one to 25.  Such a cipher technique can be broken with the aid of frequency analysis.

 

Although the fact that a key is used is not so obvious, it is not hard to see that the key in encryption is the alphabet that is shifted three (or x) places forward.  When interpreting the cipher, the key should be an alphabet shifted 3 (or x) places backward.

 

It’s going to be hard to yield meaningful letter count results when the message is short.

 

Example 1: Decipher encrypted text from the Romance of the Three Kingdoms:

-         Original text

-         Encrypted text (shifted by 5, with non-letters removed and in all-caps)

-         Frequencies compared with standard distribution given in the Code Book

-         Decrypted text


 

AFTERREFLECTIONCAOCAOABANDONEDTHEPROJECTBUTDONGCHENGSPLOTWASNOTTOGOUNPUNISHEDALL

FIVEOFTHECONSPIRATORSWITHEVERYMEMBEROFTHEIRHOUSEHOLDSSEVENHUNDREDATLEASTWERETAKE

NANDPUTTODEATHATONEORANOTHEROFTHEGATESOFTHECITYTHEPEOPLEWEPTATSUCHMERCILESSANDWH

OLESALESLAUGHTER

 

FKYJWWJKQJHYNTSHFTHFTFGFSITSJIYMJUWTOJHYGZYITSLHMJSLXUQTYBFXSTYYTLTZSUZSNXMJIFQQ

KNAJTKYMJHTSXUNWFYTWXBNYMJAJWDRJRGJWTKYMJNWMTZXJMTQIXXJAJSMZSIWJIFYQJFXYBJWJYFPJ

SFSIUZYYTIJFYMFYTSJTWFSTYMJWTKYMJLFYJXTKYMJHNYDYMJUJTUQJBJUYFYXZHMRJWHNQJXXFSIBM

TQJXFQJXQFZLMYJW

 

Result of Frequency Analysis

Encrypted

Original

Standard

A       11

B       19

C       0

D       7

E       0

F       78

G       11

H       35

I       39

J       148

K       27

L       19

M       66

N       31

O       3

P       3

Q       42

R       11

S       62

T       93

U       31

V       0

W       54

X       58

Y       109

Z       31

A       78

B       11

C       35

D       39

E       148

F       27

G       19

H       66

I       31

J       3

K       3

L       42

M       11

N       62

O       93

P       31

Q       0

R       54

S       58

T       109

U       31

V       11

W       19

X       0

Y       7

Z       0

A       82

B       15

C       28

D       43

E       127

F       22

G       20

H       61

I       70

J       2

K       8

L       40

M       24

N       67

O       75

P       19

Q       1

R       60

S       63

T       91

U       28

V       10

W       24

X       2

Y       20

Z       1


Units IV & V

Polyalphabetic Encryption & Breaking Vigenere Cipher

 

Vigenere Cipher

 

Vigenere Cipher is a polyalphabetic cipher that was developed around 1500.  The Vigenere square contains 26 separate cipher alphabets, each one a Caesar-shift alphabet, and a keyword defines which cipher alphabet should be used to encrypt each letter of a message.

 

I will leave the fun to you when you read through the chapter.  Stories about

-         The secret of Louis XIV and the Man in the Iron Mask

-         The Black Chamber in Vienna

-         The invention of telegraph and the Morse code

-         The Beale Papers and the mystery treasure

We will be focusing on the strength of Vigenere cipher monoalphabetic cipher, and the way to break it.

 

Polyalphabetic cipher versus monoalphabetic cipher

 

As we learned from the last class, a monoalphabetic cipher, such as Caesar cipher, can be broken by using the frequency analysis technique.  Since a polyalphabetic cipher employs a number of separate cipher alphabets, a simple frequency analysis won’t reveal the truth.  Instead, a number of separate frequency analysis runs are needed, and the number is the length of the keyword.  Therefore, the key is to determine the keyword: first its length; then its content – determined by as many frequency analysis runs.  With the keyword in hand, the decoding process becomes a straightforward, though tedious, task.

 

In this case, the key is the keyword and the corresponding shifted alphabets in the Vigenere square.

 

Example 2: romance of the three kingdoms (24:1?)

-         Original text

-         Encrypted text (with keyword SOUTH, non-letters removed, and in all-caps)

-         Simple frequency analysis, as if a monoalphabetic cipher was used

o       A false decryption, still gibberish

-         Determine the length of the keyword

o       Which turns out to be 5

-         Determine the content of the keyword

o       Five separate frequency analysis runs

o       Frequencies compared with standard distribution given in the Code Book

o       Determine the five letters

-         Decrypted text


The Vigenere square

 

BCDEFGHIJKLMNOPQRSTUVWXYZA

CDEFGHIJKLMNOPQRSTUVWXYZAB

DEFGHIJKLMNOPQRSTUVWXYZABC

EFGHIJKLMNOPQRSTUVWXYZABCD

FGHIJKLMNOPQRSTUVWXYZABCDE

GHIJKLMNOPQRSTUVWXYZABCDEF

HIJKLMNOPQRSTUVWXYZABCDEFG

IJKLMNOPQRSTUVWXYZABCDEFGH

JKLMNOPQRSTUVWXYZABCDEFGHI

KLMNOPQRSTUVWXYZABCDEFGHIJ

LMNOPQRSTUVWXYZABCDEFGHIJK

MNOPQRSTUVWXYZABCDEFGHIJKL

NOPQRSTUVWXYZABCDEFGHIJKLM

OPQRSTUVWXYZABCDEFGHIJKLMN

PQRSTUVWXYZABCDEFGHIJKLMNO

QRSTUVWXYZABCDEFGHIJKLMNOP

RSTUVWXYZABCDEFGHIJKLMNOPQ

STUVWXYZABCDEFGHIJKLMNOPQR

TUVWXYZABCDEFGHIJKLMNOPQRS

UVWXYZABCDEFGHIJKLMNOPQRST

VWXYZABCDEFGHIJKLMNOPQRSTU

WXYZABCDEFGHIJKLMNOPQRSTUV

XYZABCDEFGHIJKLMNOPQRSTUVW

YZABCDEFGHIJKLMNOPQRSTUVWX

ZABCDEFGHIJKLMNOPQRSTUVWXY

ABCDEFGHIJKLMNOPQRSTUVWXYZ

 

 

 

Example II

 

AfterreflectionCaoCaoabandonedtheprojectButDongChengsplotwasnottogounpunishedAllfiveoftheconspiratorswitheverymemberoftheirhouseholdssevenhundredatleastweretakenandputtodeathatoneoranotherofthegatesofthecityThepeopleweptatsuchmercilessandwholesaleslaughter

 

STNXYJSZELUHCHUUOIVHGOVTUVCHXKLVYIYGXYVATINWVFUWALFUMISGHQTZFCNMVYCOGWMBCLOWRUESXWPXVXHBXJGBMIPJONHYKKCMOWJYKFESGULJCZMOWWLAVMGYAVDRMLLNSHABFRLXKSHFXHKHQXYWHUDLFOHWWMHNHKWONAHLCHXVJOHHAZSLHMLVYZHLSMHMLVYVPLMNALHSIISWKYIASHMNJZAYKJAZYLZSBXPOGZYLHDSMEHMUBMLJ

 

patterns=

{CHX=26:176,

HML=188:198,

HMLV=188:198,

HMLVY=188:198,

LVY=30:190:200:200,

MLV=189:199,

MLVY=189:199,

MOW=103:118,

ZYL=231:241}

keyLength=5

 

Letter1 >>SJUUGVLGTFFGFYMWXXGJKWEJWMDNFSKWFMWLJZLLLLHWSZASGDMJ

====S

A     76    82

B     19    15

C     38    28

D     19    43

E     115   127

F     38    22

G     19    20

H     38    61

I     19    70

J     0     2

K     0     8

L     38    40

M     19    24

N     96    67

O     96    75

P     19    19

Q     0     1

R     96    60

S     38    63

T     115   91

U     76    28

V     19    10

W     0     24

X     0     2

Y     0     20

Z     0     1

 

Letter2 >>TSHOOCVXIUUHCCBRWHBOKJSCWGRSRHHHOHOCOSVSVMSKHAZBZSU

====O

A     117   82

B     0     15

C     0     28

D     58    43

E     137   127

F     19    22

G     58    20

H     58    61

I     39    70

J     19    2

K     0     8

L     39    40

M     19    24

N     58    67

O     98    75

P     0     19

Q     0     1

R     0     60

S     19    63

T     156   91

U     19    28

V     19    10

W     39    24

X     0     2

Y     19    20

Z     0     1

Letter3 >>NZCIVHYYNWMQNOCUPBMNCYGZLYMHLFQUHNNHHLYMYNIYMYYXYMB

====U

A     39    82

B     19    15

C     19    28

D     19    43

E     196   127

F     39    22

G     0     20

H     39    61

I     58    70

J     0     2

K     0     8

L     19    40

M     19    24

N     98    67

O     39    75

P     0     19

Q     0     1

R     58    60

S     117   63

T     137   91

U     19    28

V     19    10

W     39    24

X     0     2

Y     0     20

Z     0     1

 

Letter4 >>XEHVTXIVWAITMGLEXXIHMKUMAALAXXXDWHAXHHZHVAIINKLPLEM

====T

A     39    82

B     19    15

C     58    28

D     39    43

E     156   127

F     0     22

G     19    20

H     117   61

I     0     70

J     0     2

K     19    8

L     58    40

M     0     24

N     19    67

O     117   75

P     98    19

Q     0     1

R     39    60

S     78    63

T     78    91

U     19    28

V     0     10

W     19    24

X     0     2

Y     0     20

Z     0     1

Letter5

>>YLUHUKYAVLSZVWOSVJPYOFLOVVLBKHYLWKHVAMHMPLSAJJZOHHL

====H

A     117   82

B     0     15

C     58    28

D     58    43

E     137   127

F     39    22

G     0     20

H     78    61

I     39    70

J     0     2

K     0     8

L     58    40

M     0     24

N     39    67

O     117   75

P     39    19

Q     0     1

R     78    60

S     39    63

T     58    91

U     19    28

V     0     10

W     0     24

X     0     2

Y     19    20

Z     0     1

 

The keyword is {SOUTH}

 

AFTERREFLECTIONCAOCAOABANDONEDTHEPROJECTBUTDONGCHENGSPLOTWASNOTTOGOUNPUNISHEDALLFIVEOFTHECONSPIRATORSWITHEVERYMEMBEROFTHEIRHOUSEHOLDSSEVENHUNDREDATLEASTWERETAKENANDPUTTODEATHATONEORANOTHEROFTHEGATESOFTHECITYTHEPEOPLEWEPTATSUCHMERCILESSANDWHOLESALESLAUGHTER

 


Units VI & VII

Public Key Cryptography

 

The computer played a crucial role in postwar battle between codemakers and codebreakers.  Today’s advanced cryptographic operations involve mind-boggling amounts of mathematical calculations, and computers perform these calculations exponentially faster than a human can perform them by hand or mechanical devices.

 

Computer encryption is greatly different from mechanical encryption, in at least the following significant aspects:

 

  1. A mechanical device is limited by can be physically built, whereas a computer can mimic virtually anything that you can ever imagine.
  2. Electronics can operate far more complicated calculations far more quickly than mechanical scramblers.
  3. A computer scrambles numbers, rather than letters of alphabet.  Therefore the numbers of possible keys and the complexity of the encryption increased greatly.

 

The weakest link in the chain of security: key distribution.

-         No matter how secure a cipher is in theory, in practice it can be undermined by the problem of key distribution.

-         Securing key distribution by person is both time and resource consuming, which is a great burden to national governments and beyond what individual businesses can afford.

 

The greatest revolution in the twentieth-century cryptography has been the development of techniques to overcome the problem of key distribution: public key cryptography.

 

To understand how public keys could become a reality, let’s consider the widely used Alice-Bob-Eve story:

Alice wants to send a message to Bob, or vice versa, and Eve is trying to eavesdrop.  If Alice is sending private messages to Bob, she will encrypt each one before sending it, using a separate key each time.

 

To secure the keys Bob needed to decipher Alice’s messages by sending keys in person, the options include:

-         Alice and Bob meet regularly to determine keys that will be used in the period before their next meeting

-         They choose to hire couriers

 

The breaking point to the key exchange axiom that had been deemed an indisputable truth can be demonstrated in the following imaginary scenario, which consists of a series of hands-shaking protocols:

 


 

  Alice                                                    Bob

 

 

 

Although the doubly encrypted scheme requires no key exchange, there is a fundamental obstacle that prevents it to become practical: the maxim “last on, first off” should be obeyed.  In other words, the last stage of encryption should be the first to be decrypted, since modern encryption operations are not so simple as the Caesar substitution.

 

Hellman’s scheme, as illustrated in Table 26 on page 265, allows key exchange through a public conversation.  This is made possible by the unique one-way function used.

 

[Attach the photocopy]

 


The Birth of Public Key Cryptography

 

Although the DHM scheme revealed that a secure key exchange is not a necessity any more, a key exchange process is still needed for sending each private message.  This can be rather inconvenient in real world scenarios: Alice cannot send her message before she get a respond back from Bob about the number b

 

The problem is at the fact that a symmetrical key is in use: both Alice and Bob are using the same (secrete) key.  This means that the unscrambling process is exactly the opposite of scrambling.

 

The real breakthrough is the concept of a pair of keys, instead of one single key, should be used: one for public encryption, and one for private decryption.  Anyone can send a message encrypted using Alice’s public key, which is easily available as her telephone number in a phone directory.  But only Alice knows her private key and hence can interpret those messages.

Using the padlock and key metaphor, you can think that Alice designed both the padlock and the key.  Instances of the padlock will be made available to everyone who wants to send a secure message to Alice, whereas the key will be kept private to Alice.  Everyone can send a locked box through the postal service, yet only Alice knows how to open it and view the content.

[In Chinese, there is a saying “Let he who tied the bell on the tiger take it off”, which usually means whoever started the trouble should end it.  It may be used here to describe the public key situation.]

 

The RSA asymmetric cipher is based on primary numbers and modular functions.

We’ll keep the mathematics used in our discussion at a high school level.

-         The first step is to compute N from the multiplication of two very large prime numbers p and q. 

o       A prime number is an integer that is only divisible by 1 and itself.

o       When we say VERY LARGE, we mean that p and q each contains around 308-digits.  Think about a number with over three hundreds trailing 0’s. 

-         Then, more mathematic functions are invoked to calculate two additional integers that are usually referred to as e and d.

o       The set {p, q, d} forms the private key.  Only Alice knows it.

o       The set {N, e} forms the public key, which will be made to anyone who is interested.

Refers to Appendix J for a simplified illustration of how these keys can be used in encrypting and decrypting a message, sent from Bob to Alice.


A Simple Example of Computer Cryptography

 

With all the math you’ve read about in this chapter, you might have the impression that it would require a Ph.D. in mathematics from MIT to perform cryptography operations.  Luckily, with modern computer programming language

 

The following code snippet is written in Java, a popular programming language designed with Web application and security in mind.

 

try

{

  //look up a key generator for the DES cipher

  KeyGenerator kg = KeyGenerator.getInstance(“DES”);

 

  //Generate a secret key that can be used by the DES cipher

  SecretKey key = kg.generateKey();

  SecretKeySpec keySpec = new SecretKeySpec(key.getEncoded(), “DES”);

 

  //Lookup an instance of a DES cipher

  Cipher cipher = Cipher.getInstance(“DES”);

 

  //Initialize the cipher using the secret key

  cipher.init(Cipher.ENCRYPT_MODE, keySpec);

 

  //Encrypt our message

  String plaintext = “This is a secret message”;

  byte[] cipherText = cipher.doFinal(plaintext.getBytes());

 

  System.out.println(“Resulting Cipher Text:”);

  for (int i=0; i<cipherText.length; i++)

  {

    System.out.print(cipherText[i] + “ “);

  }

  System.out.println();

 

} catch ()

{

  e.printStackTrace();

}

 

It is not hard for well-trained Java programmer to understand and write programs like this.  The result will be different from time to time, since the symmetric secret key is essentially random.  Here is one possible system output:

 

Resulting Cipher Text:

106 93 20 33 -86 -110 109 87 57 31 95 5 -67 36 -39 -7 117 -50 119 -26 -51   -40 118 105 68 5 -29 -47 -90 -89 -70 84

 

You don’t have to understand the meaning of the Java code in detail.  This example is used mainly to give you some idea about:

-         modern cryptography works on numbers, not characters

-         it doesn’t need to look mathy (or messy) when you do it: the standard operations are built into libraries, as a programmer one can simple use (or reuse) them.

 


Units VI & VII

Pretty Good Privacy

 

We are in the Information Age now!  Everyone should be able to sense that in one way or another.  You probably

-         Read more news online than any other sources.

-         Pay your bills online instead writing checks.

-         Get emails far more than traditional mails.  Spam and those infected with virus?

-         Chat with somebody else in an online setting more often than personally meet with somebody or even talk over the phone.

-         Feel tired of getting your prescription drugs from your local drug store, or one that is even within this country.

In the private sectors, we’ve seen dotcoms come and go.  When dealing with Uncle Sam, you might have already filed your tax return on-line, or have downloaded certain official forms or filed some on-line.  The most inconvenient thing is that if you want to vote, you still have to show up in person, even if some electronic devices will be used.

 

“However, the success of the Information Age depends on the ability to protect information as it flows around the world, and this relies on the power of cryptography.”  Modern cryptography provides almost unbreakable locks and the technologies are accessible to almost any clients who may want to use them: governments and the military, businesses, and ordinary people.

 

PGP is a mix of both symmetric and asymmetric ciphers, targeted especially for parties lacking powerful computing resources, typically ordinary people.  Its developer, Phil Zimmermann believes that everybody deserves privacy in the Information Age, which means individual freedoms declared in the Constitution. 

 

As opposed to the approach that apply the RSA cipher to the full length of a message, the PGP approach applies asymmetric RSA cipher to a secret key only, which is used to encrypt the message itself.

 

Encryption for the Masses … Or Not? (class discussion)