Unit 4
Unit 4
Unit 4
1 1 2 3 4 5 6 7 8 9 10
4
Unit 4 - Big Data and Privacy
In this unit students explore the technical, legal, and ethical questions that arise from computers enabling the collection and
analysis of enormous amounts of data. In the first half of the unit, students learn about both the technological innovations
enabled by data and the privacy and security concerns that arise from collecting it. In the second half of the unit, students
learn how cryptography can be used to help protect private information in the digital age.
Week 1
Students are introduced to the concept of “big data,” where it comes from, what makes it “big,” and
how people use big data to solve problems, and how much of their lives are “datafied” or could be.
Lesson 2: Finding Trends with Visualizations
External Tool | Presentation
Week 2
Students "rapidly research" a topic of personal interest and respond to questions about how that
innovation produces, uses, or consumes data.
Students investigate some of the world’s biggest data breaches to get a sense for how frequently
they happen and what kinds of data is lost or stolen. They then learn how easily individuals can be
identified with small amounts of seemingly innocuous information.
Week 3
Students examine some of the economic concerns and consumer tradeoffs related to apps and
websites that collect and track data about you in exchange for providing you a service free of cost.
Lesson 7: Simple Encryption
Widget
Students are introduced to encryption and use a widget to attempt cracking some simple
encryption methods.
Students use a widget to experiment with the Vigenère cipher to learn about the relationship
between cryptographic keys and passwords.
Students explore another computationally hard problem - the “Wireless Hotspot Problem” (also
know as the vertex cover or dominating sets problem) - to investigate the characteristics of a
"one-way function": a problem which is easy to construct in such a way that you know the
solution, but is computationally hard to solve.
Week 4
In this big, multi-step lesson, students learn how the basic mechanics and underlying mathematical
principles of public key encryption work. Public key encryption is the basis for most secure
transactions on the internet.
Students pick a type of cyber attack or cybercrime and do some “rapid research” to learn more
about it. The lesson can be used to wrap up the unit or students may optionally complete the
Practice PT in the following lesson before moving on to complete the Explore PT.
Students complete a small research project about a dilemma related to either Big Data or
Cybersecurity. The project mimics elements of the Explore Performance Task.
Chapter Commentary
Chapter Commentary
Key Concepts and Pedagogy
The Pros and Cons of Big Data: The story of this unit is about coming to terms with the world of Big Data that we now
inhabit, and addressing the new modern dilemmas that come along with it. In many ways, this unit acts as a current events
unit, since the daily news is filled with examples: should the government get “backdoor keys” to encryption algorithms in
order to unlock a cell phone used by a terrorist? Should a social media site be able to use the data it has about you and
your relationships to direct advertising at you, or sell information about you to others? These pressing questions have no
easy answers, and the goal is to empower students to understand and come to their own conclusions about the balance of
benefits and harms resulting from our data rich world.
Exploring the Foundations of Cryptography: The activities in the third week around data encryption should look and
feel similar to lessons from Units 1 and 2. The general pattern is to introduce a concept through an unplugged activity or
thinking prompt, and then “plug it in” by using a widget to explore the concept further. The widgets allow students time to get
hands-on with some of the ideas underlying encryption, which are often mathematical in nature.
Rapid Research Lessons: Many of the lessons in this unit are designed as practice for elements of the Explore
Performance Task. In particular, the two “Rapid Research” lessons are good practice for the relatively quick research and
writing students will have to do for the Explore PT. The goal is for students to become adept at looking up sources,
reading/skimming articles for their main points, and being able to explain both sides of an argument or dilemma related to
big data, security and privacy.
Ready for the Explore PT: Following the conclusion of this unit students should be ready to complete the Explore PT. If
you are teaching this course as an AP it’s recommended that after this unit you move on to the Explore PT Prep Unit and
then have students complete the actual Explore Performance Task.
If you are interested in licensing Code.org materials for commercial purposes,contact us.
UNIT Ch. 1 1 2 3 4 5 6 7 8 9 10
4
Lesson 1: What is Big Data?
External Tool
In this lesson, students are introduced to the concept of “big data,” Objectives
where it comes from, what makes it “big,” and how people use big
Students will be able to:
data to solve problems. Students are asked to consider how much of
their lives are “datafied” or could be, and the teacher will show the Identify sources of data produced, used, and
projected growth of data in the world. Students will then investigate a consumed by a web application.
big data tool in pairs to evaluate the tool for its usefulness and Given a tool that provides access to a large
investigate the source of the data used to make the tool. A key take- dataset, explain the kinds of problems such a
away from the lesson is that different considerations need to be made tool could solve.
when trying to look at, use, or analyze tools that use big data. The Use a tool that provides access to “big data”
world of big data is big, and we’ve only begun to figure out how to and investigate its sources.
solve problems with it. Explain that new techniques are necessary to
store, manage, transmit, and process data at
The lesson concludes with a brief introduction to the AP Explore the scale it is currently being produced.
Performance Task which students are recommended to complete at
the end of the unit. Links
Purpose Heads Up! Please make a copy of
Big data is a big deal right now, both in the field of computer science any documents you plan to share
and more broadly across fields and industries. Understanding the with students.
types of things that can be captured in data and anticipating the types
For the Students
of innovations or new knowledge that can be built upon this data is
increasingly the role of the computer scientist. A first step toward College Board - Assessment Overview
understanding big data is a survey of how big data is already being and Performance Task Directions for
Students
used to learn and solve problems across numerous disciplines. The
Activity Guide - Big Data Sleuth Card -
scale of big data makes it hard to “see” sometimes, and techniques for
Activity Guide Make a Copy
looking at, working with, and understanding data change once the
data is “big.” Everything, from how it’s stored to how it’s processed to Big data is better data - TED talk - Video
how it's visualized, is a little different once you enter the realm of big AI, Ain't I a Woman? - Joy Buolamwini -
data. Video
Moore's Law Chart - Image
Agenda Moore's Law - Wikipedia Article
However, Big data is not always better data. A data set can be incomplete or lack diversity, be misinterpreted, or misused.
Prompt: What is the problem that is presented in the video? How do you think this came about? What concerns to you
have about big data after watching the video?
The data was not diverse enough to accurately recognize a person's gender
This leads to questions about how the data set was set up, and the diversity of the team that worked on it
This also leads to concerns about how the data set is used and what people groups are excluded from accurate
representation
Remarks
Part of what contributes to data being "big" is the sheer growth of the amount of data in the world. Let’s have a look at a
graph that shows us just how large big data is.
As you can see from the chart, the amount of data flying around is growing exponentially, doubling every two years or so.
Here’s a way to think about how fast this is: The world will produce as much digital data over the next 2 years, as
currently existed in all of humanity prior to that. And it will do the same the 2 years after that. And so on. That’s a lot!
Moore's Law
However you do it, here are some key ideas students need to know aboutMoore's Law:
Moore's law is actually about computing power, not data, but data growth seems to following the same trend
So far, computing power/capacity seems to double every 1.5-2 years...
That means it grows exponentially...
Exponential growth is hard for humans to fathom...
Teaching Tip
Yet we need to plan for it.
Moore's Law Remarks Time check: You should spend at most 10 minutes with
exponential growth and Moore's law. Most of the time
There is a principle in computer science known as should be spent working on the "Big Data Sleuth" activity
Moore's Law. that follows.
Moore's Law - Wikipedia Article Data Graphic: (Note: This graphic is available for
students on Code.org website) The IDC’s “Digital
It is not a law of nature or mathematics but simply a
Universe” is described as “a measure of all the digital data
surprisingly accurate prediction that was made a long created, replicated, and consumed in a single year.”
time ago. In 1965, a computer chip designer named
source: http://www.emc.com/collateral/analyst-
Gordon Moore predicted that the number of transistors reports/idc-the-digital-universe-in-2020.pdf
one could fit on a chip would double every 18 months
or so.
Amazingly, that prediction has more or less held true to
the present day! The result is that since about 1970,
computers have gotten twice as fast, at half the cost,
roughly every 1.5-2 years. With some small differences,
the same is true for data storage capacity.
This is extraordinarily fast growth - we call it
exponential growth. With more and more machines that
are faster and faster, the amount of data being pushed
around, saved, and processed is growing exponentially.
This is so fast that it's hard to fathom and even harder
to plan for. For example:
If the average hard drive today is 1 TB and you are Teaching Tip
planning for something or 6 years away, you should
Keep It Simple: Students only need to have a sense of
expect that average hard drives will be 8-10 TB.
what Moore's Law is for purposes of putting a name to a
Key Takeaway: We need to keep Moore’s Law in description of how fast computing capacity grows, and to
mind as we plan for the future. understand what it means if they come across it when
reading something.
Big Data Sleuth Card (20 mins) The only reference to it in the framework is this:
Distribute: Activity Guide - Big Data Sleuth Card 7.2.1F Moore's law has encouraged industries that use
computers to effectively plan future research and development
- Activity Guide.
based on anticipated increases in computing power.
Remarks
Teaching Options:
Big data surrounds us but it is sometimes surprisingly Presentation: You can simply give the remarks provided
challenging to get access to it, use it, or see it. Much
Rapid Research: Have students do some "rapid
of the data out there is in the “wild.” Even when the
data is “available,” it can sometimes be challenging to research" on Moore's Law and come back with some
figure out where it came from, or how to use it. answers to collectively discuss.
Put students into pairs and assign each pair one of the
5 websites listed.
Content Corner
1. Web archive http://www.archive.org
2. Measure of America Moore's Law: While the exponential growth principle is
the same for data storage as it is for computing
http://www.measureofamerica.org/maps/
power/speed, it’s worth noting that Moore’s Law actually
3. Wind Sensor network http://earth.nullschool.net/ never referred to data storage capacity, only the number of
4. Twitter sentiment transistors on a chip.
However, the phrase “Moore’s Law” has come to be used
colloquially to refer to the idea that in computers and
information technology everything seems to double -
speed, size, capacity - every 1.5-2 years.
https://www.csc.ncsu.edu/faculty/healey/tweet_viz/tweet_app/
5. Alternative Fuel Locator http://www.afdc.energy.gov/locator/stations/
Student tasks are to follow the resource and answer prompts related to:
Distribute: Give students digital or printed copies of You should be aware that there is a full lesson devoted to
College Board - Assessment Overview and Explore PT prep available in the "AP Explore PT Prep"
unit. That lesson:
Performance Task Directions for Students. We will
review pages 4-6 which introduces the Explore PT Does a deeper dive into the task
Components (Digital copy linked to from student resource Looks at the scoring guidelines
section for this lesson on the Code.org website). Reviews scored samples of projects
Begins the process of preparing to do the real task.
Remarks
You might want to find a time between this lesson and the
At the end of this unit we will be doing the Explore PT. end of Unit 4 to take a look at it with your students so they
To practice the different components of the PT we'll be can have some time for the task to sink in.
practicing them throughout this unit. We're going to
quickly review those components now, but we'll have
opportunities to review and practice them in the next few lessons as well. For right now you don't need to understand all
the details, just the big picture.
Review: Quick skim this document with the class, touching on the following points.
Page 4: The Explore PT has 2 major components, 1. computational artifact, 2. written responses
Pages 5-6: Skim the submission requirements and give students time to read prompts 2a - 2e.
Highlight prompts 2c and 2d which references beneficial / harmful effects and the way computing innovations use data,
themes of this unit.
Explore PT discussion
Discuss: Respond to any questions students share. goals
Don't lose too much time here. You'll have many Goals:
opportunities to review the Explore PT in later lessons. Students are aware they will be completing the Explore
PT after the conclusion of the Unit
Students are aware that they will need to 1) research an
Extended Learning innovation of interest 2) create a computational artifact
3) respond to written reflections
Open Data: You might be interested in looking at some Students are aware they will practice these skills
of the publicly available datasets provided at these sites. throughout and at the conclusion of this unit.
It can take a little digging, but you can see the raw
Keep it short: Avoid making this a 45-minute deep-dive
datasets and some of the applications that have been review of the AP Explore PT and all its components - a
made from them. surface level understanding is all that is needed to
proceed. Practice questions and direct references to
Weather.gov College Board materials are included in each of the next
Open Data (opendata.socrata.com) few lessons. This is a kickoff discussion, and you will have
Open Data Network many opportunities to prepare students for the PT in later
(www.opendatanetwork.com/) lessons.
Assessment
TBD
Standards Alignment
Computer Science Principles
3.2 - Computing facilitates exploration and the discovery of connections in information.
7.2 - Computing enables innovation in nearly every field.
7.5 - An investigative process is aided by effective organization and selection of resources. Appropriate technologies and tools facilitate the
accessing of information and enable the ability to evaluate the credibility of sources.
If you are interested in licensing Code.org materials for commercial purposes,contact us.
UNIT Ch. 1 1 2 3 4 5 6 7 8 9 10
4
Lesson 2: Finding Trends with
Visualizations
External Tool | Presentation
Students use the Google Trends tool in order to visualize historical Objectives
search data. They will need to identify interesting trends or patterns in
Students will be able to:
their findings and will attempt to explain those trends, based on their
own experience or through further research online. Afterwards, Use Google Trends to identify and explore
students will present their findings to ensure they are correctly connections and patterns within a data
identifying patterns in a visualization and are providing plausible visualization.
explanations of those patterns. Accurately describe what a data visualization
of a trend is showing.
Purpose Provide plausible explanations of trends and
patterns observed within a data visualization.
The two main purposes of this lesson are:
1. Navigating and using a real data tool (Google Trends, see below) Preparation
that is external to the course Use the Google Trends tool to familiarize
2. Getting acquainted with talking and writing about data. In particular yourself.
we want to:
Draw a distinction between describing what the data shows and Links
describing why it might be that way
In other words: describe connections and trends in data Heads Up! Please make a copy of
separate from drawing conclusions. any documents you plan to share
We want students to get in the habit of separating thewhat with students.
from the why when it comes to talking and writing about data
For the Students
As a bit of foreshadowing, the next lesson looks deeper into
assumptions that people make about data that can lead to Exploring Trends - Activity Guide
unintentional consequences and even exacerbate some of society's Make a Copy
divisions. Google Trends - Link
Agenda
Getting Started (5 mins)
Introduce: Data Stories
Activity (30 mins)
Exploring Google Trends
Wrap-up (5-20 mins)
Share Data Stories
Assessment
Teaching Guide
Getting Started (5 mins)
Introduce: Data Stories Discussion
Remarks Goal
Goal: Quickly connect today’s activity to previous day, but
Yesterday we started to look at the ways big data is then move into the Google Trends activity.
changing lots of fields. Today we're going to start
looking a little more closely at what we can learn from
data. In particular, how can we use data to learn or "tell a story".
Students will work individually or in pairs to identify The fact that a global "conversation" is now happening
online and computational tools exist to capture and
topics they wish to examine in greater detail.
visualize that conversation enables entirely new ways of
They should spend some time just exploring the tool, identifying, understanding, and predicting patterns in
but eventually they will need to choose a single topic culture and society at large.
or set of topics that they will use to answer the
questions that appear on the bottom of the activity
guide. Teaching Tip
Remarks
Teaching Tip
It’s exciting to be able to look at so much data in such a
concise way, and it certainly feels like we’ve seen a lot For sharing, you may want to: Bring the whole class
of good stories here. As we start thinking more about together. Have individuals share with an elbow partner
how we use data, however, we’ll need to make sure or in a small group.
that the assumptions we’re making about our data are It is likely that students are going to want to play with
correct. Google Trends individually, so having them share with a
(Optional) Collect: student activity guides . small group might be less intimidating. However, with
small groups you will need to circulate and be vigilant
Students may want to revise their stories after the next
about ensuring that students are emphasizing the right
lesson. Hold onto their activity guides or ask them to do things and asking critical questions. You might find it
the same so that they can update their assumptions if easier to ensure that students see the right kinds of critical
necessary after the next lesson. questioning as a whole class.
Assessment
Score Activity Guides
Standards Alignment
Computer Science Principles
3.1 - People use computer programs to process information to gain insight and knowledge.
3.2 - Computing facilitates exploration and the discovery of connections in information.
If you are interested in licensing Code.org materials for commercial purposes,contact us.
UNIT Ch. 1 1 2 3 4 5 6 7 8 9 10
4
Lesson 3: Check Your Assumptions
Research
This lesson asks students to consider carefully the assumptions they Objectives
make when interpreting data and data visualizations. The class
Students will be able to:
begins by examining how the Google Flu Trends project tried and
failed to use search trends to predict flu outbreaks. They will then read Define the digital divide as the variation in
a report on the Digital Divide which highlights how access to access or use of technology by various
technology differs widely by personal characteristics like race and demographic characteristics.
income. This report challenges a widespread assumption that data Identify assumptions made when drawing
collected online is representative of the population at large. To conclusions from data and data visualizations
practice identifying assumptions in data analysis, students are
provided a series of scenarios in which data-driven decisions are
Preparation
made based on flawed assumptions. They will need to identify the KEY Digital Divide and Checking
assumptions being made (most notably those related to the digital Assumptions
divide) and explain why these assumptions lead to incorrect
conclusions. Links
Purpose Heads Up! Please make a copy of
any documents you plan to share
In this lesson we look deeper into why we separate thewhat from the
with students.
why when looking at data. The main purpose here is to raise
awareness of the assumptions that we (all people) make when looking
For the Students
at data and try to call them out. Some of these assumptions lie hidden
Digital Divide and Checking
beneath the surface and we want to shed some light on them by
Assumptions - Activity Guide
looking at some examples from the news. This is a useful mode of
reflection that will serve students well when doing reflective writing on Make a Copy
the performance tasks. Google Trends Video - Video
Wired - What Can We Learn from the
Analyzing and interpreting data will typically require some Epic Failure of Google Flu Trends -
assumptions to be made about the accuracy of the data and the cause Article
of the relationships observed within it. When decisions are made NY Times - Google Flu Trends: The
based on a collection of data, they will often rest just as much on that Limits of Big Data - Article
set of assumptions about the data as the data itself. Identifying and Nature - When Google Got Flu Wrong -
validating (or disproving) assumptions is therefore an important part of Article
data analysis. Furthermore, clear communication about how data was Time - Google's Flu Project Shows the
interpreted should also include an account of the assumptions made Failings of Big Data - Article
along the way. Harvard Business Review - Google Flu
Trends' Failure Shows Good Data > Big
Agenda Data - Article
Getting Started (15 mins)
Video: Google Flu Trends
Google Flu Trends Failure
Activity (25 mins)
The Digital Divide and Checking Your Assumptions
Part 1: The Digital Divide
Part 2: Checking Your Assumptions
Wrap-up (15 mins)
Assessment
Assessment Posibilities
Extended Learning
Teaching Guide
Getting Started (15 mins)
Video: Google Flu Trends Discussion
Show this Google Trends Video - Video video, which Goal
Introduce the idea that incorrect assumptions about a
describes how Google used the trending data students
dataset can lead to faulty conclusions.
saw earlier in the unit to predict outbreaks of the flu.
Earlier prediction of flu outbreaks could limit the number
Thinking Prompt: What are the potential beneficial of people who get sick or die from the flu each year.
effects of using a tool like Google Flu Trends? More accurate and earlier detection of flu outbreaks can
Discuss: Students should share their responses in small ensure resources for combating outbreaks are allocated
groups or as a class. In general, responses should be and deployed earlier (e.g., clinics could be deployed to
centered around the following ideas. affected neighborhoods).
Share one or more of these articles with the class. They detail why Google Flu Trends eventually failed and should serve as
a basis of discussion for some of the potential negative effects of large-scale data analysis.
Wired - What Can We Learn from the Epic Failure of Google Flu Trends - Article
NY Times - Google Flu Trends: The Limits of Big Data - Article
Nature - When Google Got Flu Wrong - Article
Time - Google's Flu Project Shows the Failings of Big Data - Article
Harvard Business Review - Google Flu Trends' Failure Shows Good Data > Big Data - Article
Thinking Prompt:
Teaching Tip
"Why did Google Flu Trends eventually fail? What
Reading Strategy: Most of these articles are somewhat
assumptions did they make about their data or
more sophisticated in their analysis of the problems with
their model that ultimately proved not to be Google Trends than is necessary for discussion. You may
true?" wish to read one of these articles together as a class and
just touch on the key points outlined below.
Discuss:
Google Flu Trends worked well in some instances but often over-estimated, under-estimated, or entirely missed flu
outbreaks. A notable example occurred when Google Flu Trends largely missed the outbreak of the H1N1 flu virus.
Just because someone is reading about the flu doesn’t mean they actually have it.
Some search terms like “high school basketball” might be good predictors of the flu one year but clearly shouldn’t be
used to measure whether someone has the flu.
In general, many terms may have been good predictors of the flu for a while only because, like high school basketball,
they are more searched in the winter when more people get the flu.
Google began recommending searches to users, which skewed what terms people searched for. As a result, the tool
was measuring Google-generated suggested searches as well, which skewed results.
Transitional Remarks
The amount of data now available makes it very tempting to draw conclusions from it. There are certainly many beneficial
results of analyzing this data, but we need to be very careful. To interpret data usually means making key assumptions. If
those assumptions are wrong, our entire analysis may be wrong as well. Even when you’re not conducting the analysis
yourself, it’s important to start thinking about what assumptions other people are making when they analyze data, too.
Activity (25 mins)
The Digital Divide and Checking Your Assumptions
Distribute: Activity Guide - Digital Divide and Checking Assumptions - Activity Guide
Discuss:
In small groups or as a class, students should discuss the answers they have recorded in their activity guides. Key points
for the following discussion include:
Access and use of the Internet differs by income, race, education, age, disability, and geography.
As a result, some groups are over- or under-represented when looking at activity online.
When we see behavior on the Internet, like search trends, we may be tempted to assume that access to the Internet is
universal and so we are taking a representative sample of everyone.
In reality, a “digital divide” leads to some groups being over- or under-represented. Some people may not be on the
Internet at all.
The data collected is representative of the population at large (e.g., ignoring the “digital divide”).
Activity online will lead to activity in the real world (e.g., people expressing interest in a candidate online means they will
vote for him or her in real life).
Data is being collected in the manner intended (e.g., ratings are generated by actual customers, instead of business
owners or robots).
Many other assumptions regarding data are possible.
Closing Remarks
Teaching Tip
Would anyone like to revise the explanation
they gave for their google trends research in Leading the Discussion:
the previous lesson? The answer key to the activity guide contains possible
Has what you’ve learned today changed your assumptions that could be made in each data scenario
perspective on the “story” you thought the data presented. In most instances, there will be many other
was telling? possible assumptions. The focus here should be primarily
on building a habit of checking assumptions before
In this course, we will be looking at a lot of data, so it is jumping to conclusions about trends in data.
important early on to get in the habit of recognizing
what assumptions we are making when we interpret
that data.
In general, it is a good idea to call out explicitly your assumptions and think critically about what assumptions
other people are making when they interpret data.
We may not become expert data analysts in this class, and even organizations like Google can make mistakes when
interpreting data. Sometimes, the best we can do is just be honest with ourselves and other people about what
assumptions we’re making, correct our wrong assumptions where we can, and keep an eye out for the assumptions other
people are making when they try to tell us “what the data is saying.”
Assessment
Assessment Posibilities
Code Studio: Assessment questions are available on the Code Studio.
Extended Learning
Share this article with students criticizing inaccurate or misleading ways of using Google Trends to write news stories.
https://medium.com/@dannypage/stop-using-google-trends-a5014dd32588#.dd7bifrl5
Standards Alignment
Computer Science Principles
3.1 - People use computer programs to process information to gain insight and knowledge.
3.2 - Computing facilitates exploration and the discovery of connections in information.
7.4 - Computing innovations influence and are influenced by the economic, social, and cultural contexts in which they are designed and used.
If you are interested in licensing Code.org materials for commercial purposes,contact us.
UNIT Ch. 1 1 2 3 4 5 6 7 8 9 10
4
Lesson 4: Rapid Research - Data
Innovations
Project | Research
Remarks
One of the things that many modern innovations have in common is their use of data (often Big Data, but not always). To
explore how innovations use data more in depth you will be completing a rapid research project on a “data innovation”
of your choosing.
Get excited! This is your opportunity to dig deeper into a computing topic that has piqued your interest over the entire
course.
The project mimics some of the things you have to do for theExplore Performance Task and will be useful preparation.
In particular the Explore Performance Task asks you to:
Day 1 - Choose Innovation, Read Differences from the actual Explore PT: The actual
and Research Explore Performance Task will be completed over 8 class
hours. The fact that this schedule is significantly shorter
Review Activity Guide and Rubric: reflects several differences in this Practice PT.
At the beginning of the project, emphasize the Some categories and topics have been supplied ahead
importance of reviewing the one-pager template and of time.
rubric. Students may assume that more is required of The visual students are using does not have to be an
them than is actually the case. original computational artifact
Conducting Your Research: This document is intended to serve primarily as a guide to students for identifying online
sources of information. The skill students need to develop is identifying useful resources on their own and then
synthesizing this information. Being presented with a structured way of doing this means students will have a model for
how to complete their research when completing the actual Explore PT.
The "Key Information to Find" highlights specific terminology from the Explore PT that students will benefit from having
seen earlier in the course.
Complete One-Pager: Students should find this aspect of their project most familiar. The prompts are similar in style
and content to prompts students have already seen. Emphasize the need for clarity in their writing, and remind them that
everything must fit on a single page. If they have responded completely to each of the prompts, it is fine to write less.
Sharing/Submission: You may want to collect students’ one-pagers, have them share in small groups, or with the
whole class. Since students were researching something of their own choosing, they might be eager to show what they
found out.
Assessment
Use the rubric provided with the Activity Guide to assess the one-pagers.
Standards Alignment
Computer Science Principles
1.2 - Computing enables people to use creative development processes to create computational artifacts for creative expression or to solve a
problem.
3.2 - Computing facilitates exploration and the discovery of connections in information.
7.1 - Computing enhances communication, interaction, and cognition.
7.4 - Computing innovations influence and are influenced by the economic, social, and cultural contexts in which they are designed and used.
7.5 - An investigative process is aided by effective organization and selection of resources. Appropriate technologies and tools facilitate the
accessing of information and enable the ability to evaluate the credibility of sources.
4
Lesson 5: Identifying People With Data
External Tool
Discuss: In small groups or as a class, have students share their findings. The main points to draw out from this
conversation are:
All kinds of personal data, from usernames to social security numbers and credit card information, is lost
fairly regularly.
This information can be used to steal money or identities, get access to classified information, blackmail
people, etc.
Transition:
We’ve spent a lot of time looking at potential benefits of collecting and analyzing data. As we’ve already seen today,
however, there are some risks associated with collecting all of this information. If it falls into the wrong hands or is used in
ways we didn’t intend, there may be serious risks imposed on our privacy or security. We’re going to start looking more
deeply at this problem.
In small groups or as a full class, students should discuss their responses. The main points to draw out from this
conversation are:
Remarks
As we just saw, there are security and privacy issues that are raised, even when small, seemingly unimportant pieces of
information are available online. Most of the time, we don’t actually think about what kinds of information are available
about us, or how someone might connect the dots with that information.
Wrap-up
Class shares their findings
Time permitting it's very interesting to share findings.
Prompt:
Wrap Up
"What information were you able to find about Goal
yourself? Were you able to make connections This activity is aimed at opening the conversation about
privacy and security in a highly personal way. The main
in the data you collected to figure out anything
goal of this closing discussion is just to share what
else? Were you concerned about anything you students found about themselves.
were able to find?"
Assessment
See the examplar response to the worksheet. Available in the teacher only area lesson 3 in code studio.
See other assessment items in code studio.
Extended Learning
1. You may want to check out Chapter 2 of Blown to Bits , which goes into some depth about issues and concerns with
data and privacy. In particular, pages 32-35 are related to this lesson.
2. It takes a bit more reading but the Data Privacy Lab project out of Harvard has another fascinating (and scary) project
called The Data Map
You could take a lot of the information there for more rigorous research into how data can be used to identify people
Standards Alignment
Computer Science Principles
3.2 - Computing facilitates exploration and the discovery of connections in information.
3.3 - There are trade offs when representing information as digital data.
7.3 - Computing has a global affect -- both beneficial and harmful -- on people and society.
If you are interested in licensing Code.org materials for commercial purposes,contact us.
UNIT Ch. 1 1 2 3 4 5 6 7 8 9 10
4
Lesson 6: The Cost of Free
Web Lab
This lesson focuses on the economic and consumer concerns around Objectives
apps and websites that collect and track data about you in exchange
Students will be able to:
for providing you a service free of cost. Often the quality of the service
itself is dependent on having access to data about many people and Explain how and why personal data is
their behavior. The main take-away of the lesson is that students exchanged for use of free software.
should be more informed consumers of the technology around them. Explain some of the privacy and economic
They should be able to explain some of the tradeoffs between tradeoffs involved in the collection and use of
maintaining personal privacy and using innovative software free of personal data.
cost. Describe the ways and reasons organizations
collect information about individuals.
Purpose Read and critically evaluate a data privacy
policy.
Many consumers are unaware, or lack a sophisticated understanding,
of how information about us is being collected and tracked by the Preparation
technology we use every day. This issue goes beyond instances
when data is stolen from companies or organizations we willingly Review the reading
provide it to. Instead, using computational tools, our movements Review the teaching tips related to group
through the physical and virtual world are being automatically tracked, work
stored, and analyzed. Cookies in our browsers keep a record of our EXEMPLAR Privacy Policies
movements on the Internet. Companies trade access to free tools and
apps for the rights to track the data we upload to them. Advertisers
Links
develop personalized profiles of potential customers to better target
Heads Up! Please make a copy of
advertising. Governments monitor traffic across the Internet at scales
any documents you plan to share
unimaginable without the use of computers. Yet we live in a world that
with students.
increasingly relies on these digital tools, services and products. Most
companies make great efforts to balance the tradeoffs between utility
For the Students
and privacy, but the issues can be tricky and raise confounding ethical
Activity Guide - Privacy Policies - Activity
dilemmas. We must now grapple with a question of just how much we
Guide Make a Copy
value our privacy, and whether it is even possible to maintain in a
digitized world. The Future of Big Data - Video
WSJ article [original] - External Article
Agenda WSJ article [annotated] - Article
Make a Copy
Getting Started (15 mins)
Cost of Free App
Video - The Future of Big Data
Thinking Prompt: What do you know about data
collected about you every day?
Quick Poll and Recap of Findings:
Activity 1 (30 mins)
Part 1 - Reading: Wall Street Journal: Users Get as
Much as They Give
Activity 2 (30 mins)
Part 2 - Read a real data privacy policy
Wrap-up
Where do you stand?
Would you install this “free app”?
Assessment
Extended Learning
Teaching Guide
Getting Started (15 mins)
Video - The Future of Big Data
Opening Remarks
Yesterday we looked at ways that data we willingly give away could be lost and used to compromise our security.
What we often don’t think about, however, is just how much data is being collected about us without us even knowing it.
Especially as computers become ever more powerful and ubiquitous, it is becoming easier for vast amounts of data about
us to be collected and for it to be used for a variety of purposes.
Video:
Transition:
The video mentions how your phone and websites you use track certain things about you. Today we’re going to find out a
little bit more about it. Here are the primary questions we’re interested in:
Why is this tracking necessary? What are the benefits and drawbacks?
How can you find out what kind of data is tracked about you and by whom?
Thinking Prompt: What do you know about data collected about you
every day?
Prompt:
"Write down 2 or 3 websites, web services, or apps that you use the most or rely on the most to stay
connected to friends and family, or use for “productivity” like school work."
Whip around: Name one piece of data the app you chose could potentially collect or know about you.
Transitional Remarks
Wow, that’s a lot of data! If this stuff is “free,” but these companies make a lot of money, then it stands to reason that
we are “paying” for these services with our data, because that’s the only thing we’re giving them in return for a service.
How is it used to make money? What are the tradeoffs? Let’s learn a little bit more.
In the discussion, it’s worth noting the source of the article - The Wall Street Journal - and asking students to consider
whether or not this information has a “pro-business” slant.
This is a very complex issue. The important thing is whether or not students are seeing both sides of the issue.
Try not to let students take the middle ground - “just the right amount of privacy” - as it’s an easy out. Press them to
consider a specific case of one app or website and make a determination about that.
Caution: Try to keep the conversation focused on economic terms and the central question of “What is the cost of
‘free’?” It can be easy for this slip into a debate about privacy versus utility, in terms of government access to data,
espionage, terrorism, etc. These are extremely important issues as well, but the conversation might get unwieldy. The
focus of this lesson is about students becoming more informed consumers of the technology they use.
Prompt:
"Pick one of the apps / websites that you chose at the beginning of class, and go find and read through
that site’s privacy policy"
Students are asked to note what information the site says they collect, how they are using it, and (hopefully) how they
are protecting it.
The actual activity guide provides a bit more guidance for students about how to find answers to these questions.
2. What kinds of data are being collected? How many different kinds of data?
3. What service or feature is enabled by the data they are collecting? Why are they collecting it in the first place?
4. Who else is given access to that data? How are they using it?
5. Can you get access to your own data? Can you modify what is collected or used, or delete your data if you wish?
On a scale of 1-4, rate how comfortable you are with this company’s data policy? 1 - very uncomfortable 4-very
comfortable
Put students into groups of 3 to share what they found with each other.
Each group should report out 4 things for the policies reviewed in the group
Prompt:
"What’s your “temperature” on data collection now? Are you leaning toward more privacy? Or the
same/less as there is now?"
Wrap-up
Where do you stand?
Prompt:
"This lesson is entitled The Cost of ‘Free.’ What does that mean to you now?"
"How would you explain The Cost of ‘Free’ to a family member, or person you just
met, if you had only 60 seconds?"
Assessment
To get an idea of what to look for in the activity guides see thestudent exemplar in the teacher only area for Unit 4
lesson 4 here: EXEMPLAR - Activity Guide - Privacy Policies - Exemplar
Extended Learning
Articles in the news: You may choose to use the following articles to help deepen students' understanding of the pros
and cons of the utility vs. privacy dilemmas that arise thanks to the massive amounts of data generated by modern
technologies.
Share / Find Articles on the Forum: This list is provided as a starting point. We recommend you also check recent
headlines for articles that are timely and pertinent. If you find a strong article we recommend you post a link in the forum
for this lesson. We therefore also recommend you check the forum for articles your colleagues have shared.
4. U.S. News: The Case for Internet 4. TechRepublic: Why "Nothing to Hide"
Surveillance misrepresents online privacy
Blown to Bits - Chapter 2 - Naked in the Sunlight: Privacy Lost, Privacy Abandoned
Program or Be Programmed - Chapter 7: Social - Do Not Sell Your Friends
Standards Alignment
Computer Science Principles
3.3 - There are trade offs when representing information as digital data.
7.3 - Computing has a global affect -- both beneficial and harmful -- on people and society.
If you are interested in licensing Code.org materials for commercial purposes,contact us.
UNIT Ch. 1 1 2 3 4 5 6 7 8 9 10
4
Lesson 7: Simple Encryption
Widget
In this lesson, students are introduced to the need for encryption and Objectives
simple techniques for breaking (or cracking) secret messages.
Students will be able to:
Students try their own hand at cracking a message encoded with the
classic Caesar cipher and also a Random Substitution Cipher. Explain why encryption is an important need
Students should become well-acquainted with idea that in an age of for everyday life on the Internet.
powerful computational tools, techniques of encryption will need to be Crack a message encrypted with a Caesar
more sophisticated. The most important aspect of this lesson is to cipher using a Caesar Cipher Widget
understand how and why encryption plays a role in all of our lives Crack a message encrypted with random
every day on the Internet, and that making good encryption is not substitution using Frequency Analysis
trivial. Students will get their feet wet with understanding the Explain the weaknesses and security flaws of
considerations that must go into making strong encryption in the face substitution ciphers
of powerful computational tools that can be used to crack it. The need
for secrecy when sending bits over the Internet is important for
Preparation
anyone using the Internet. Examine both versions of the widget
KEY Reading Guide for Encryption
Purpose (optional)
This lesson is the first in a series of lessons about cryptography and
encryption. “Encryption” is a process for transforming a message so
Links
that the original is “hidden” from anyone who is not the intended
Heads Up! Please make a copy of
recipient. Encryption is not just for the military and spies anymore. We
any documents you plan to share
use encryption everyday on the Internet, primarily to conduct
with students.
commercial transactions, and without it our economy might grind to a
halt.
For the Teacher
This lesson gives students a first taste of the kind of thinking that goes Caesar Cipher Widget - 2018 - Widget
into encrypting messages in the face of computational tools. Frequency Analysis Widget - 2018 -
Computational tools dramatically increase the strength and complexity Widget
of the algorithms we use to encrypt information, but these same tools
also increase our ability to crack an encryption. Developing strong Vocabulary
encryption relies on knowledge of problems that are “hard” for
computers to solve, and using that knowledge to encrypt Caesar Cipher - a technique for encryption
messages.As a resource, you may wish to read all of Chapter 5 of that shifts the alphabet by some number of
Blown to Bits. It provides social context which you may want to characters
bring to your classroom. Cipher - the generic term for a technique (or
algorithm) that performs encryption
Agenda Cracking encryption - When you attempt to
decode a secret message without knowing all
Getting Started (15 mins) the specifics of the cipher, you are trying to
The critical role of encryption in everyday life "crack" the encryption.
Classic Encryption - The Caesar Cipher Decryption - a process that reverses
Activity (35 mins) encryption, taking a secret message and
Part 1 - Crack a Caesar Cipher reproducing the original plain text
Part 2 - Crack a Random Substitution Cipher Encryption - a process of encoding
Wrap-up messages to keep them secret, so only
Assessment "authorized" parties can read it.
Extended Learning Random Substitution Cipher - an
encryption technique that maps each letter of
the alphabet to a randomly chosen other
letters of the alphabet.
Teaching Guide
Getting Started (15 mins)
The critical role of encryption in everyday life
Thinking Prompt:
Discussion
"In your daily life what things do you or other Goal
Kick the day off with a very quick (5 mins) Think-Pair-
people rely on keeping a secret? Who are
Share to activate students' prior knowledge about
these secrets being kept from? How are these encryption and why we want it.
things kept secret?"
Motivate the need for means of encrypting information as it
Share: travels across the Internet.
Provide a couple minutes for students to share their Potential areas to discuss:
ideas with their classmates. Social interactions (e.g., a surprise birthday party)
Ask them to brainstorm as many areas as they can A play in a sports game, your hand in a card game
where they or other people rely on secrecy. Personal identification information, PIN numbers, etc.
Try to touch on as many different people and contexts Business and government negotiations
as possible. Military activity
Remarks
Secrecy is a critical part of our lives, in ways big and Content Corner
small. As our lives increasingly are conducted on the
Internet, we want to be sure we can maintain the If necessary recall some of the facts we learned in Unit 1
privacy of our information and control who has access while using the Internet Simulator.
to privileged information.
The Internet is not inherently secure.
Digital commerce, business, government operations, Packets traveling across the Internet move through
and even social networks all rely on our ability to keep
information from falling into the wrong hands. many routers, each of which could be owned by
different people or organizations.
Recall: As we saw with our activities on the Internet
So we should assume all information traveling across
Simulator the internet is NOT secure
the Internet to be public, as if written on a postcard and
We need a way to send secret messages...
sent through the mail.
Many of the ideas we use to keep secrets in the digital age are far older than the Internet. The process of
encoding a plain text message in some secret way is called Encryption
For example in Roman times Julius Caesar is reported to have encrypted messages to his soldiers and
generals by using a simple alphabetic shift - every character was encrypted by substituting it with a
character that was some fixed number of letters away in the alphabet.
Prompt:
This message was encrypted using a Caesar Cipher (an "alphabetic shift").
Let's see how long it takes you to decode this message (remember it's just a shifting of the alphabet):
There is a page in Code studio which recaps terminology (encryption, decryption, crack, cipher, Caesar ciper) and poses
the next problem.
You may optionally pause here to recap and go over terms if you like or just let students proceed (see activity part 2
below).
Cracking a Caesar cipher is easy...trivial with a computational tool like the one we used.
The next step is to make the encryption slightly harder...
New Challenge:
What if instead of shifting the whole alphabet, we mapped every letter of the alphabet to a random
different letter of the alphabet? This is called a random substitution cipher.
The new version of the widget you'll see is a more sophisticated version of the encryption tool that
shows you lots of different stuff.
Get Cracking
Have students click to the next bubble to see the
Use a Discovery-based approach
frequency analysis version of the widget. (It should
look like the screen shown below) REMINDER: Discovery-based introduction of tools
in a nutshell:
Goal: let students explore for 5-10 minutes to see if
they can discover what the tool is showing them and Get students into to the tool without much or any
allowing them to do. introduction
Give students working in partners a fixed amount of
The tasks laid out for students in code studio are:
time (5 minutes or so) to poke around and see if they
Figure out what is going on in this new version of the can figure out what it does and doesn’t do – typically
tool this might be presented as a mystery worth
What information is being presented to you? investigating
Figure out what the the tool let's you do Ask the group to report what they found
As usual: you can't break it. So click on things, poke Teacher fill in any gaps or explanations of how the tool
around. works afterwards
If you figure it out you might be able to crack a This widget, like all others, are meant as a learning tool.
message encoded with random substitution. You cannot break it so you are encouraged to let students
play and investigate to figure out how the tools work.
These discovery-based methods of introducing tools have
been tested in professional development and have
worked well for teachers who use this curriculum. This
method is effective for a few reasons, but overall students
find this approach more engaging and fun, and they tend
to be more receptive to, and motivated to hear,
explanations of how the tool works after trying to “solve
the mystery” themselves.
After some exploration time regroup to clarify
what the tool is and how it works.
If necessary point out to students that the next level in code studio (the one after the frequency analysis tool) explains
a little bit about how frequency analysis works and suggests a few strategies for how to get started.
Wrap-up
As part of wrap up the major points we want to draw out are:
Here are a couple of thought-provoking prompts you can use to bring closure to the lesson and as an avenue to draw out
the points above. Choose one or more.
Prompts:
How much easier is it to crack a caesar cipher than a random substitution cipher? Can you put a number on
it?
For Caesar's Cipher there are only 25 possible ways to shift the alphabet. Worst case, you only need to
try 25 different possibilites. A random substitution cipher has MANY more possibilities (26 factorial =
4x10 26 possibilities). However, as we learned, with frequency analysis we can avoid having to try all of
them blindly.
Was it difficult to crack a Random Substitution cipher? Did it take longer than you thought? shorter? Why?
Computational tools aid humans in the implementation of encryption, decryption, and cracking
algorithms. In other words, using a computer changes the speed and complexity of the types of
encryption we can do, but it also increases our ability to break or circumvent encryption.
Any encryption cipher is an algorithm for transforming plaintext into ciphertext. What about the other way
around? Can you write out an algorithm for cracking a Ceasar cipher? What about a random substitution
cipher?
An algorithm for cracking a Caesar cipher is pretty easy - for each possible alphabetic shift, try it, see if
the words come out as english.
An algorithm for cracking random substitution is trickier and more nunanced. There might not be a
single great answer but through thinking about it you realize how tricky it is to codify human intelligence
and intuition for doing something like frequency analysis into a process that a machine can follow. It
probably requires some human intervention which is an interesting point to make.
Recall that in RFC 3271, “The Internet is for Everyone” Vint Cerf wrote the following. What did he mean by
"cryptographic technology?" What does it mean to you now?
Internet is for everyone - but it won't be if its users cannot protect their privacy and the confidentiality of
transactions conducted on the network. Let us dedicate ourselves to the proposition that cryptographic
technology sufficient to protect privacy from unauthorized disclosure should be freely available,
applicable and exportable.
Review of Terminology -- you can use this opportunity to review new vocabulary introduced in the activity
and respond to questions students may have encountered during the activity.
Assessment
Questions (also included in Code Studio):
2. What is the “key” to a Caesar Cipher that someone needs to know (or discover) to decrypt the message?
d) The day of the month that the encrypted message was sent.
3. The Caesar Cipher has 25 different shifts to try. How many possibilities are there to try in a random substitution cipher?
a) 26
b) 26 × 25
c) 26 × 25 × 24 ×···× 3 × 2 x 1
d) 2626
Extended Learning
Read Blown to Bits
Teaching Tips
Read pp. 165-169 of Blown to Bits, Chapter 5 -
Reading. Students should be encouraged to chat with their partner
while completing the worksheet. The questions are fairly
Answer the questions provided in the reading guide
straightforward and the point is more to use the questions
and worksheet Reading Guide for Encryption - as a guide to the reading, than to find all the answers as
Worksheet quickly as possible.
For teachers: KEY Reading Guide for
Encryption (optional)
The earlier sections of Chapter 5 of Blown to Bits make reference to the significance of and controversies surrounding
encryption in the aftermath of September 11th. This reading may be a useful tool for further introducing the impact of
cryptography on many aspects of modern life.
Ask students to review the history of their Internet browsing and calculate roughly what percentage they conduct with the
assumption that it is “private.” Do they have any way of being sure this is the case? Are there any websites they visit
where they feel more confident in the secrecy of their traffic than others? Are they justified in this conclusion?
Standards Alignment
CSTA K-12 Computer Science Standards (2011)
CI - Community, Global, and Ethical Impacts
CL - Collaboration
CPP - Computing Practice & Programming
CT - Computational Thinking
If you are interested in licensing Code.org materials for commercial purposes,contact us.
UNIT Ch. 1 1 2 3 4 5 6 7 8 9 10
4
Lesson 8: Encryption with Keys and
Passwords
Widget
Encryption: Algorithms v. Keys Misconception Alert
Today, we will attempt to crack codes, paying particular There’s a common misconception that “cracking” and
attention to the processes and algorithms that we use to “decrypting” are interchangeable terms.
do so. Decrypting is just using an algorithm to undo the
So, before starting today we want to make sure that we encryption. It's like using a key to unlock a lock. It’s
distinguish between an encryption algorithm and an what the sender is expecting the intended recipient to
encryption key do to recover the original message.
Cracking is more like detective work - it's like trying to
An Encryption algorithm is some method of doing pick a lock - using various methods to try to figure out
encryption. what the secret message is without having or knowing
The Encryption key is a specific input that dictates the decryption "key" ahead of time.
how to apply the method and can also be used to
decrypt the message. Some people might say "What is
the key to unlocking this message?"
For example:
The Caesar Cipher is an encryption algorithm that involves shifting the alphabet
The amount of alphabetic shift used to encode the message is the key
When you are cracking the Caesar Cipher you are trying to figure out how much the alphabet was shifted - you are
trying to discover the key.
Prompt:
"If random substitution is an algorithm for encryption, what is the key to a random subsitution cipher?"
A: The key is the actual letter-to-letter mapping that was used to encode the message - it can also be used to decrypt.
Transitional Remarks
Discussion
So, There is a difference between the algorithm (how to Goal
execute the encryption and decryption) and key (the Quickly review what a “key” is in a cryptographic method
secret piece of information). and distinguish it from the Algorithm
Describe in your own words what the Vigenère Cipher Algorithm is doing.
What makes for a good v. bad secret key using the Vigenère cipher?
Compare and Contrast the difference between a substitution cipher (Caesar or Random) and Vigenere, using the
message “I think I can I think I can I think I can” to explain why Vigenère is a stronger form of encryption than a
substitution cipher.
Will frequency analysis work to crack the Vigenère cipher? Why or why not?
(paraphrase) Is it easier to crack a message if you know that it was encrypted with the Vigenère Cipher Widget?
(paraphrase) Is it easier to crack a message if you know that it was encrypted with the Vigenère Cipher Widgetand
that the key was 10 characters long?
Prompt:
"From what you've seen what are the properties of the Vigenere Cipher that make it harder to crack? In
other words, if you had to crack a vigenere cipher what would you do?"
Discussion
Vigenere is strong because looking at the cipher text there are no discerable patterns assuming a good key was chosen.
Because the ciphertext is resistant to analysis it leaves us simply having to guess what the key is.
Even if we know the length of the key we might still have to try every possible letter combination which is a prohibitively
large number of possiblities.
Remarks
Content Corner
For a long time, the Vigenère cipher was considered
If you are interested in how the Vigenere cipher can be
to be an unbreakable cipher and was used by
cracked there are a number of resources out there. See
governments to send important messages. the "Extended Learning" section of the lesson plan for
But in the 1800s Vigenere was discovered to be links.
susceptible to a modified form of frequency analysis.
After that point it was considered insecure.
Still the properties of Vigenere that we've found are desirable.
So, choosing a good password is meaningful because we want the key to be hard for a computer to guess. How good
is your password?...
Go to Code Studio
The worksheet simply has questions on it to answer. You may distribute them in some other format if you like.
Students should click on the next page in Code Studio:How Secure Is My Password? 2018 - Code Studio Page ...
Students should open the external website howsecureismypassword.net in a separate tab or window and then try out
these things listed:
2. Test some passwords
Teaching Tips
Try different passwords to see what the tool tells you:
Make sure you leave enough time for the wrap up.
Try typing common words from the dictionary or well-
known names like “apple” or “chicago”. Students may have a lot of questions about passwords
Try typing something that’s over 16 characters. and security that you feel like you might not be able to
answer. That’s OK!
Try a string of 4 random words together, like
AppleChicagoBalletTree. a) You don’t have to be an expert on this subject
Type a 0. Then keep typing 0s and watch what b) The reality is that the world of cybersecurity changes
happens to the statistics. (Actually, you might want to every day
just hold 0 down for a while.) c) Some of the details can get very complicated, even for
Try other things that interest you. professionals.
3. Answer Questions So, encourage the students’ curiosity and perhaps say, “I
don’t know, but I bet you could look it up.” Cybersecurity
Questions are listed in Keys and Passwords - is an enormous topic. If students get interested, they
Worksheet: could dedicate their whole life to this field.
Create a few passwords using 8 lowercase ASCII
characters (a-z). What’s the longest amount of time-
to-crack you can generate?
Using any characters on the keyboard, what’s the longest amount of time-to-crack you can generate with an 8-
character password?
As you try passwords, what seems to be the single most significant factor in making a password difficult to crack? Why
do you think this is?
Opinion: Is an 8-character minimum a good password length for websites to require? Give your opinion, yes or no, and
explain why you think that.
The AP CS Principles framework contains the following statement: Implementing cybersecurity has software,
hardware, and human components. Based on what you’ve learned so far, describe at least one way that cybersecurity
involves “human components.”
Assessment
The worksheet contains several questions for assessment. Here are some additional questions (also included on Code
Studio):
1. (Choose two.) Why is the Vigenère cipher hard to crack?
c) The key is always secret to both the sender and receiver of the message.
2. What problems exist with encryption schemes such as the Vigenère cipher, even when strong encryption keys are used?
3. Why are computers better than humans at breaking encryptions such as the Vigenère?
d) They are not; humans are better as breaking Vigenère encryptions than computers.
5. Companies and organizations commonly require users to change their passwords frequently. Websites have password
length and complexity requirements. Is it better to change your password frequently or to have a longer password? What
level of security is appropriate to require of end users? Does this change, depending on the context (for example,
employee or customer)?
Extended Learning
Go down the rabbit’s hole of encryption at Crypto Corner: http://crypto.interactive-maths.com/
Assign each student a type of cipher. Students should then research the cipher, including information on its algorithm,
its history, and what they would have to do to crack the cipher. They should present an example, and describe the
process they follow in cracking the code.
Caesar Cipher video from Khan Academy: https://www.khanacademy.org/computing/computer-
science/cryptography/crypt/v/caesar-cipher
Optional Lessons
To dive deeper into the notion of computationally hard problems, consider the following 2 optional lessons after this lesson:
Standards Alignment
CSTA K-12 Computer Science Standards (2011)
CPP - Computing Practice & Programming
CT - Computational Thinking
If you are interested in licensing Code.org materials for commercial purposes,contact us.
UNIT Ch. 1 1 2 3 4 5 6 7 8 9 10
4
Lesson 9: Public Key Cryptography
Widget
This is a big multi-part lesson that introduces the concept of public Objectives
key cryptography which is an answer to the crucial question: How
Students will be able to:
can two people send encrypted messages back and forth
over insecure channels (the Internet) without meeting ahead Explain what the modulo operation does and
of time to agree on a secret key? In a nutshell, there are two how it operates as a "one-way" function
main principles we want students to understand: Follow an asymmetric encryption algorithm to
encrypt a numerical message using the Public
1. The mechanics of communication with public key cryptography Key Crypto widget.
2. The basic mathematical principles that make it possible Explain the difference between symmetric and
The lesson gets at these two core ideas through a deliberate chain of asymmetric encryption.
thought experiments, demonstrations, activities and widgets. All parts Describe the basic process of encrypting data
are building blocks that lead to deeper understanding of how it works. using public key encryption
Explain the benefits of public key
Purpose cryptography
This is a fairly hefty lesson because the underlying ideas are subtly Preparation
quite sophisticated. It's worth noting that much of the material here -
all but the highest level takeaways - are beyond the scope of what's This lesson will likely take two days to complete.
covered on the AP exam. Students need to know the basic public key Preparing for these activities the first time will
encryption process, and what asymmetric encryption is. For take some time. Once you've been through it
programming they need to know how the modulo operation works. once, the activities actually go quicker than you
might expect.
Our purpose here is to reveal some of the magic that happens every
day on the Internet to enable secure transactions. To many the fact Suggested Prep for Day 1 (Steps 1-3)
that encrypted messages can be sent between parties who have Prepare the Cups and Beans
never met before is both taken for granted and opaque. Our belief is demonstration (you need cups and
that understanding how it works with some depth - getting to beans)
experiment with the mathematical principles that make asymmetric Understand the modulo thought
keys possible, and the resulting encryption hard to crack - is deeply experiment with pictures of clocks
satisfying.
(Optional) Paper copies of
The widget in the lesson mimics the RSA encryption algorithm "multiplication + modulo" activity guide
(with smaller numbers and slightly easier mathematics). Suggested Prep for Day 2 (Step 4 + wrap
up)
Agenda Practice using the "modulo clock"
Getting Started (5 mins) Practice and Prepare for the using and
How do you get the encryption key? demonstrating the public key crypto
Activity 1 (15 mins) widget
KEY Multiplication + Modulo
Step 1: A New Analogy - Cups and Beans
Activity 2 (30-45 mins)
Links
Step 2: Modulo - The operation behind public key
encryption
Heads Up! Please make a copy of
Step 3: The Mod Clock Widget and Multiplication +
Modulo any documents you plan to share
Activity 3 (30-45 mins) with students.
Step 4: Use the Public Key Crypto Widget Activity
Wrap-up (10 mins) For the Teacher
Vocabulary
asymmetric encryption - used in public
key encryption, it is scheme in which the key
to encrypt data is different from the key to
decrypt.
modulo - a mathematical operation that
returns the remainder after integer division.
Example: 7 MOD 4 = 3
Private Key - In an asymmetric encryption
scheme the decryption key is kept private and
never shared, so only the intended recipient
has the ability to decrypt a message that has
been encrypted with a public key.
Public Key Encryption - Used prevalently
on the web, it allows for secure messages to
be sent between parties without having to
agree on, or share, a secret key. It uses an
asymmetric encryption scheme in which the
encryption key is made public, but the
decryption key is kept private.
Teaching Guide
Getting Started (5 mins)
How do you get the encryption key?
Prompt: "How can two people send encrypted messages to each other if they can't communicate, or agree
on an encryption key ahead of time, and the only way they have to communicate is over the Internet?"
You should assume that an adversary is always secretly eavesdropping on their conversation too.
With a partner come up with a strategy they could use to send encrypted messages.
Discuss
Discussion
Give students a few minutes to discuss Goal
Don't let the discussion go too long Goal: Realize the difficulty of the problem. No form of
symmetric encryption will work. There is no way for parties
Direct the conversation toward the idea from the video to establish a shared key without agreeing ahead of time
of using different keys - one to encrypt and one to in a way that secures it from an observer. Hopefully some
decrypt. students will recall from the video in the last lesson the
ideas of using different keys - one to encrypt data and
Recall asymmetric keys were mentioned in the one to decrypt it.
cryptography video.
Possible Responses: Students may come up with some
If you need to show the video The Internet: fantastic ideas, but most will amount to some secret
Encryption & Public Keys - Video ahead-of-time agreement about a key, or simply some
strategy that obscures the key ("security by obscurity").
in whole or in part - the public key cryptography
portion starts around the 4:11 mark.
Transitional Remarks
Today we're going to dig in a little bit deeper to how this idea of using different keys actually works. The ideas behind how
it works are sophisticated, and so to get a deeper understanding we're going to do a series of short activities that stringing
together several different ideas, bringing them all together in the end.
Ready? Here we go!
Option 2: Groups of 3 Students. You can have students work through an activity guide that explains it as well. It will take
more time. (Optional) Public Key Bean Counting - Activity Guide
Materials: Cups and Beans - enough for a demonstration (or for groups of 3, if running as student activity)
Display: You may want to display a picture of a jar full of candies to give a visual for the analogy you're about to explain.
Full Teacher Guide: Public Key Bean Counting (Cups & Beans Activity) - Teacher Demonstration Guide
Setup and Activity Summary:
Discussion
Goal
The cups and beans demo showed basically the same
public/private key analogy as the lockbox in the video.
Similarities:
For Bob to send a message to Alice he needs to obtain
a public key, which we can use to "lock" a message
Only Alice can "unlock" the message
Alice choose a private key (some number of beans) Bob and Alice do not need to agree on a key ahead of
Alice make a "public key cup" by placing beans in a time
clear cup and sealing it Alice never lets her private key out in public
Pass the cup to Bob over the "Internet"
Differences:
Bob grab the "public key cup" and add a secret
number (of beans) to it Beans in cups is closer to how data is encrypted -
Pass the cup back to Alice over the "Internet" beans are data, sealed in the jar is encrypted
Alice open cup and subtract the number of beans she Eve (or anyone else) could only guess what was in the
added originally jar even though it passed right in front of/through them
What's left is Bob's secret number over the "Internet"
At no point was the secret message ever out in public,
Discuss: Relate this process using cups and beans to or sent unsecured.
the lockbox analogy from the video. What's similar? Closer to reality: Notice how the public key itself is a
What's different? What took place of the public key? The form of encrypted message. But it's used to encrypt
message? The private key? something else
Let students discuss for a minute
You may review the "what's the point" items and table
at the end of teacher demonstration guide
Ensure that students see how the cups and beans process was similar to the lockbox process.
Remarks
Okay so that's one step. We now have a clearer idea of the public key encryptionprocess. If we can keep extending this
we'll have a solution to the problem of how two people can encrypt messages without meeting ahead of time.
Next we need to see how actual data is encrypted rather than beans in cups.
To learn that, we'll need to string a few more ideas together.
Remarks
The cups and beans demonstration showed us how the mechanics of public key cryptography works.
It’s a big deal that asymmetric encryption allows for two parties to send secret messages to each other over public
channels without having to agree on a secret encryption key ahead of time.
Now let’s look at the mathematical principles that allow private and public keys to work.
"Clock Arithmetic Thought Experiment"
Teacher Guide: Use the Modulo Clock Thought Experiment - Teacher Guide
Here is a summary:
Materials: two pictures of analog clocks - one with hour hand at 4:00 and another at 3:00.
Display: picture of clock at 4:00. You can use this interactive clock rather than pictures if you like.
What's Modulo?
Demonstrate a few quick sample inputs to show how the clock size can change and numbers "wrap around"
The big number in the middle is the remainder, the result of the modulo operation
Student do the activity: students should work with a
This is not on the AP
partner to work through the problems on the activity
exam
guide. Students do not need to memorize or be facile with
these mathematics for the AP Exam.
Circulate as students work. Make sure that they are
trying out the problems given which ask them to try to The modulo operation is part of the AP pseudocode and
there might be simple programming questions on the
guess numbers. They should also be using the Mod
exam that use it.
Clock to check their results.
However, the mathematics for Public Key Cryptography is
Students should get a feel for this general formula: (A * beyond the scope of the course. We are giving it a small
B) MOD M and its properties, because it is the treatment here to expose a statement from the AP CSP
framework: 6.3.1I Cryptography has a mathematical
foundation on which we'll create public and private keys
foundation.*
in the next step.
These points are made at the bottom of the activity You cannot solve it like a typical equation in math
guide. After students have worked on the problems for a class because there are many equations. If you are
bit they should be able to give a few responses here looking for A * ___ MOD 13 = 1 for example, what you are
really trying to find is a number that you could multiply by
such as:
A that comes out to one of a list of infinite values: 1, 14,
You cannot solve it like an equation in math class 27, 40, 53,...and so on.
Numbers kind of jump all over the place
You kind of have to just guess randomly, or at least
systematically try every number.
Group: Put students into groups of 2 (to play just Alice It might be hard to believe but this widget is pretty close to
mimicking real RSA encryption.
and Bob initially).
When you use RSA "for real" you have to generate a
Each student should be at their own computer, but public/private key pair using software on your computer.
within speaking distance You put the public key somewhere that someone can
grab, like your personal web page (there are other ways
Display: the Public Key Crypto Widget Instructions too.)
page (in code studio)
You keep the private key on your computer and never
You can ask students to go to that page as well if distribute it.
you want them to read it now, or just have it Most of the time your computer handles the encryption and
displayed for you to review the instructions. decryption behind the scenes.
Summary: Use the teacher guide, but here is a If you would like to try or demonstrate for your students,
summary for reference: you can. Just google "RSA Keygen" and follow instructions
for your type of computer.
Part 1: Introduce the widget (10 mins)
Option 1: Crowd-source cracking - Continue as a whole class, with 2 students playing Bob and Alice, and everyone
else playing Eve.
Option 2: Small group experimentation - Have previous Alice-and-Bob pairs get together in groups of 4. One pair plays
Bob and Alice, the other pair plays Eve as a team of 2 (on one computer or two)
Students exchange numbers a few more times, trying to make it hard for Eve to crack. See how long it takes and what
makes it hard. At what point would you feel "safe" as Alice or Bob that your messages were basically secure? As you
play with the widget can you figure out why it works? Why can Alice decrypt the message but Eve can't?
(Optional) Part 5 - Use the "show all 3" version of the widget
Look at the "all" tab in the widget, which lets you act out and see all 3 characters at the same time by yourself. Try this
out for a few rounds and see if you get a sense for why it works. Encourage students here to play with small values so
the can get a sense of the relationships between the numbers.
Optional Recap Handout: There is an optional student handout that Recaps important ideas from the widget:
(Optional) Public Key Cryptography Recap - Handout
Perhaps obvious, but the bigger the clock size the harder it is for Eve to crack.
There are also certain values that Bob could send, like 0 or 1, that would give away the secret.
There is no way to crack the encryption other than brute force
If you could imagine that value being not a 4-digit number but, say a 75-digit number the computation for Eve becomes
mind bogglingly hard.
Discuss: Let's problem solve! The widget right now only lets you send one secret number at a time.
Furthermore, it's kind of slow - it requires multiple trips over the internet to send one message. What's the
fastest way you could use this tool (or any public key encryption) to send a secure text message?
Students will likely suggest using ASCII codes in some fashion - perhaps trying to cluster more than one ASCII character
per message sent.
Note that if you're going to send multiple messages using public key cryptography you should change the public key
occasionally, otherwise you're giving Eve more clues to crack the message with - you want Eve to start over every time.
A really clever thing to do is to only send one number that represents a key both parties can use for a good old
fashioned symmetric encryption. In other words, only use (the slower, multi-trip) public key cryptography for the purpose
of establishing a secret key to use in some other encryption method.
This is, in fact how HTTPS works - it uses public key cryptography to establish a secret key between two parties. Once
established it uses a much faster encryption method for sending everything else.
Optional Discussion: According to the widget look at what Eve has to compute to crack Alice's private key.
This reveals how Alice's public key was computed based on her choice of clock size and private key. Why
are these made so that pvt * pub MOD clock = 1 ?
The only thing students really need to takeaway from this is that Alice's public key is no accident. It was computed to
make the math in the end work out. That's all they need to know.
But, this fact - that the result of Alice's initial computation is 1 - is the crux of why the math works out in the end.
Short version: when Alice multiplies bob's encrypted message by her private key, it cancels out the public key portion
of Bob's multiplication (because pvt * pub MOD clock = 1 it's just multiplying bob's number by 1), leaving only Bob's
number remaining.
You can read a more thorough explanation here:How and Why Does the Public Key Crypto Really Work? -
Resource
Remarks
This is as far as we're going to take the public key analogy. The public key crypto widget is a superficial version of RSA
encryption. Instead of basic multiplication, RSA:
Uses numbers raised to powers of large prime numbers
Very large (256-bit) values for the modulo divisor (clock size)
Crack the encryption requires finding the prime factors of EXTREMELY large numbers. Prime factorization is much
harder computational problem to solve than our little multiplication+mod problems here.
But from these activities hopefully you have a better sense of how public key encryption works and how making
asymmetric keys is at least mathematically possible.
There are some more detailed ideas about Public Key Cryptography that are interesting but not crucial for the AP Exam.
A public and private key are mathematically related so that decrypting is easy
The modulo operation acts as a one-way function to obscure inputs that are very large numbers
No one owns it - it's a public standard
Fill in a table that shows all of the terms we've learned around public key encryption and how each analogy we've seen
applies.
private key
public key
encrypted message
how to decrypt
Public Key Crypto
Lockbox Cups & Beans
Widget
how to crack
Assessment
Questions:
1. In symmetric encryption, the same key is used to encrypt and decrypt a message. In asymmetric encryption different
keys are used to encrypt and decrypt. Give at least one reason (more are welcome) why asymmetric encryption is
useful.
2. In the cups and beans activity, what is the public key? What is the private key? What is the unencrypted and encrypted
message?
3. What are some other examples of one-way functions? Can you think of a one-way function in real life?
4. Using your name and the name of a friend, describe the process of sending your friend a message using public key
cryptography. Your explanation should include the terms: Public Key, Private Key, Encrypt(ion), Decrypt(ion)
5. Explain what the modulo operation does. You may use the analogy of a clock in your answer if you like.
7. Describe to a person who knows nothing about encryption why public key encryption is hard to crack.
a) 0
b) 1 4/13
c) 4
d) 13
e) 17
a) 0
b) 1.5
c) 5
d) 15
e) 20
Extended Learning
The Public Key Crypto Widget simulates the basic mechanics of RSA Encryption, with slightly more simple math. You
could go read about RSA Encryption.
Standards Alignment
CSTA K-12 Computer Science Standards (2011)
CPP - Computing Practice & Programming
CT - Computational Thinking
If you are interested in licensing Code.org materials for commercial purposes,contact us.
UNIT Ch. 1 1 2 3 4 5 6 7 8 9 10
4
Lesson 10: Rapid Research - Cybercrime
Research | Project
Agenda Crime"
Vocabulary
Antivirus Software - usually keeps big lists
of known viruses and scans your computer
looking for the virus programs in order to get
rid of them.
DDoS Attack - Distributed Denial of Service
Attack. Typically a virus installed on many
computers (thousands) activate at the same
time and flood a target with traffic to the point
the server becomes overwhelmed.
Firewall - software that runs on servers
(often routers) that only allows traffic through
according to some set of security rules.
Phishing Scam - a thief trying to trick you
into sending them sensitive information.
Typically these include emails about system
updates asking you send your username and
password, social security number or other
things.
SSL/TLS - Secure Sockets layer / Transport
Layer Security - An encryption layer of HTTP
that uses public key cryptography to establish
a secure connection.
Virus - a program that runs on a computer to
do something the owner of the computer does
not intend.
Teaching Guide
Getting Started (5 mins)
Video: Cybersecurity & Crime Teaching Tip
Remarks
NOTE: this video is also embeded at the top of the How
To conclude our thinking about encryption and security Not To Get Hacked - Web Resource page that
we're going to look at how cybercrimes are conducted, students read in the actvity, as well as in Code Studio. You
how cybersecurity measures can protect us, and what might choose to send them directly to that at this point or
the implications are of data leaking. Then you'll show the video to the whole class.
research a particular cybercrime and quickly prepare a
one-pager about it.
Show: The Internet: Cybersecurity and Crime - Content Corner
Video
The video touches on types of cybercrimes and cyber
Have students watch the video (display for all, or have attacks NOT covered in the How Not To Get Hacked -
students watch in Code Studio) Web Resource article but are still vocabulary that
students need to know, specifically DDoS attacks and how
Have students complete the Cybersecurity and
they work.
Crime Video Worksheet (Optional) - Video
Worksheet
The video touches on a number of topics that students might choose to research later:
Day 1 - Choose Innovation, Read Differences from the actual Explore PT: The actual
and Research Explore Performance Task will be completed over 8 class
hours. The fact that this schedule is significantly shorter
Review Activity Guide and Rubric: At the reflects several differences in this Practice PT.
beginning of the project, emphasize the importance of Some categories and topics have been supplied ahead
reviewing the one-pager template and rubric.
of time.
Students may assume that more is required of them Students are not creating any kind of computational
than is actually the case. Point out that the written artifact
component is quite short. They probably have space for Students are not describing the beneficial or harmful
at most 100-150 words per response. effects of an innovation / event.
Choosing Your Cybercrime Event: It is
recommended that you place a time limit on this
process (e.g. 20 minutes). Students should not leave class after the first day without a topic in mind and ideally with some
resources identified. Luckily, in choosing their topics, students will likely have begun to identify resources they can use in
completing their project.
Sharing/Submission: You may want to collect students’ one-pagers, have them share in small groups, or with the
whole class. Since students were researching something of their own choosing, they might be eager to show what they
found out.
This is a theme for the whole lesson The annotations given here should provide enough depth
Vulnerabilities in hardware and software can be for the kinds of responses expected of students.
compromised as part of an attack.
But, as mentioned in the video, a large percentage
Teaching Tip
of cybersecurity vulnerabilities are human-related,
such as choosing bad passwords, (unintentionally) If you are running out of time, assigning some of these
installing viruses, or giving personal information terms for homework might be a good way to review and
away. kick off the next day.
Sockets layer/transport layer security
(SSL/TLS)
An encryption layer of HTTP. When you see the little lock icon and https it means that you are visiting a website over
HTTP but the data going back and forth bewtween you and the server is encrypted.
SSL (secure sockets layer) and TLS (transport layer security) usepublic key cryptography to establish a secure
connection.
Cyber warfare and cyber crime have widespread and potentially devastating effects.
This is especially true in the case of warfare which (fortunately) we have not experienced much of on a global scale.
But using cyber attacks to cripple basic infrastructure (power, water) and communication could be devastating.
Distributed denial of service attacks (DDoS)
Typically a virus installed on many computers (thousands) activate at the same time and flood a target with traffic to
the point the server becomes overwhelmed -- doing this can render web services like DNS, or routers, or certain
websites useless and unresponsive.
Phishing scams
Typically a thief trying to trick you into sending them sensitive information. Typically these include emails about
system updates asking you send your username and password, social security number or other things.
More sophisticated scams can make websites and email look very similar to the real thing.
Viruses / Antivirus software and firewalls
A virus is program that runs on a computer to do something the owner of the computer does not intend. Viruses can
be used as a Bot Net to trigger a DDoS-style attack, or they can spy on your computer activity, such as capturing all
the keystrokes you make at the computer, or websites you visit, etc.
Antivirus software usually keeps big lists of known viruses and scans your computer looking for the virus programs in
order to get rid of them.
A "firewall" is simply software that runs on servers (often routers) that only allows traffic through according to some set
of security rules.
Assessment
Rapid Research: Use the rubric provided with the Activity Guide to assess the one-pagers.
It's the plural of http - a more robust version of http that runs on multiple channels.
s is for "secure" - a version of http that is encrypted.
s is for "simple" - a simplified version of http that runs faster on modern computers
s is for "standard" - to distinguish the original http from non-standard versions like httpv and httpx
When someone tries to get you to give up personal information through email or a bogus website it is called a:
DDoS Attack
Phishing Scam
Virus
SSL/TLS layer
When someone attemps to compromise a target by flooding it with requests from multiple systems that is called a:
DDoS Attack
Phishing Scam
Virus
SSL/TLS layer
The vast majority of computer security failures are due to:
Software vulnerabilities
Hardware limitations
Human carelessness
Bot Nets
Standards Alignment
Computer Science Principles
6.2 - Characteristics of the Internet influence the systems built on it.
6.3 - Cybersecurity is an important concern for the Internet and the systems built on it.
7.3 - Computing has a global affect -- both beneficial and harmful -- on people and society.
If you are interested in licensing Code.org materials for commercial purposes,contact us.