Computer Science > EXAM > CS 255 Introduction to Cryptography - Stanford University. Programming Assignment 1. Winter 2022 (All)

CS 255 Introduction to Cryptography - Stanford University. Programming Assignment 1. Winter 2022

Document Content and Description Below

CS 255 Introduction to Cryptography - Stanford University. Programming Assignment 1. Winter 2022 1 Introduction In this assignment, you are tasked with implementing a secure and efficient end-to-end ... encrypted chat client using the Double Ratchet Algorithm, a popular session setup protocol that powers realworld chat systems such as Signal and WhatsApp. As an additional challenge, assume you live in a country with government surveillance. Thereby, all messages sent are required to include the session key encrypted with a fixed public key issued by the government. In your implementation, you will make use of various cryptographic primitives we have discussed in class—notably, key exchange, public key encryption, digital signatures, and authenticated encryption. Because it is ill-advised to implement your own primitives in cryptography, you should use an established library: in this case, the SubtleCrypto library. We will provide starter code that contains a basic template, which you will be able to fill in to satisfy the functionality and security properties described below. 2 End-to-end Encrypted Chat Client 2.1 Implementation Details Your chat client will use the Double Ratchet Algorithm to provide end-to-end encrypted communications with other clients. To evaluate your messaging client, we will check that two or more instances of your implementation it can communicate with each other properly. We feel that it is best to understand the Double Ratchet Algorithm straight from the source, so we ask that you read Sections 1, 2, and 3 of Signal’s published specification here: https://signal. org/docs/specifications/doubleratchet/. Your implementation must correctly use the Double Ratchet Algorithm as described in Section 3 of the specification, with the following changes and clarifications: • You may use HKDF to ratchet the Diffie-Hellman keys the as described in Section 2.3 of the Signal Specification. Proper usage of HKDF is explained in Section 5.2 of the Signal Specification. • HKDF is a key derivation function that we’ve added to lib.js. Section 5.2 describes how it can be used in your implementation. Read the lib.js comments for how to use our API. • The lib.js functions contains two HMAC-related functions: HMACtoAESKey (used to generate keys for AES encryption/decryption) and HMACtoHMACKey (used to generate keys for further HMACs). Part of your task is determining which function to use in each case in order to implement the Signal algorithm. 1• Use ElGamal key pairs for the Diffie-Hellman key exchange. See the generateEG function in lib.js. • Use AES-GCM as the symmetric encryption algorithm for encrypting messages, using the sending and receiving keys as derived in Section 2.4. • Disregard the AD byte sequence input for the ratchetEncrypt and ratchetDecrypt functions in the Signal Specification. Message headers should still be be authenticated. • The header of all sent messages must include an encryption of the sending key under the government’s public key. Use ElGamal public key encryption, with AES-GCM as the symmetric cipher, to encrypt the sending keys. (Note: Since the output of the computeDH function is configured with HMAC, you will need to run the output through HMACtoAESKey to generate a key that can be used with AES-GCM. Please use the govEncryptionDataStr variable as the data parameter in your call to HMACtoAESKey. It may be helpful to refer to the govDecrypt function in test-messenger.js to see how the govEncryptionDataStr variable is used during decryption.) • Every client will a possess an initial ElGamal key pair. These key changes will be used to derive initial root keys for new communication sessions. • Public keys will be distributed through simple certificates. Each client generates its own certificate upon initialization which contains its ElGamal public key. Assume that there is some trusted central party (e.g. server managed by developers of messaging app), and that this central party can securely receive certificates generated by clients. This central party generates a digital signature on each certificate that it obtains, which serves to endorse the authenticity of the certificate owner’s identity and to prevent any tampering of the certificate by an adversary. The signed certificates are then distributed back to the clients, so that every client has the ElGamal public key of every other client in the system. [Show More]

Last updated: 11 months ago

Preview 1 out of 6 pages

Reviews( 0 )

Recommended For You

 Computer Science> EXAM > WGU Introduction to Cryptography C839 (EC-Council CES) (All)

preview
WGU Introduction to Cryptography C839 (EC-Council CES)

WGU Introduction to Cryptography C839 (EC-Council CES) CrypTool Software which allows encryption of text using historic algorithms The Enigma Machine In World War II the Germans made use of an elect...

By Ajay25 , Uploaded: Nov 07, 2022

$14

 Information Technology> EXAM > WGU C839 Pre-Assessment: Introduction to Cryptography | 60 Questions with 100% Correct Answers | Verified | Latest Update (All)

preview
WGU C839 Pre-Assessment: Introduction to Cryptography | 60 Questions with 100% Correct Answers | Verified | Latest Update

Which encryption standard uses the same key to encrypt and decrypt messages? - ✔✔Symmetric Key Encryption Which algorithm is designated as a Type 2 product by the National Security Agency (NSA)? -...

By Tamia Cooper , Uploaded: Mar 13, 2023

$10

 Information Technology> EXAM > WGU C839 Pre-Assessment Introduction to Cryptography | 60 Questions with 100% Correct Answers | Verified | Latest Update | 23 Pages (All)

preview
WGU C839 Pre-Assessment Introduction to Cryptography | 60 Questions with 100% Correct Answers | Verified | Latest Update | 23 Pages

1. A business wants to use keys issued by a trusted third party to demonstrate to potential customers that it is a legitimate organization. Which key is used to sign the certificate issued to the bu...

By Tamia Cooper , Uploaded: Mar 13, 2023

$17

 Computer Science> EXAM > EE 364A CONVEX OPTIMIZATION I - Stanford University. Final March 2022. Data File: https://web.stanford.edu/~boyd/cvxbook/cvxbook_additional_exercises/ (All)

preview
EE 364A CONVEX OPTIMIZATION I - Stanford University. Final March 2022. Data File: https://web.stanford.edu/~boyd/cvxbook/cvxbook_additional_exercises/

EE 364A CONVEX OPTIMIZATION I - Stanford University. Final March 2022. Data File: https://web.stanford.edu/~boyd/cvxbook/cvxbook_additional_exercises/ Electric vehicle charging. A group of N electric...

By PAPERS UNLIMITED™ , Uploaded: Apr 30, 2023

$10.5

 Computer Science> EXAM > CS 255 Introduction to Cryptography - Stanford University. Programming Assignment 1. Winter 2023. (All)

preview
CS 255 Introduction to Cryptography - Stanford University. Programming Assignment 1. Winter 2023.

CS 255 Introduction to Cryptography - Stanford University. Programming Assignment 1. Winter 2023.1 Introduction In many software systems today, the primary weakness often lies in the user’s password....

By PAPERS UNLIMITED™ , Uploaded: May 02, 2023

$9.5

 Health Care> EXAM > Ethics for Health Professions HCA-200 Final Exam Questions with Answers 100% Correct (All)

preview
Ethics for Health Professions HCA-200 Final Exam Questions with Answers 100% Correct

Ethics for Health Professions (HCA- 200) Final Examination Part 1: Multiple Choice (1 points each) ● Identify the choice that best completes the statement or answers the question. ● Clearly circ...

By Quiz Merchant , Uploaded: Apr 19, 2021

$9

 *NURSING> EXAM > ENPC Test Questions & Answers (All)

preview
ENPC Test Questions & Answers

ENPC Test Questions & Answers-An unresponsive 2-year-old child was found by his mother with a bottle labeled "Elavil 50 mg" by his side. Which piece of information is important to obtain from his moth...

By PROF , Uploaded: Apr 25, 2024

$9.5

 Religious Studies> EXAM > CWV TOPIC 2 QUIZ. QUESTIONS AND ANSWERS LATEST UPDATED. (Score 100%) (All)

preview
CWV TOPIC 2 QUIZ. QUESTIONS AND ANSWERS LATEST UPDATED. (Score 100%)

CWV TOPIC 2 QUIZ QUESTIONS AND ANSWERS LATEST UPDATED

By ELIANA , Uploaded: Aug 01, 2022

$9

 ATI MED SURG PROCTORED> EXAM > Med Surg ATI Proctored Exam Test Bank 2023/2024 With NGN (All)

preview
Med Surg ATI Proctored Exam Test Bank 2023/2024 With NGN

Med Surg ATI Proctored Exam Test Bank 2023/2024 With NGN Med Surg ATI Proctored Exam Test Bank 2023/2024 With NGN Med Surg ATI Proctored Exam Test Bank 2023/2024 With NGN Med Surg ATI Proctored E...

By EXAMHUB SOLUTIONS , Uploaded: Apr 15, 2024

$30.5

 NURSING.> EXAM > ATI RN CUSTOM; MENTAL HEALTH NEXT GEN (All)

preview
ATI RN CUSTOM; MENTAL HEALTH NEXT GEN

ATI RN CUSTOM; MENTAL HEALTH NEXT GEN ATI RN CUSTOM; MENTAL HEALTH NEXT GEN ATI RN CUSTOM; MENTAL HEALTH NEXT GEN ATI RN CUSTOM; MENTAL HEALTH NEXT GEN ATI RN CUSTOM; MENTAL HEALTH NEXT GE...

By EXAMHUB SOLUTIONS , Uploaded: Apr 05, 2024

$45.5

$8.50

Add to cart

Instant download

Can't find what you want? Try our AI powered Search

OR

GET ASSIGNMENT HELP
57
0

Document information


Connected school, study & course



About the document


Uploaded On

May 02, 2023

Number of pages

6

Written in

Seller


seller-icon
PAPERS UNLIMITED™

Member since 2 years

482 Documents Sold


Additional information

This document has been written for:

Uploaded

May 02, 2023

Downloads

 0

Views

 57

Document Keyword Tags

THE BEST STUDY GUIDES

Avoid resits and achieve higher grades with the best study guides, textbook notes, and class notes written by your fellow students

custom preview

Avoid examination resits

Your fellow students know the appropriate material to use to deliver high quality content. With this great service and assistance from fellow students, you can become well prepared and avoid having to resits exams.

custom preview

Get the best grades

Your fellow student knows the best materials to research on and use. This guarantee you the best grades in your examination. Your fellow students use high quality materials, textbooks and notes to ensure high quality

custom preview

Earn from your notes

Get paid by selling your notes and study materials to other students. Earn alot of cash and help other students in study by providing them with appropriate and high quality study materials.

WHAT STUDENTS SAY ABOUT US


What is Browsegrades

In Browsegrades, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Browsegrades · High quality services·