Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cryptographic Techniques Instructor: Jerry Gao Ph.D. San Jose State University URL: May,

Similar presentations


Presentation on theme: "Cryptographic Techniques Instructor: Jerry Gao Ph.D. San Jose State University URL: May,"— Presentation transcript:

1 Cryptographic Techniques Instructor: Jerry Gao Ph.D. San Jose State University email: jerrygao@email.sjsu.edu URL: http://www.engr.sjsu.edu/gaojerry May, 2000

2 Topic: Crytographic Techniques - Encryption and decryption - Symmetric encryption - Asymmetric or public-key encryption - Message digesting or hashing - Digital signatures and enveloping - digital signatures, dual signatures, blind signatures - Public key management - certificates and certification authorities Jerry Gao Ph.D.5/20000 Outline All Rights Reserved

3 Jerry Gao Ph.D.5/2000 Introduction to Crytographic Techniques Topic: Crytographic Techniques

4 Jerry Gao Ph.D.5/2000 In cryptographics, a message in human readable form is referred to plaintext or cleartext. Encryption: Encryption refers to a process which disguises a cleartext message to hide its substance and generates a message, known as ciphertext. Plaintext is denoted by P, whereas ciphertext is denoted by C. The encryption function E operates on P to produce C based on a key value K: E k (P) = C Encryption and Decryption Encryption Key PlaintextCiphtext Topic: Crytographic Techniques

5 Jerry Gao Ph.D.5/2000 Encryption and Decryption decryption Decryption: The reverse process of encryption is known as a decryption, in which a cihhertext is converted back to its original cleartext form. In the reverse process, the decryption function D operates on C to produce P based on a key value K: D k (C) = P Encryption Key CiphertextPlaintext Topic: Crytographic Techniques

6 Jerry Gao Ph.D.5/2000 Symmetric Encryption Topic: Crytographic Techniques Symmetric encryption (secret-key encryption, or single-key encryption): Secret-key encryption refers to the use of a shared key for both encryption by the transmitter and decryption by the receiver. Work step: - Sender sends a message after encryption with a secret-key. - Receiver decrypt the message with the same secret key after receiving it. Internet Anne sends a message Bob receives Anne’s message Encrypt with a secret key Decrypt with a secret key Encrypted Message Encrypted Message

7 Jerry Gao Ph.D.5/2000 Symmetric Encryption Topic: Crytographic Techniques Special features of symmetric encryption: - Two communication parties use and share the same key. - Encryption and decryption is carried out based on the same key. - Both parties must agree on the secret key before communications. Advantages: - Useful in many cases which only involves two-party communications. Problems and limitations: - Complex in key distribution (key generation, transmission, and storage). - Not scalable. - Impractical to support large group of communications in networks. - Impossible to support exchanging messages with a large group of previously unknown parties over a public open network. Example: DES (the Data Encryption Standard)

8 Jerry Gao Ph.D.5/2000 Asymmetric Encryption Topic: Crytographic Techniques Asymmetric encryption (public-key encryption): Public-key encryption (asymmetric encryption) use a pair of keys for each party. - One key is known as a “public key”, which is known to other parties. - One key is known as a “private key” or a “secret key”, which must be confidential, and is known only to its owner. - The public key encrypts the message. - The private key decrypts the message. Internet Anne sends a message Bob receives Anne’s message Encrypt with a public key PK(Bob) Decrypt with Bob’ private key SK(Bob) Scrambled Message Scrambled Message

9 Jerry Gao Ph.D.5/2000 Asymmetric Encryption Topic: Crytographic Techniques Special features of asymmetric encryption (public-key encryption): SK(PK(M)) = M Advantages: - Easy to key distribution (key generation, maintain and storage) - Scalable to support large group of users in an public network - Easy to support unknown users since no previous consent is needed. - Better protection than symmetric encryption. Problems and limitations: - Slow performance Applications:E-commerce, snoop-proof email system. Standards:the best known public-key encryption algorithm --> RSA

10 Jerry Gao Ph.D.5/2000, Sh RSA Algorithm Topic: Crytographic Techniques The RSA algorithm was developed by Rivest, Shamir, and Adleman at MIT in 1978. The basic algorithm is outlined below: 1: Choose two large distinct primes, p and q. 2: Compute the product (modulus) n = pq. 3: Randomly choose encryption key e, such that e and (p-1)(q-1) are relatively prime. 4: Finally use Euclid’s algorithm to compute the decryption key, d such that e. d = 1 (mod (p-1). (q -1)). Where, d and n are relatively prime. e and n are the public key. d is the secret key. To encrypt a message M, e C = M mod n To decrypt C, d M = C mod n

11 Jerry Gao Ph.D.5/2000 Comparing Symmetric Encryption and Asymmetric Encryption Topic: Crytographic Techniques FeaturesSecret-Key EncryptionPublic-Key Encryption No. of keysSingle KeyPair of Keys Types of keysSecret Key onlyOne Public Key and one Private Key Key ManagementSimple but difficult to Need digital certificates manageand trusted third parties PerformanceVery fastSlower UsageUsed for bulk data Used for less demanding encryption,such asapplications such as a phone system,encryption small doc. or to sign messages StandardsData Encryption the RSA algorithm Standard (DES)

12 Jerry Gao Ph.D.5/2000 Message Digesting or Hashing Topic: Crytographic Techniques Message digesting is a way to provide integrity without confidentiality. The basic idea is to apply a digesting or hash algorithm to the (long) message to produce a (short) message digest. Since the encryption is only applied to a very small quantity, and message digesting is very much faster than encryption. Checking==> When the message arrives, the receiver computes a hash of the message using the same algorithm. If this matches the decrypted MIC that came with the message, then the message has not been tampered with. A good Hash function has two properties: - It must be difficult to invert. - It must be resistant to collision. Two well-known Hash functions in payment protocols are MD5 and SHA.

13 Jerry Gao Ph.D.5/2000 Computing a message integrity check (MIC) Topic: Crytographic Techniques Message MICMessage Hash Digest Algorithm Block Cipher Message Integrity Check Secret Key

14 Jerry Gao Ph.D.5/2000 Digital Signatures Topic: Crytographic Techniques What is a digital signature? - Digital signatures are implemented using public-key encryption. - A digital signature is a cryptographic mechanism that performs a similar function to a written signature. - Created using PPK cryptograph and message digests. Encryption allows a message sender the ability to digitally sign messages, thus creating a digital signature for the message. When a message digest is computed and then encrypted using the sender’s private key, and later append to the message, the result is called the digital signature of the message.

15 Jerry Gao Ph.D.5/2000 Digital Signatures Topic: Crytographic Techniques Purposes: Digital signatures are used to ensure the integrity and authentication. -- To verify the origin and contents of a message. -- Digital signatures are used for sender authentication. Why digital signatures? - Public-key algorithms are computation-intensive. With large messages they may be too expensive or too slow for the application. - Digital signatures based on digested message provide alternative solutions. Application: Digital signatures can be used to endorse an electronic document in a way that can be later validated for authenticity.

16 Jerry Gao Ph.D.5/2000 Digital Enveloping Topic: Crytographic Techniques What is a digital envelop? - When a digitally signed message is further encrypted using the receiver’s public key, and the message is said to be contained in a digital envelope. Purposes: Digital signatures are used to ensure the integrity and authentication. -- To verify the origin and contents of a message. -- Digital signatures are used for sender authentication. -- To ensure the integrity of communication messages. Why digital signatures? - Public-key algorithms are computation-intensive. With large messages they may be too expensive or too slow for the application. - Digital signatures based on digested message provide alternative solutions.????

17 Jerry Gao Ph.D.5/2000 Generating A Digital Signature Topic: Crytographic Techniques Message Signature Message Digest Encrypt Hashing Algorithm Sender’s Private Key (SK sender) To Receiver

18 Jerry Gao Ph.D.5/2000 Receiving and Checking A Digital Signature Topic: Fundamental Crytographic Concepts Signature Original Message Digest Message Digest Decrypt Hashing Algorithm Sender’s Public Key (PK sender) Message Compare two values

19 Jerry Gao Ph.D.5/2000 Enveloping a message for a recipient Topic: Fundamental Cryptographic Concepts Message Encrypted Message Encrypted Content Encryption Key Random Content Encryption Key Encryption Symmetric Key Encryption Recipient’s Public Key PK recipient

20 Creating a Secure Digital Envelope John’s letter 1010 0011 Encrypted Message Digest Symmetric random key Symmetric random key Digest Algorithm Steve’s Public key 1010 0011 Encrypted Digest John’s Public key 1010 0011 Encrypted Message From: John: To Steve: Jerry Gao Ph.D.5/2000 Topic: Fundamental Crytographic Concepts

21 Digital Certificates Topic: Crytographic Techniques Why digital certificate? - To ensure all participants in a communication or an e-commerce transaction are authenticated. What is a digital certificate? - A digital message which is digitally signed by a trusted certificate authority to a party in a communication or an e-commerce transaction to ensure its authenticity with a public key. - A digital certificate includes: a) a party’s ID information b) its public key issued by a CA CA --> a certificate authority (a trusted third-party) Applications: Through the use of a common third party, digital certificates provide an easy and convenient way to ensure that the participants in an electronic commerce transaction can trust each other.

22 Digital Certificates WebSite’s sever information Message Digest CA’s private key Certificate Authority (CA) Digest Algorithm WebSite’s sever information X.509 Certificate Creating a Server Certificate Jerry Gao Ph.D.5/2000 Topic: Fundamental Crytographic Concepts

23 Jerry Gao Ph.D.5/2000 Topic: Fundamental Crytographic Concepts WebSite’s sever information X.509 Certificate Message Digest Message Digest Digest Algorithm CA’s Public Key Decryption Compare? Server Authentication by Client Digital Certificates


Download ppt "Cryptographic Techniques Instructor: Jerry Gao Ph.D. San Jose State University URL: May,"

Similar presentations


Ads by Google