Colorado State University Pueblo, Spring 2021
CIS 491 — Special Topics, Introduction to Cryptology: Basics
to Blockchains
Course Schedule & Homework Assignments
This is a mostly asynchronous course, but synchronous events (always
optional) for the course will be noted below on the corresponding
date.
New material will drop every Monday at noon local time for the week and
will always be available through links on this page, as will be the
assignments. Assignments are generally due by the next Monday, usually
to be turned in through BlackBoard.
While the material for a week will drop on Monday, if there is anything
that needs to be changed — such as fixing an error some
assignment or changing a time of a synchronous meeting — this page
might be changed during the week. Therefore, it is always a good idea to
check in here before doing an assignment or looking for a synchronous
event (such as online office hours).
Here is a link back to the course syllabus/policy
page.
About the office hours, noted below:
You instructor is happy to chat with you about anything course- (or,
indeed, school-)related in those times: they're your times.
But Zoom closes rooms if they are inactive for too long, so you
instructor may not have the room open until students arrive, or unless
students have said ahead of time that they will be coming to that
particular office hour. So if you go to the Zoom room and wait more
than two minutes to be admitted, or are told that the room is not open
yet, please send your
instructor an email asking for the room to be opened -- think of
this as knocking on a (virtual) office door: someone is
there and is happy to chat with whomever comes by, but just needs to be
told to open the door!
Week 1: Getting started with this course, the subject of cryptology, and
a programming environment for coursework.
Content:
-
Organization of this course:
-
You might like to watch
a sort of trailer for
this course which talks about what it will cover and why this
is interesting and useful.
-
It would be foolish not to acknowledge that this course is
happening in a very difficult time. Here is
a video which discusses
how we can try to be flexible with, and supportive of, each
other in this crazy moment.
-
Read the course
syllabus.
-
We will be using the web annotation tool
hypothes.is in this
course, lets start by annotating the syllabus! To get started
with that, go to the
hypothes.is "Getting Started" page and follw the
instructions either to add the Chrome extension, if you use that
browser, or the bookmarklet, if you use another browswer.
-
Follow invitation link in the Using hypothes.is item
of BlackBoard's Getting Started page for this course
and join the private group called
CSU CIS 491 Spring 2021.
-
Always do annotation for this course in that private
hypothes.is group! Note: if you use hypothes.is
through BlackBoard in other classes, your account will be
different here from there. This account you are being asked to
make is useable all over the Internet and not only through CSUP's
BlackBoard site. The account and the private group
CSU CIS 491 Spring 2021 in which you are asked
to annotate for this course, are completely distinct from anything
built automatically by CSUP's automatic Bb/hypothes.is
integration.
-
Go to the
course syllabus and start hypothes.is (you may have to
login).
-
To show that you have set up hypothes.is correctly, make
some annotation on the course syllabus. Annotate in
any of the following ways:
-
Note something that wasn't clear, by posing a question in
the annotation which your instructor will answer.
-
If there is anything you particularly like, or
particularly dislike, in the course organization, make
an annotation to that effect.
-
If there is any addition, subtraction, or change in the
syllabus that would make it clearer or make the class
more effective for you, please make an annotation to that
effect.
-
If you find any typos or other mistakes, point them out
in an annotation.
Don't forget that your annotations will be visible to everyone
in our private group, but to no one else on the web.
-
One-on-one meetings between students and instructor: your instructor
would like to know some things about your background and experience
with languages and platforms. Please send an email to
jonathan.poritz@gmail.com giving the following information:
-
What computer languages do you know, and how well do you know
them?
-
In particular, do you have any experience with Python?
-
Have you used Linux?
-
Do you have reliable access to a machine running Linux and
connected to the Internet?
-
While we're at it, please list some days and times during the
week that you would be able to drop in for office hours or
working sessions with your classmates and professor, so that
times can be set up which are most convenient for everyone
(even if these times are optional).
-
Setting up a comfortable programming platform for working on course
projects
-
Please try to come to office hours on Monday or Tuesday to discuss
this with your instructor. If you cannot make those times, try
to find another time you can meet your instructor by emailing
some possibilities to jonathan.poritz@gmail.com.
-
Building a common understanding of the scope and fundamental problems
of the subject of cryptology and, in particular,
some basic terminology. For this, read in
this open textbook the following:
-
Chapter 4 intro on page 55.
-
Section 4.1, pp. 55-58
-
The
first page of Section 4.2, being page 60, stopping before
Definition 4.2.2, on the sentence which ends "...early modern
period."
-
First programming task of this week: write code which implements
the Cæsar cipher, both encryption and decryption, with any
key (=displacement in the alphabet). You will have to think about
how to handle non-alphabetic characters, upper and lower case,
etc. ... or will you?
-
The next step we want is to do cryptanalysis of the Cæsar
cipher.
-
How many possible keys are there for the Cæsar cipher?
-
Would it therefore be practical to try the brute
force attack, of trying to decrypt with all possible
keys? How long might that take? How exactly would you do it?
-
What about if you wanted to take the humans entirely out of the
cryptanalysis process? Can we do it entirely without human
supervision?
Time-bound activities:
-
:
-
Today is Martin Luther King Day, we shouldn't be meeting at all!
You might read some of his writings, or some of the story of his
life (e.g., at his Wikipedia page. It's interesting to note that
he was much more radical than the version of his thought as it is
usually taught today would have you believe.
-
TBH, the course's BlackBoard site is also in a bit of chaos at
the moment. While you can follow the directions on this page,
many aspects of how this will be set up need to be finalized
— and they will be, in the next 24-48 hours!
-
Office hours at
10am: please drop in if you can!
-
:
-
:
-
:
-
:
-
This is the last day to add classes.
-
Office hours:
tentatively at 10am.
Week 2
Content:
-
Course content has moved to an ever-growing resource which will be
referred to in the future as the course textbook. While the starting readings there are
very similar to the other resource from last week, it would be a
good idea to skim them here, as well.
-
What follows is a list of things to do which includes both the tasks
from Week 1 as well as Week 2, because the roll-out was complicated
by NetID and Blackboard issues — which means that it will seem
like a very long list. But don't worry, take your
time, there is no rush to get everything done immediately!
-
Note also that, with the solution of the Blackboard issues, the
explanation of the full details of the approach to grading in this
course has been clarified in the updated course syllabus.
-
OK, here we go on specifics:
-
Read §1.1 Some Speculative History. Pay attention
particularly here to the terminology in bold in
Definitions and the basic metaphor of Alice, Bob, and Eve
in the general discussion (and
the diagram on page 3).
-
Submit Reading Response 1.1.1 through Blackboard.
-
Submit Reading Response 1.1.2 through Blackboard.
-
Read §1.2 The Caesar Cipher and Its Variants intro and §1.2.1 Keys only matter "mod 26". Pay
attention particularly here to the algorithm of this cipher, the bits
of basic Python syntax, and the basic terminology
of "mod n" (and its Python implementation).
-
Submit Reading Response 1.2.1 through Blackboard.
-
Submit Reading Response 1.2.2 through Blackboard.
-
Submit Coding Task 1.2.1 through Blackboard.
-
Submit Coding Task 1.2.2 through Blackboard.
-
Submit Coding Task 1.2.3 through Blackboard.
-
Read §1.2.2 Modernizing the Caesar cipher. Pay
attention particularly here to issues of encoding strings, e.g.,
Unicode.
-
Submit Reading Response 1.2.3 through Blackboard.
-
Submit, if you like, Bonus Task 1.2.1 through
Blackboard.
-
Read §1.3 Cryptanalysis of the Caesar cipher.
Unicode.
-
Submit Reading Response 1.3.1 through Blackboard.
-
Submit Coding Task 1.3.1 through Blackboard.
-
Read §1.3.1 Frequency Analysis.
-
Submit Coding Task 1.3.2 through Blackboard.
-
Submit Coding Task 1.3.3 through Blackboard.
-
Submit Coding Task 1.3.4 through Blackboard.
-
Submit Coding Task 1.3.5 through Blackboard.
-
Submit Coding Task 1.3.6 through Blackboard.
-
Submit Coding Task 1.3.7 through Blackboard.
Time-bound activities:
-
:
-
:
-
Office hours at
10am: please drop in if you can!
[Sorry, Zoom was reacting weirdly at the top of the hour,
so it was only possible to start this meeting a bit late. If
you wanted to chat and couldn't get in at that time, please
try again on Wednesday and/or send an individual email.]
-
:
-
:
-
:
Week 3
Content:
-
A number of students are getting a bit stuck on the
Python coding tasks, so we are going to try to get
everyone in sync before we introduce the new material this week.
-
Please contact your instructor by email at
jonathan.poritz@gmail.com if
you are behind in any way on the Python tasks, and/or
come to Monday or Tuesday office hours to talk through any obstacles
to doing the coding tasks.
-
Even if you succeeded in the Python tasks, pleaes
contact your instructor to say if you would like any other regularly
scheduled office hours. Possibilities could include
-
Regularly on Tuesdays and Thursday at 7 or 8pm
-
Regularly on Saturday or Sunday afternoons at 2 or 3om
If any of those would help you succeed in this course — better
than the current M-F at 10am, please say so in your email.
-
Read §1.4 Defending Caesar against frequency analysis: Vigenère and the one-time pad.
-
Submit, if you like, Bonus Task 1.4.1 through
Blackboard.
-
Submit Reading Response 1.4.1 through Blackboard.
-
Submit Reading Response 1.4.2 through Blackboard.
-
Submit Coding Task 1.4.1 through Blackboard.
-
Submit Reading Response 1.4.3 through Blackboard.
-
Submit Coding Task 1.4.2 through Blackboard.
-
Submit Coding Task 1.4.3 through Blackboard.
-
Submit, if you like, Bonus Task 1.4.2 through
Blackboard.
-
Submit Coding Task 1.4.4 through Blackboard.
-
Submit, if you like, Bonus Task 1.4.3 through
Blackboard.
Time-bound activities:
Week 4
Content:
-
Start by doing the reading and tasks outlined above for last week,
which you may not have finished (or even started) since the full
details were not posted as early as was planned.
-
Read §1.5 Preliminary Conclusion of Preliminaries.
-
Submit Reading Response 1.5.1 through Blackboard.
-
Submit Coding Task 1.5.1 through Blackboard.
-
Read the introductory text in Chapter 2: Block Ciphers.
Time-bound activities:
Week 5
Content:
-
Please everyone get caught up on tasks up through the one-time
pads!
Time-bound activities:
-
:
-
:
-
:
-
Couldn't do office hours as scheduled at 10am because of router
problems -- sorry! So instead here are some videos:
-
Here's a video about basic one-time-pad crypto, just with
everything done in the Python interpreter, for English language
cleartexts without special characters.:
-
Video: OTP1
-
Python commands typed:
code_frag1.txt. [Note that
includes all the commands, even the ones
which had mistakes which needed to be corrected. ... Still,
it matches the video best this way!]
-
Now a video about one approach to one-time-pad crypto for any
sort of data, not necessarily in any particular language or
alphabet at all — just bytes of data. Also works with
getting data from a file, writing a key to a file, and writing
the encrypted ciphertext to a file.
This approach works byte by byte, adding the numerical value of
the byte (an integer in the range 0 to 255) to a key byte (another
integer in that same range), and then doing "mod 256" to get it
back into one byte.
-
Video: OTP2
-
Python commands typed:
code_frag2.txt. [Again, this is
all the commands, even the ones which had
mistakes which needed to be corrected.]
-
Finally, another video with a different approach to one-time-pad
crypto for any sort of byte data. This approach, similar to what
is described in thet textbook, uses bitwise operations: not
adding a cleartext byte (integer in the range 0 to 255) to a
one-time pad byte (integer in the same range) and doing mod 256,
but rather adding each specific cleartext bit to
a corresponding bit in the one-time pad, mod 2.
Note that addition of bits mod 2 is exactly the same thing
as exclusive or, XOR, written as a ^
b in Python and usually written as $a\oplus b$ in most
computer science textbooks. the encrypted ciphertext to a
file.
Again uses file reading and writing with bytes
objects.
-
Video: OTP3
-
Python commands typed:
code_frag3.txt. [Again, all
the commands, including mistakes which are then corrected,
to match the video.]
-
:
-
:
-
Apologies, no office hours today because of an all-day conflict!
Week 6
Content:
-
Read §2.1 Why encrypt blocks of data: Shannon's confusion and
diffusion.
-
Submit, if you like, Bonus Task 2.1.1 through
Blackboard.
-
Submit Reading Response 2.1.1 through Blackboard.
-
Submit Reading Response 2.1.2 through Blackboard.
-
Submit Coding Task 2.1.1 through Blackboard.
-
Submit Coding Task 2.1.2 through Blackboard.
-
Submit Coding Task 2.1.3 through Blackboard.
Time-bound activities:
-
:
-
:
-
Zoom office hours
at 10am.
-
Here is video of the
office hours.
-
Here are some of the
Python commands typed during office hours — sorry,
this is not all of the commands during that (full hour-long)
office hour ... something odd happened with the transcripting
of the Python commands! In the future, hopefull this problem
will not recur, and in the meantime the comands are visible
in the above-linked video of the office hour (particularly when
the video is displayed full-screen; also it helps to run it at
1.5x or 2x speed, to avoid the rambling exposition).
-
:
-
:
-
:
Week 7
Content:
-
Please get caught up on all coding and reading tasks, and come to
office hours when you can (or make appointments for other meetings!)
to get help.
-
Submit Coding Task 2.1.4 through Blackboard.
-
Submit Reading Response 2.1.3 through Blackboard.
-
Read §2.2 Encrypting a block at a time with AES.
-
Submit Coding Task 2.2.1 through Blackboard. Note
that for this task (and many that follow), you will have to be
able to use the Crypto.Cipher module. If you are having
trouble finding or using it, please speak to your instructor (come
to office hours!) as soon as possible.
One student mentioned issues with accessing the Crypto
package. Here are some suggestions for approaching this:
-
First of all, try going to Welcome to PyCryptodome's documentation and see if the instructions there help.
-
A student said that there was an issue with his installation
having two packages in Python containing a module named
Crypto so there was a conflict — although it would
then report that none was found! A solution that worked for him
was to enter pip install pycryptodome==3.4.3 in the
console ... so give that a try, if you are having troubles.
[Thanks to James Woznicki for this information!]
-
Submit Coding Task 2.2.2 through Blackboard.
-
Submit Coding Task 2.2.3 through Blackboard.
Time-bound activities:
-
:
-
Apologies, no office hours today because of an all-day conflict!
-
:
-
:
-
:
-
:
Week 8
Content:
-
Submit Reading Response 2.2.1 through Blackboard.
-
Read §2.3 Encrypting more or less than a block with a block cipher.
-
Submit Coding Task 2.3.1 through Blackboard.
-
Submit Coding Task 2.3.2 through Blackboard.
-
Submit Reading Response 2.3.1 through Blackboard.
Time-bound activities:
Week 9
Content:
-
Please get caught up! There is some fairly new material in the
course textbook, and there are associatiated
Reading Responses, Coding Tasks,
and Bonus Tasks.
-
Submit Coding Task 2.3.3 through Blackboard.
-
Submit Coding Task 2.3.4 through Blackboard.
-
Submit Reading Response 2.3.2 through Blackboard.
-
Submit Coding Task 2.3.5 through Blackboard.
Time-bound activities:
-
:
-
:
-
Apologies, no regular office hour today because of a conflict!
-
:
-
:
-
:
-
This is the last day to drop classes with a
W.
-
Apologies, no office hours today because of a last-minute
appointment for a vaccine shot! Please reach out to your
instructor by email if you would like some synchronous chatting
time a bit later in the day -- it can likely be arranged!
Week 10
Content:
-
Read §2.4 Some concluding observations for block ciphers.
-
Submit Coding Task 2.4.1 through Blackboard.
-
Submit Coding Task 2.4.2 through Blackboard.
-
Submit, if you like, Bonus Task 2.4.1 through
Blackboard.
Time-bound activities:
Week 11
Content:
-
Generally, continue to get caught up!
-
Submit Reading Response 2.4.1 through Blackboard.
-
Submit, if you like, Bonus Task 2.4.2 through
Blackboard.
-
Read the introductory text in Chapter 3: Asymmetric [Public-Key] Cryptosystems.
-
Read §3.1 Symmetric, asymmetric, and salty cryptosystems: basics.
-
Submit Reading Response 3.1.1 through Blackboard.
-
Submit Reading Response 3.1.2 through Blackboard.
Time-bound activities:
Week 12
Content:
-
Read §3.2 Using the RSA asymmetric cryptosystem in Python.
Time-bound activities:
-
:
-
:
-
:
-
Apologies, no office hours today because of an all-day conflict!
-
:
-
:
Week 13
Content:
-
Time-bound activities:
Week 14
-
Spring Break! Take some time off, you deserve it.
-
But, if you want, your instructor is happy to meet with you (in
his Zoom room)
at a time of you choosing!
Week 15
Content:
-
Time-bound activities:
Week 16
-
Exam week! (but this class has no exam)
-
:
-
Last date by which you may submit any work to your instructor!
-
Going into the future:
-
Please keep in touch with your instructor, who is pleased to help
former students in any way — technical, bureaucratic, or
otherwise — that might be useful to you.