Cryptography and Architectures for Computer Security - 095947

The course aims to provide a systematic formation on cryptographic techniques currently employed in communications and data storage, focusing on algorithms and architectures and protocols.

Monday (14:30-16:15) classroom L.26.01, Building 26
Thursday (14:30-16:15) classroom L.26.01, Building 26

Gerardo Pelosi
(gerardo.pelosi -at-

Teaching Assistant:
Alessandro Barenghi
(alessandro.barenghi -at-

Office hours:
Wednesday (16:00-19:00),
Building 20, 1st floor, Office 127
or upon appointment through e-mail

Topics for the optional course PROJECT

Reference Material

Course Schedule

Exam Layout

Exam Sessions

Past Exam Papers

Reference Material

There is no single assigned textbook for this course, Slides and lecture notes will be made available during the course. A very good reference for most of the course topics is:

Additional material that you might find useful:

  • Alfred J. Menezes, Paul C. van Oorschot and Scott A. Vanstone, Handbook of Applied Cryptography,avaliable online freely at
  • Jonathan Katz, Introduction to Modern Cryptography, August 2007, Chapman & Hall/CRC Press
  • Christopher Swenson, Modern Cryptanalysis: Techniques for Advanced Code Breaking March 2008, Wiley
  • Stefan Mangard, Elisabeth Oswald, Thomas Popp, Power Analysis Attacks - Revealing the Secrets of Smartcards Springer (available online via Polimi subscription to Springer)

If you are willing to try some practical challenges in the field of cryptography for fun, you can have a look here

Course Schedule

Day Classroom L/E Topic Reference Material
1 Mon. 25/2 Room L.26.01 (Bdg. 26) Introduction to cryptography, confidentiality, integrity, authentication and non-repudiation. Adversaries and classes of attacks Slides
Slides 4x4
Menezes Chap.1
2 Thu. 28/2 Room L.26.01 (Bdg. 26) Historical ciphers, Perfect secrecy, Shannon's proof, OTP, confusion and diffusion principles Slides
Slides 4x4 grayscale
Smart. Chap. 3
Smart. Chap. 5
3 Mon. 04/3 Room L.26.01 (Bdg. 26) Exercises on Historical Substitution Ciphers, Permutation Ciphers Exercise book, Chapter 1
4 Thu. 07/3 Room L.26.01 (Bdg. 26) Block Ciphers: Feistel structure, DES, 3DES, DES-X, Modes of Operation Slides
Slides 4x4
Smart. Chap. 8
Menezes Chap. 7
5 Mon. 11/3 Room L.26.01 (Bdg. 26) Block Ciphers: SPN structure, AES;
Stream ciphers: LFSR, RC4
Slides 4x4
Smart. Chap.s 7,8
6 Thu. 14/3 Room L.26.01 (Bdg. 26) Block Cipher Cryptanalyses:
Linear Cryptanalysis
Slides 4x4 grayscale
C calculator for linear biases
Linear cryptanalysis implementation
7 Mon. 18/3 Room L.26.01 (Bdg. 26) Block Cipher Cryptanalyses: Differential Cryptanalysis + exercises Slides
Slides 4x4 grayscale
C calculator for linear biases
Differential cryptanalysis implementation
8 Thu. 21/3 Room L.26.01 (Bdg. 26) Hash functions: definitions, properties, birthday paradox, Design principles, MACs Slides
Slides 4x4 grayscale
Smart. Chap. 10
9 Mon. 25/3 Room L.26.01 (Bdg. 26) Hybrid Cryptoschemes and Public Key Authentication Slides
Slides 4x4
ITU X.680, X.690, X.509, IETF RFC 4880
10 Thu. 28/3 Room L.26.01 (Bdg. 26) Exercises on block ciphers, LFSR and Hash functions
11 Mon. 01/4 Room L.26.01 (Bdg. 26) Algebraic Groups - Definitions of Rings and Fields Notes 01
12 Thu. 04/4 Room L.26.01 (Bdg. 26) Modular Arithmetic - Finite Fields Notes 02
13 Mon. 8/4 Room L.26.01 (Bdg. 26) Modular Arithmetic - Finite Fields see Notes 02
14 Thu. 11/4 Room L.26.01 (Bdg. 26) Polynomial Fields and Extension Fields Notes 03
- Mon. 15/4 Room L.26.01 (Bdg. 26) - Lessons suspended for mid-semester terms
- Thu. 18/4 Room L.26.01 (Bdg. 26) - Lessons suspended for mid-semester terms
- Mon. 22/4 Room L.26.01 (Bdg. 26) - Easter Holidays
- Thu. 25/4 Room L.26.01 (Bdg. 26) - National Holiday
15 Mon. 29/4 Room L.26.01 (Bdg. 26) Examples and Exercises on Finite Fields (see notes 03, and past written exams)
16 Thu. 02/5 Room L.26.01 (Bdg. 26) Password Storage, Memory hard functions and disk encryption Slides
Slides 4x4
17 Mon. 06/5 Room L.26.01 (Bdg. 26) Public Key Cryptography - RSA Cryptosystem Slides
Slides 4x4 grayscale
Smart. Chap. 11
Smart. Chap. 15
18 Thu. 09/5 Room L.26.01 (Bdg. 26) More on the RSA cryptosystem - Discrete Logarithm Problem, Diffie-Hellmann Protocol, ElGamal cryptosystem, ElGamal Signature scheme, CCA2-Secure ElGamal, Digital Signature Algorithm (DSA) Slides
Slides 4x4 grayscale
Smart. Chap. 11,14,15
19 Mon. 13/5 Room L.26.01 (Bdg. 26) More on Dlogs (see slides Thu. 9/05)
20 Thu. 16/5 Room L.26.01 (Bdg. 26) Elliptic Curve Cryptography Slides
Slides 4x4 grayscale
Smart. Chap. 2
21 Mon. 20/5 Room L.26.01 (Bdg. 26) Montgomery multiplication and fast arithmetic algorithms Notes on Fast Modular Arithmetic
Menezes Chap. 14 Sections 1–3
23 Thu. 23/5 Room L.26.01 (Bdg. 26) Exercises on Montgomery Multiplication and RSA
24 Mon. 27/5 Room L.26.01 (Bdg. 26) Primality Testing. Number theoretical cryptanalysis: factoring algorithms, Discrete log extraction algorithms Slides
Slides 4x4 grayscale
Smart. Chap. 12 (Factoring)
Smart. Chap. 13 (Discrete Logs)
25 Thu. 30/5 Room L.26.01 (Bdg. 26) Pohlig-Hellman Attack
26 Mon. 03/6 Room L.26.01 (Bdg. 26) TLS and SSH, Kerberos, Tor Slides
Slides 4x4 grayscale
27 Thu. 06/6 Room L.26.01 (Bdg. 26) Side Channel Attacks
28 Mon. 10/6 Room L.26.01 (Bdg. 26) Recap and exercises

Exam layout

There will be a 2h/2h30 written examination on the subjects of the course, which will include both questions and exercises.
It is possible to integrate the exam score with an optional practical project yielding at most a +6 increase in the evaluation (groups with at most 2 people).
However, a sufficient score in the written part must be obtained.

Project Guidelines

In order to take on a project you must contact both the teacher and the instructor (keep them both as CC) for both asking details and the natural communication which will ensue during the project development. For the sake of unambiguity you must always keep both of them in all your communications. Contact e-mails not complying with this will not be answered.

The project includes a reasonably-sized report and a short (10-15 minutes) presentation to be delivered to the teacher and the instructor. If the project involves the production of code, a Polimi-hosted git repository will be provided, with ssh public-key based access.

The project should be delivered at least a week in advance with respect to the exam date in which you want it to be evaluated (it may be different from the date of the written examination).

A preliminary list of projects is available with more project descriptions to come.
The assignment policy is “first-come-first-served”.

The projects proposals are available here; autonomous project proposals are welcome and will be taken into consideration.

Exam Sessions

Extra written-examination call on June, 25th 2019, 3pm (2 hrs 15 min, at most) – Room: “Sala Seminari” (Building 20, ground floor)

Marks will be given out as soon as possible in the next few days and officially recorded in the academic book (transcript) on July 2nd, 2019

Check the Poliself for further information on the exact time and place.

1st call on July, 2nd 2019, 15:00 Room: S.0.2

2nd call on July 24th, 2019, 11:30, Room: S.0.5

3rd call on September 6th, 2019, 9:00, Room: D.3.1

4th call on January 20th, 2020, 15:00, Room: TbD

5th call on February 18th, 2020, 11:30, Room: TbD

The subscription to the exam session you want to take is mandatory in order to have the grade registered.

Past Exam Papers

January 20th, 2020 - Questions
January 20th, 2020 - Solutions
January 20th, 2020 - Grades

September 6th, 2019 - Questions
September 6th, 2019 - Solutions

July 24th, 2019 - Questions
July 24th, 2019 - Solutions

July 2nd, 2019 - Questions
July 2nd, 2019 - Solutions

June 25th, 2019 - Solutions

January 24th, 2019 - Questions
January 24th, 2019 - Solutions

September 13th, 2018 - Questions
September 13th, 2018 - Solutions

July 17th, 2018 - Questions
July 17th, 2018 - Solutions

June 21st, 2018 - Questions
June 21st, 2018 - Solutions

February 23th, 2018 - Solutions

February 2nd, 2018 - Questions
February 2nd, 2018 - Solutions

September 12th, 2017 - Solutions

July 5th, 2017 - Questions
July 5th, 2017 - Solutions

February 9th, 2017 - Solutions

September 28th, 2016 - Questions
September 28th, 2016 - Solutions

September 14th, 2016 - Questions

July 20th, 2016 - Questions
July 20th, 2016 - Solutions

July 4th, 2016 - Questions
July 4th, 2016 - Solutions

July 1st, 2015 - Questions
July 1st, 2015 - Solutions

July 22nd, 2015 - Questions
July 22nd, 2015 - Solutions

September 9th, 2015 - Questions
September 9th, 2015 - Solutions

September 30th, 2015 - Questions

Exercise book -- It includes exercises taken also from past exam questions

Creative Commons License
This courseware is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. To view a copy of this license, visit or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.