Skip to main content
Berkeley
Electrical Engineering and Computer Sciences
4 credits

Berkeley CS 161: Computer Security

CS 161 is Berkeley's upper-division security course, covering memory-safety attacks and defenses, cryptography, web security, and network security. Its centerpiece is a substantial project sequence, including a famous secure file-sharing system built in Go that students design and defend themselves.

Fennie is independent and not affiliated with UC Berkeley. This is an unofficial study guide.

What makes it hard

The course demands an attacker's mindset: exam questions hand you a system and ask how it breaks, which is a different skill from building things that work. The design project punishes hand-wavy security reasoning: your scheme has to survive adversarial grading, and patching a broken design late is expensive.

What you'll cover

  • Memory safety and exploitation
  • Symmetric and public-key cryptography
  • Web security: XSS, CSRF, SQL injection
  • Network protocols and attacks
  • Secure system design

The CS 161 study guide

How to study for Berkeley CS 161, step by step.

  1. 1

    Rebuild your C-and-memory mental model first

    The memory-safety unit assumes you can picture the stack precisely: saved registers, return addresses, calling conventions. Review 61C-level material in week one so the exploitation walkthroughs land.

  2. 2

    Practice thinking as the attacker

    For every mechanism the course presents, ask how you'd break it before learning the defense. Exams hand you systems and ask what goes wrong; that adversarial habit is the actual graded skill.

  3. 3

    Design the crypto project before writing any code

    The secure file-sharing project rewards upfront design: write out your scheme, the threat model, and why each attack fails against it. Teams that code first and patch later lose the most time.

  4. 4

    Learn the crypto primitives by their guarantees

    For each primitive (MACs, signatures, symmetric encryption), know exactly what it does and does not guarantee. Most project vulnerabilities and exam traps come from using a primitive outside its guarantee.

  5. 5

    Run past exams as breaking practice

    Past 161 exams are scenario-heavy and the question style is stable across semesters. Work them timed, and review the official solutions for the attack angles you missed.

Today

Today's CS 161 plan

Preview
65 min

What a Fennie Daily Plan looks like for CS 161. Yours is built from your own syllabus and adapts every day to your deadlines and progress.

0 / 4 done~65m remaining
Keep this plan free

First plan free, no card required. Fennie is independent and unaffiliated with your school.

FAQ

Is CS 161 hard?

It's moderate by Berkeley upper-division standards. The workload is lighter than CS 162, but the exams demand adversarial reasoning that takes practice to develop. The project is the main time sink and rewards careful design over raw coding hours.

What should I know before taking CS 161?

CS 61C-level comfort with C, memory layout, and assembly is the working prerequisite for the memory-safety unit, plus general programming maturity for the Go project. The cryptography is taught from scratch but moves quickly.

How long does the CS 161 project take?

The secure file-sharing project is the big one; expect tens of hours across design, implementation, and testing. The design phase repays the most hours: schemes that are thought through before coding survive adversarial test suites far better.

More Berkeley courses