Please enable JavaScript to use CodeHS

AP Computer Science Principles: Cybersecurity

Description

In this lesson, students will explore the basics of cryptography by learning about the Caesar cipher, one of the earliest encryption methods. They will use a Caesar cipher wheel to encrypt and decrypt messages, analyze the number of possible keys, and implement a simple encryption program using JavaScript.

Objective

Students will be able to:

  • Encode and decode messages using the Caesar cipher.
  • Explain how the Caesar cipher works and analyze its security.
  • Implement a simple Caesar cipher encryption program in JavaScript.
Description

This lesson introduces students to the concept of decryption in the Caesar cipher. Students will extend their existing encryption program to include a decryption feature and apply their understanding of shifting characters in the alphabet. They will also experiment with breaking a Caesar cipher through brute-force techniques.

Objective

Students will be able to:
- Implement a decryption function in JavaScript for a Caesar cipher.
- Understand how encryption and decryption are inverse operations.
- Experiment with breaking an encrypted message through brute-force shifting.
- Reflect on the strengths and weaknesses of the Caesar cipher.

Description

Students will explore cryptographic techniques, including the Caesar and Vigenère ciphers, to understand encryption and decryption methods. Through hands-on activities, students will analyze letter frequency, perform brute-force decryption, and implement their own cipher algorithms in JavaScript. The lesson will also integrate an ethical discussion on cryptography and data privacy.

Objective

Students will be able to:
- Explain the principles of encryption and decryption.
- Apply Caesar and Vigenère ciphers to encrypt and decrypt messages.
- Analyze letter frequency and its role in breaking ciphers.
- Develop a Vigenère cipher algorithm using pseudocode and JavaScript.
- Discuss ethical considerations related to cryptography and data security.

Description

In this lesson, students will explore the concepts of key exchange and encryption, unlocking the secrets of how messages are protected online.

Objective

Students will be able to:

  • Identify the weaknesses with symmetric key encryption and why modern cryptography involves more complex mathematics
  • Explain the difference between symmetric and asymmetric encryption
  • Describe the key exchange process using the Diffie-Hellman algorithm (basic understanding).
  • Explain how public-key cryptography is used for encryption and decryption.