Applied Cryptography (VIHIA030)

This course is lectured at the Aquincum Institute of Technology, Budapest. However, it has been accredited and got a course identifier VIHIA030 at the Budapest University of Technology and Economics. This page is the course homepage, which contains practical information related to the course and the lectures, consequently, this page is always under construction.

Course syllabus (pdf)

Past semesters

2015 spring, 2015 fall, 2016 spring

Lecturers

Course objectives

The objective of the course is to give an introduction to the basics of cryptography, to explain how basic building blocks work, and to demonstrate how secure systems can be engineered by properly using them. Besides the theoretical background, we use lot of illustrative examples and show practical applications. In addition, besides the technical details, we give an outlook to the legal and business aspects of using cryptography.

Background and course content at a glance

Today, we live in an information based society: we communicate via networks, we store data in the cloud, we use on-line services, and we even socialize on-line. Trust in all these infrastructure and services is indispensable, and information security technologies play a key role in establishing trust in the cyber world. One of the key enablers of information security is cryptography. This course is about the basics of cryptography and its appications for building secure systems. As a matter of fact, cryptography has not always been used properly in practice; indeed, it is very often used in an inappropriate way, which leads to catastrophic failures. Proper application of cryptographic mechanisms is an engineering issue and needs training. This is the key motivation for our course.

This course has four parts. In the first part, we introduce the basic cryptographic building blocks (such as symmetric and asymmetric key encryption schemes, hash functions, and random number generators) and the basic protocols that use them (such as block encryption modes, MAC functions, and key establishment). In the second part, we deal with the application of cryptographic primitives for engineering secure communication protocols. We discuss in details well-known examples, such as TLS/SSL and the security protocols used in WiFi networks. In the third part, we show application of cryptography for securing cloud services, focusing on secure cloud based data storage, and sharing first hand experience in desiging and building Tresorit, an encrypted storage service in the cloud. Finally, in the fourth part, we discuss the concept and the practice of public key infrastructures (PKI) and electronic signatures, including issues such as issuing, using, and revoking public key certificates, and the pitfalls of verifying electronic signatures.

Methods of instruction

The course comprises a series of lectures with some classroom exercises. In addition, the students receive small homeworks and a semester project assignment. The semester project contains design and implementation work, and can be carried out in teams.

Grading

There are two tests (midterm and final). The final grade will be calculated as a weighted sum of the midterm test, the final test, and the project result (midterm test - 40%, final test - 40%, project - 20%)

Schedule and room

When Where
Monday, 09:00-11:00 AIT
Friday, 11:00-13:00 AIT

Course outline and material (2016 fall semester)

Date Topic Lecturer
Sep 5, 2016. History of cryptography (slides) L. Buttyan
Sep 9, 2016. Symmetric key ciphers L. Buttyan
Sep 12, 2016. Block cipher modes and attacks L. Buttyan
Sep 16, 2016. Block cipher modes and attacks (cont'd) L. Buttyan
Sep 19, 2016. Hash functions and MAC functions L. Buttyan
Sep 23, 2016. Public key ciphers and digital signature schemes L. Buttyan
Sep 26, 2016. Random number generation L. Buttyan
Sep 30, 2016. Use of crypto libraries L. Buttyan
Oct 3, 2016. Key exchange protocols L. Buttyan
Oct 7, 2016. WiFi security L. Buttyan
Oct 10, 2016. Transport Layer Security (TLS) L. Buttyan
Oct 14, 2016. Protocols for enhancing privacy L. Buttyan
Oct 17, 2016. TLS attacks L. Buttyan
Oct 21, 2016. Midterm test L. Buttyan
  -- MIDTERM BREAK --  
Nov 4, 2016. Cloud encryption - Tresorit insight I. Lam
Nov 7, 2016. Passwords and one-time passwords I. Lam
Nov 11, 2016. Feedback on the midterm test and the project assignment L Buttyán
Nov 14, 2016. Authentication in practice I. Lam
Nov 18, 2016. Secure e-mail I. Lam
Nov 21, 2016. Full disk encryption and beyond I. Lam
Nov 25, 2016. Digital Rights Management I. Lam
Nov 28, 2016. Project presentations I. Lam, L. Buttyan
Dec 2, 2016. Certificates and Certification Authorities I. Berta
Dec 5, 2016. Electronic signatures I. Berta
Dec 9, 2016. Final test I. Lam

Recommended supplementary material for the first part of the course

Project assignment

The goal of the semester project is to use the cryptographic building blocks that we learned during the lectures in practice. We believe that a learning-by-doing approach leads to deeper understanding of the subject.

To make it fun and somewhat less of an effort, the semester project can be carried out in groups of 2-3 students. This also allows students to gain experience in team work and collaborative development of software. So, please, team up with your buddies, and be prepared for the challenge!

The theme of the semester project is the development of a secure, multi-party, on-line chat application. The project has two phases: (1) in the first phase, teams have to come up with a design and submit a sufficiently detailed description of their envisioned cryptographic protocols for verification by the professors, and (2) in the second phase, after receiving some feedback on the design, teams have to implement their (potentially corrected) designs using a real crypto library.

We will prepare and distribute a sample chat application (source code in Python for the chat server and chat clients), which will implement the basic communication primitives (sending and receiving chat messages) and some management functions (logging into the chat server, creating a new conversation, listing ongoing conversations, and joining an active conversation). The sample application will be fully functional, but it won't contain any cryptographic protection of chat messages. The task will be to extend this application with security features (setting up cryptographic keys among the chat participants, and applying encryption and integrity protection mechanisms on chat messages). Extending the sample application allows teams to focus on the crypto part, rather than spending time on the chat primitives themsleves. Nevertheless, if you want to start from scratch (e.g., because you want to implement your project in another programming language), then we will not stop you doing that!

In the first (design) phase of the project, you do not really need the sample application. You can think of it as a standard client-server application, and you can assume that primitives are available for managing conversations and sending textual messages. It is important, however, that all communications should be mediated by the server, so chat clients cannot talk directly to each other. Teams should design protocols for setting up keys among the chat participants, such that the server should not have access to those keys (i.e., we assume that the server is an "honest but curious" party, which we trust for managing user accounts and chat conversations, but we don't trust it for accessing the content of those conversations - pretty much like the trust we should have in a cloud service provider in real life). Teams should also design protection mechanisms for chat messages to prevent eavesdropping and to detect replay or modification of messages, as well as injection of fake messages by the server. Designs should follow the design principles that we have learned in the classroom. Teams should produce a document that contains the description of their design in sufficient details, and submit that document by November 7.

In the second (implementation) phase, teams will implement their design (after feedback from professors and potential corrections). Those relying on the sample chat application provided should use the PyCrypto crypto library. The sample application will implement an API to send and recieve strings to and from the server within the context of an ongoing conversation managed by the server. The server will forward a received string to all other participants of the conversation. Your implementation should use these primitives to carry your protocol messages. This means that your protocol messages should be encoded by the sender chat participant as a string, and parsed and processed by the receiving chat participants. Depending on the message type, receiving chat participants should then either respond with an appropriate protocol message, or display the decoded chat messages to the user. Implementations should keep track of protocol states and handle errors. Teams should complete and submit their work (source files in a zip file) by November 28. All teams will run a demo in the classroom on November 28. Professors will look into the source code to check if teams carefully implemented their designs.