Homework #5 Solutions Brian A. LaMacchia Portions © 2002-2006, Brian A. LaMacchia. This material is provided without.

Slides:



Advertisements
Similar presentations
Hash Functions A hash function takes data of arbitrary size and returns a value in a fixed range. If you compute the hash of the same data at different.
Advertisements

Chapter 14 – Authentication Applications
Internet and Intranet Protocols and Applications Lecture 9a: Secure Sockets Layer (SSL) March, 2004 Arthur Goldberg Computer Science Department New York.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Chapter 14 From Cryptography and Network Security Fourth Edition written by William Stallings, and Lecture slides by Lawrie Brown, the Australian Defence.
1 Digital Signatures & Authentication Protocols. 2 Digital Signatures have looked at message authentication –but does not address issues of lack of trust.
Introduction to PKI Seminar What is PKI? Robert Brentrup July 13, 2004.
Homework #4 Solutions Brian A. LaMacchia Portions © , Brian A. LaMacchia. This material is provided without.
Apr 22, 2003Mårten Trolin1 Agenda Course high-lights – Symmetric and asymmetric cryptography – Digital signatures and MACs – Certificates – Protocols Interactive.
8-1 What is network security? Confidentiality: only sender, intended receiver should “understand” message contents m sender encrypts message m receiver.
Presented by Xiaoping Yu Cryptography and PKI Cosc 513 Operating System Presentation Presented to Dr. Mort Anvari.
EECC694 - Shaaban #1 lec #16 Spring Properties of Secure Network Communication Secrecy: Only the sender and intended receiver should be able.
Homework #8 Solutions Brian A. LaMacchia Portions © , Brian A. LaMacchia. This material is provided without.
Introduction to Public Key Infrastructure (PKI) Office of Information Security The University of Texas at Brownsville & Texas Southmost College.
Network Security – Part 2 V.T. Raja, Ph.D., Oregon State University.
Feb 19, 2002Mårten Trolin1 Previous lecture Practical things about the course. Example of cryptosystem — substitution cipher. Symmetric vs. asymmetric.
Long-term Archive Service Requirements draft-ietf-ltans-reqs-00.txt.
TrustPort Public Key Infrastructure. Keep It Secure Table of contents  Security of electronic communications  Using asymmetric cryptography.
E- Business Digital Signature Varna Free University Prof. Teodora Bakardjieva.
Digital Signature Xiaoyan Guo/ Xiaohang Luo/
Secure Systems Research Group - FAU Patterns for Digital Signature using hashing Presented by Keiko Hashizume.
Masud Hasan Secure Project 1. Secure It uses Digital Certificate combined with S/MIME capable clients to digitally sign and.
Cryptography 101 Frank Hecker
CS5204 – Fall Cryptographic Security Presenter: Hamid Al-Hamadi October 13, 2009.
Page 1 Secure Communication Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Bob can sign a message using a digital signature generation algorithm
Programming Satan’s Computer
AQA Computing A2 © Nelson Thornes 2009 Section Unit 3 Section 6.4: Internet Security Digital Signatures and Certificates.
Secure r How do you do it? m Need to worry about sniffing, modifying, end- user masquerading, replaying. m If sender and receiver have shared secret.
Lecture 19 Page 1 CS 111 Online Symmetric Cryptosystems C = E(K,P) P = D(K,C) E() and D() are not necessarily the same operations.
Secure Electronic Transaction (SET)
Cryptography and Network Security Chapter 14 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
8-1Network Security Chapter 8 roadmap 8.1 What is network security? 8.2 Principles of cryptography 8.3 Message integrity, authentication.
Network Security – Part 2 (Continued) Lecture Notes for May 8, 2006 V.T. Raja, Ph.D., Oregon State University.
Security Keys, Signatures, Encryption. Slides by Jyrki Nummenmaa ‘
Untraceable Electronic Mail, Return Addresses, and Digital Pseudonyms David Chaum CACM Vol. 24 No. 2 February 1981 Presented by: Adam Lee 1/24/2006 David.
Information Security Fundamentals Major Information Security Problems and Solutions Department of Computer Science Southern Illinois University Edwardsville.
©The McGraw-Hill Companies, Inc., 2000© Adapted for use at JMU by Mohamed Aboutabl, 2003Mohamed Aboutabl1 1 Chapter 29 Internet Security.
Unit 1: Protection and Security for Grid Computing Part 2
Chapter 6 Electronic Mail Security MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.
SECURITY MANAGEMENT Key Management in the case of public-key cryptosystems, we assumed that a sender of a message had the public key of the receiver at.
Certificate-Based Operations. Module Objectives By the end of this module participants will be able to: Define how cryptography is used to secure information.
Chapter 21 Distributed System Security Copyright © 2008.
Cryptography and Network Security (CS435) Part Twelve (Electronic Mail Security)
23-1 Last time □ P2P □ Security ♦ Intro ♦ Principles of cryptography.
1. 2 Overview In Exchange security is managed by assigning permissions in Active Directory Exchange objects are secured with DACL and ACEs Permissions.
Advanced Database Course (ESED5204) Eng. Hanan Alyazji University of Palestine Software Engineering Department.
SECURITY – Chapter 15 SECURITY – Chapter 15 ….for authentication and confidentiality PGP 1.Uses best algorithms as building blocks 2.General.
Digital Signatures, Message Digest and Authentication Week-9.
Copyright 1999 S.D. Personick. All Rights Reserved. Telecommunications Networking II Lecture 41b Cryptography and Its Applications.
X.509 Topics PGP S/MIME Kerberos. Directory Authentication Framework X.509 is part of the ISO X.500 directory standard. used by S/MIME, SSL, IPSec, and.
Cryptography and Network Security Chapter 14 Fourth Edition by William Stallings Lecture slides by Lawrie Brown.
Security fundamentals Topic 5 Using a Public Key Infrastructure.
© Copyright 2009 SSLPost 01. © Copyright 2009 SSLPost 02 a recipient is sent an encrypted that contains data specific to that recipient the data.
Private key
Electronic Mail Security Prepared by Dr. Lamiaa Elshenawy
Lecture 11 Overview. Digital Signature Properties CS 450/650 Lecture 11: Digital Signatures 2 Unforgeable: Only the signer can produce his/her signature.
Security By Meenal Mandalia. What is ? stands for Electronic Mail. much the same as a letter, only that it is exchanged in a different.
Secure Instant Messenger in Android Name: Shamik Roy Chowdhury.
Prof. Reuven Aviv, Nov 2013 Public Key Infrastructure1 Prof. Reuven Aviv Tel Hai Academic College Department of Computer Science Public Key Infrastructure.
Cryptography and Network Security Chapter 14 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Unit 3 Section 6.4: Internet Security
Cryptography and Network Security
e-Health Platform End 2 End encryption
Homework #5 Solutions Brian A. LaMacchia
Digital Certificates and X.509
Lecture 4 - Cryptography
Homework #4 Solutions Brian A. LaMacchia
Chapter 8 roadmap 8.1 What is network security?
Presentation transcript:

Homework #5 Solutions Brian A. LaMacchia Portions © , Brian A. LaMacchia. This material is provided without warranty of any kind including, without limitation, warranty of non-infringement or suitability for any purpose. This material is not guaranteed to be error free and is intended for instructional use only.

February 7, 2006Practical Aspects of Modern Cryptography2 Question 1 - Timestamping  Clients send the timestamping service a hash value.  The service signs the hash value together with the current time, producing a timestamping receipt.  The timestamping receipt is then sent back to the client, who can do whatever he wants with it (typically, archive it and/or send it along with the signature).

February 7, 2006Practical Aspects of Modern Cryptography3 Question 1a  What information would you include in the receipt?  Why are you including it?  What’s the minimum size in bytes of the information you have to include?  Assumptions: Hash values sent to you by clients are all SHA2-256 hashes and are thus 32 bytes in size. Hash values sent to you by clients are all SHA2-256 hashes and are thus 32 bytes in size. Time is expressed using the GeneralizedTime structure, which is 15 bytes in length. Time is expressed using the GeneralizedTime structure, which is 15 bytes in length.

February 7, 2006Practical Aspects of Modern Cryptography4 Question 1a  Minimum set: The hash value the client submitted to the timestamp service (32 bytes) The hash value the client submitted to the timestamp service (32 bytes) The timestamping time (15 bytes) The timestamping time (15 bytes) An identifier for the signature algorithm the timestamp service is going to use to sign the receipt An identifier for the signature algorithm the timestamp service is going to use to sign the receipt This includes the algorithm the service uses to hash the receipt contents (e.g. “RSA-SHA2-256”) This includes the algorithm the service uses to hash the receipt contents (e.g. “RSA-SHA2-256”) Variable length, could be as small as 1 byte, but is probably at least 4 bytes. Anything reasonable is OK so long as you justified it. Variable length, could be as small as 1 byte, but is probably at least 4 bytes. Anything reasonable is OK so long as you justified it.  The timestamp server’s signature will take another 256 bytes (assuming RSA with 2048-bit keys) Per my , since by “included” I had intended “included in the to-be-signed part”, you didn’t have to include the signature (it’s OK if you did) Per my , since by “included” I had intended “included in the to-be-signed part”, you didn’t have to include the signature (it’s OK if you did)

February 7, 2006Practical Aspects of Modern Cryptography5 Question 1a  What additional information would you include? Some possibilities: Version numbers Version numbers E.g. For the receipt format (~4 bytes typically) E.g. For the receipt format (~4 bytes typically) Public key of the timestamp authority Public key of the timestamp authority Assume ~260 bytes (256 bytes for a 2048-bit public key, 4 bytes for e if it’s short) Assume ~260 bytes (256 bytes for a 2048-bit public key, 4 bytes for e if it’s short) Certificates for the timestamp authority Certificates for the timestamp authority These would be at least 512 bytes each (subject public key + issuer signature), probably 1K or more in practice. These would be at least 512 bytes each (subject public key + issuer signature), probably 1K or more in practice.

February 7, 2006Practical Aspects of Modern Cryptography6 Question 1b  Describe how you could modify the operation of your timestamping service to defend against fraudulent insertion of timestamps “after the fact”.  What additional information do you have to add to the timestamping receipt to effect this change?

February 7, 2006Practical Aspects of Modern Cryptography7 Question 1b  One way to do this is to link the timestamping receipts together by “hash chaining” Include the hash of the nth receipt within the to- be-signed info of the (n+1)st receipt. Include the hash of the nth receipt within the to- be-signed info of the (n+1)st receipt. Every so often (daily, weekly) widely publish (e.g. NYT classifieds) the hash of the last issued timestamp. Every so often (daily, weekly) widely publish (e.g. NYT classifieds) the hash of the last issued timestamp. Only adds 32 bytes to the receipt (size of a SHA2-256 hash) Only adds 32 bytes to the receipt (size of a SHA2-256 hash)  "How to Timestamp a Digital Document," S. Haber, W. Stornetta, Journal of Cryptology, Vol. 3, No. 2, pp , Available at

February 7, 2006Practical Aspects of Modern Cryptography8 Question 2 – Encrypting Mail to Mailing Lists

February 7, 2006Practical Aspects of Modern Cryptography9 Question 2a  What information does the sender have to know about each mailing list recipient if it wants to be able to send them encrypted messages? Nothing—in this scenario the sender doesn’t need to know anything about the ultimate recipients of mailing list messages. Nothing—in this scenario the sender doesn’t need to know anything about the ultimate recipients of mailing list messages. The sender just has to know the public encryption key of the central mailing list server. The sender just has to know the public encryption key of the central mailing list server.

February 7, 2006Practical Aspects of Modern Cryptography10 Question 2a  What information does each recipient have to know about the mailing list server? Nothing in order to decrypt messages sent to them. Nothing in order to decrypt messages sent to them. If the server signs messages in any of your protocols, then recipients would have to know the public part of the server’s signing key pair. If the server signs messages in any of your protocols, then recipients would have to know the public part of the server’s signing key pair.

February 7, 2006Practical Aspects of Modern Cryptography11 Question 2a  If there are M members of the mailing list, how many public keys does each member need to know and how many keys does the server need to know? Each member needs to know 1 public encryption key (the public key of the server). Each member needs to know 1 public encryption key (the public key of the server). They also need to know their own public & private key. They also need to know their own public & private key. The central server needs to know M public encryption keys (one per subscriber), plus his own private key pair The central server needs to know M public encryption keys (one per subscriber), plus his own private key pair

February 7, 2006Practical Aspects of Modern Cryptography12 Question 2b  When the sender encrypts a message that he wants to send to the mailing list, how many RecipientInfos will his S/MIME message have? One (for the mailing list server) One (for the mailing list server)  Does it make a difference if the sender wants to archive a copy of his encrypted message in his “Sent Items” folder in case he wants to look at it later? Yes, in this case the sender needs to include a second RecipientInfo for himself. Yes, in this case the sender needs to include a second RecipientInfo for himself.

February 7, 2006Practical Aspects of Modern Cryptography13 Question 2c  Describe one way that the server could verify that the message came from a mailing list subscriber. The server could maintain a database of members public signing keys along with their addresses and require that senders digitally sign all messages sent to the mailing list. The server could maintain a database of members public signing keys along with their addresses and require that senders digitally sign all messages sent to the mailing list.

February 7, 2006Practical Aspects of Modern Cryptography14 Question 2c  Does the server need to know any additional information about the sender beyond what you already indicated in you answer to Question 2(a)? Yes, in the general case. The server would need to know a public signature key for each mailing list participant. While this could conceivably be the same as the encryption key if RSA is being used, in general subscribers would have separate signing and encryption keys. Yes, in the general case. The server would need to know a public signature key for each mailing list participant. While this could conceivably be the same as the encryption key if RSA is being used, in general subscribers would have separate signing and encryption keys.

February 7, 2006Practical Aspects of Modern Cryptography15 Question 2d  If the mailing list has M members, how many public key encryptions does the server have to perform to prepare the message for sending? The server needs to perform at least M-1 public key encryptions – one for every recipient except the sender (assuming the sender included a second RecipientInfo for himself). If the sender didn’t do that then it’s M encryptions. The server needs to perform at least M-1 public key encryptions – one for every recipient except the sender (assuming the sender included a second RecipientInfo for himself). If the sender didn’t do that then it’s M encryptions. For each recipient the server needs to create a RecipientInfo (content encryption key encrypted with the recipient’s public key). For each recipient the server needs to create a RecipientInfo (content encryption key encrypted with the recipient’s public key).

February 7, 2006Practical Aspects of Modern Cryptography16 Question 2d  Does it make a difference if the server prepares one message with many RecipientInfos vs. a separate message for every recipient? No, not in terms of the number of public key encryptions required. The server has to perform the same number of PK encryptions whether it’s one message to M recipients or M separate messages. No, not in terms of the number of public key encryptions required. The server has to perform the same number of PK encryptions whether it’s one message to M recipients or M separate messages.

February 7, 2006Practical Aspects of Modern Cryptography17 Question 2e  How much symmetric key decryption and encryption does the server need to do in order to properly relay the message? This depends on your answer to 2(c). If you said in 2(c) “have the signer sign the message”, then the server is going to have to decrypt the message once in order to reveal and verify the signer’s signature. This depends on your answer to 2(c). If you said in 2(c) “have the signer sign the message”, then the server is going to have to decrypt the message once in order to reveal and verify the signer’s signature.

February 7, 2006Practical Aspects of Modern Cryptography18 Question 2e  Re-encryption of the message body: If the mailing list is not anonymous, then the server can re-use the encrypted content from the inbound message, and no further symmetric operations are required. If the mailing list is not anonymous, then the server can re-use the encrypted content from the inbound message, and no further symmetric operations are required. If the mailing list *is* anonymous, then the server will have to re-encrypt the message body after removing the signature, so one symmetric encryption of the content will be required. If the mailing list *is* anonymous, then the server will have to re-encrypt the message body after removing the signature, so one symmetric encryption of the content will be required.

February 7, 2006Practical Aspects of Modern Cryptography19 Question 3 – Subscribe Protocol  Describe a protocol that the new subscribing user and the server can use to send this information to the server and authenticate that it came from the entity that receives at the subscribing address. That is, the server needs to know that the subscriber isn’t maliciously signing someone else up to the mailing list. That is, the server needs to know that the subscriber isn’t maliciously signing someone else up to the mailing list.

February 7, 2006Practical Aspects of Modern Cryptography20 Question 3 – Solution  Subscribing client C randomly generates a new public/private encryption key pair (K Pub, K Priv )  C  Server S: K Pub along with his subscribing address  S randomly generates a nonce N  S  C the nonce encrypted with the public key K Pub : {N}K Pub

February 7, 2006Practical Aspects of Modern Cryptography21 Question 3 – Solution  C decrypts {N}K Pub to obtain N.  C encrypts the hash H(N) to S using S’s public key K SPub  C  S: {H(N)}K SPub  S decrypts {H(N)}K SPub to obtain H(N) and verifies that H(N) is the hash of the nonce originally sent to C.

February 7, 2006Practical Aspects of Modern Cryptography22 Question 4 – Group Symmetric Key  Design the “group symmetric key” system. Describe how:  The server can ensure that new subscribers get the current group symmetric key  The group symmetric key is used to encrypt a particular message  What happens to the current group symmetric key when a member unsubscribes from the mailing list.

February 7, 2006Practical Aspects of Modern Cryptography23 Question 4 – Group Symmetric Key  Describe how the server can ensure that new subscribers get the current group symmetric key The server can communicate the GSK as part of the registration process. We can modify the solution to Q3 above as follows The server can communicate the GSK as part of the registration process. We can modify the solution to Q3 above as follows

February 7, 2006Practical Aspects of Modern Cryptography24 Question 4 [Steps 1-6 same as in Q3]  C  S: {H(N)}K SPub  S decrypts {H(N)}K SPub to obtain H(N) and verifies that H(N) is the hash of the nonce originally sent to C.  S  C: {GSK}K Pub  If we want confirmation, C  S: H(GSK,N), or C  S: {H(GSK)}K SPub

February 7, 2006Practical Aspects of Modern Cryptography25 Question 4 – Group Symmetric Key  Describe how the group symmetric key is used to encrypt a particular message. When the server receives an inbound message, it will decrypt the RecipientInfo addressed to it to obtain the content encryption key (CEK). When the server receives an inbound message, it will decrypt the RecipientInfo addressed to it to obtain the content encryption key (CEK). Now, instead of performing a public key encryption for each recipient, the server encrypts the content encryption key with the group symmetric key. The result is stored in a RecipientInfo that’s common to all recipients. Now, instead of performing a public key encryption for each recipient, the server encrypts the content encryption key with the group symmetric key. The result is stored in a RecipientInfo that’s common to all recipients. We use the “KEKRecipientInfo” form of RecipientInfo in S/MIME, which allows us to encrypt a content encryption key with another symmetric key. We use the “KEKRecipientInfo” form of RecipientInfo in S/MIME, which allows us to encrypt a content encryption key with another symmetric key.

February 7, 2006Practical Aspects of Modern Cryptography26 Question 4 – Group Symmetric Key  What happens to the current group symmetric key when a member unsubscribes from the mailing list. When a user unsubscribes, the current GSK becomes invalid and the server has to generate a new GSK and send it to the remaining list members. When a user unsubscribes, the current GSK becomes invalid and the server has to generate a new GSK and send it to the remaining list members. One way to do this is to have the server send a separate message to each list member containing the new GSK encrypted with their respective public encryption keys. One way to do this is to have the server send a separate message to each list member containing the new GSK encrypted with their respective public encryption keys. Clients could then send a confirmatory message to the server to indicate that they’ve received the new GSK. [Optional step] Clients could then send a confirmatory message to the server to indicate that they’ve received the new GSK. [Optional step]

February 7, 2006Practical Aspects of Modern Cryptography27 Question 4 – Group Symmetric Key  Another possibility is to have the server send the GSK (encrypted to each recipient) as part of the next mailing list message. Form the S/MIME message using the GSK to encrypt the CEK. Form the S/MIME message using the GSK to encrypt the CEK. Include the KEKRecipientInfo with {CEK}GSK (CEK encrypted with GSK) Include the KEKRecipientInfo with {CEK}GSK (CEK encrypted with GSK) Include M additional RecipientInfos, one per member i, containing {GSK}K Pub,i Include M additional RecipientInfos, one per member i, containing {GSK}K Pub,i