Problem Set 2: Crypto
tl;dr
-
Watch Week 1’s second lecture.
-
Choose two out of three adventures:
-
Implement Caesar’s cipher.
-
Implement Vigenère’s cipher.
-
Crack passwords.
-
-
Submit your code.
Reminders
Per Week 2’s lecture:
-
Use
help50
as needed. -
Use
eprintf
as needed. -
Use
debug50
as needed.
Getting Started
Alright, here we go again!
Log into cs50.io and execute
update50
within a terminal window to make sure your workspace is up-to-date. If you somehow closed your terminal window (and can’t find it!), make sure that Console is checked under the View menu, then click the green, circled plus (+) in CS50 IDE’s bottom half, then select New Terminal.
Next, execute
mkdir ~/workspace/pset2/
at your prompt in order to make a directory called pset2
in your workspace
directory. Take care not to overlook the space between mkdir
and ~/workspace/pset2/
or any other character for that matter! Keep in mind that ~
denotes your home directory, ~/workspace/
denotes a directory called workspace
therein, and ~/workspace/pset2/
denotes a directory called pset2
within ~/workspace/
.
Now execute
cd ~/workspace/pset2/
to move yourself into (i.e., open) that directory. Your prompt should now resemble the below.
~/workspace/pset2/ $
If not, retrace your steps and see if you can determine where you went wrong. You can actually execute
history
at the prompt to see your last several commands in chronological order if you’d like to do some sleuthing. You can also scroll through the same one line at a time by hitting your keyboard’s up and down arrows; hit Enter to re-execute any command that you’d like.
How to Submit
-
Log into CS50 IDE and open a terminal window, if not open already.
-
Ensure your workspace is up-to-date by executing:
update50
-
Submit at least two of:
-
Caesar, by executing:
cd ~/workspace/pset2/caesar/ submit50 cs50/2018/x/caesar
-
Vigenère, by executing:
cd ~/workspace/pset2/vigenere/ submit50 cs50/2018/x/vigenere
-
Crack, by executing:
cd ~/workspace/pset2/crack/ submit50 cs50/2018/x/crack
-