CIS 554 Scala 2: Playfair Cipher
Fall 2015, David Matuszek

Purpose of this assignment

To get you started programming functionally in Scala.

General idea

Implement the Playfair Cipher (see the Wikipedia article) for enciphering and deciphering messages. Use this variant:

Assignment details

Here is an example input to be encoded:

An anonymous reader sends word of a proof-of-concept Google Chrome browser
extension that steals users' login details. The developer, Andreas Grech,
says that he is trying to raise awareness about security among end users,
and therefore chose Chrome as a test-bed because of its reputation as the
safest browser.

With keyword "Pennsylvania", here is the code block:

 p   e   n   s   y 
 l   v   a   i   b 
 c   d   f   g   h 
 k   m   o   q   r 
 t   u   w   x   z 

Here is an example encoded output:

fafaw aermw yqnvm vqyns genwm hwoln kqwow ofkpf nexcq wqfvp
dckqu vhzwn ynmyz unsig wazcl wpxnv ipxey mpiqf asmvw lbvpx
dymvd vaken obefm yinhq pdgyb npxfb zcsvp xzbas cxqki bynfn
bonsn yniar wuynd tqbzp vowad sefxe ymnie fzcym ndqkp dfryn
dckqu vinlw nyzlv mvyfl xenmg axpmy etwlx lwain zcnyf onyzl
kqxny m

Program structure

Use additional classes, objects, and methods as you see fit.

Special rules

The reasons for these rules are twofold: (1) They are intended to get you using some of the unique Scala constructs, and (2) It is easy to write a program to count these keywords.

Due date

Zip your Scala project and submit it via Canvas by 6am Wednesday, November 25.