1 / 13

Message Digest and Digital Signature

CS 490-002/590-001 Network Security. Message Digest and Digital Signature. Department of Computer Science Southern Illinois University Edwardsville Fall, 2019 Dr. Hiroshi Fujinoki E-mail: hfujino@siue.edu. Message_Digest_Dig_Signature/000.

Télécharger la présentation

Message Digest and Digital Signature

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 490-002/590-001 Network Security Message Digest and Digital Signature Department of Computer Science Southern Illinois University Edwardsville Fall, 2019 Dr. Hiroshi Fujinoki E-mail: hfujino@siue.edu Message_Digest_Dig_Signature/000

  2.  Cryptography (to prevent release of message contents) Network P P R S S CS 490-002/590-001 Network Security • Encryption keys are always made as a pair of two keys • One of the two keys is called “secret (private) key” while the other is is called “open (public) key”. • You can give your public key to any people you would like to securely communicate (anyone should be able to get the public key) • You must keep your private key always secret (= never transfer it to anywhere) Message_Digest_Dig_Signature/001

  3.  Cryptography (to prevent release of message contents) Plain Message Plain Message Plain Message Network P P P R S S X CS 490-002/590-001 Network Security Two most important properties in asymmetric-key cryptography: (1) If a message is encrypted by a public key, the encrypted message can be decrypted only by its private key. (2) If a message is encrypted by a private key, the encrypted message can be decrypted only by its public key. Message_Digest_Dig_Signature/002

  4.  Cryptography (to prevent release of message contents) Plain Message Plain Message Network P P P R S S Plain Message X CS 490-002/590-001 Network Security Two most important properties in asymmetric-key cryptography: (1) If a message is encrypted by a public key, the encrypted message can be decrypted only by its pair secret key. (2) If a message is encrypted by a secret key, the encrypted message can be decrypted only by its pair public key. Message_Digest_Dig_Signature/003

  5.  Message digests (to prevent modification of message contents) H l o e l W o r d ! l Message 65 Network R S (1) Calculate a message digest (2) Attach the digest to the message CS 490-002/590-001 Network Security ASCII Code: 108 101 108 111 32 87 72 114 111 108 100 33 ((total) mod 255) = 65 (= 28 – 1) (as 8-bit message digest (hash)) Message_Digest_Dig_Signature/004

  6.  Message digests (to prevent modification of message contents) H l o e l W o r d ! l Message Message 65 65 Network R S (1) Calculate a message digest (2) Attach the digest to the message CS 490-002/590-001 Network Security This math function is called “Hash Algorithm” ASCII Code: 108 101 108 111 32 87 72 114 111 108 100 33 = ((total) mod 255) = 65 (= 28 – 1) 65 locally calculate the hash compare (as 8-bit message digest (hash)) This methods has two problems! Message_Digest_Dig_Signature/005

  7.  Message digests (to prevent modification of message contents) Message Message Message Message 65 65 65 65 249 249 Network R S CS 490-002/590-001 Network Security How can we prevent this problem? Message_Digest_Dig_Signature/006

  8.  Message digests (to prevent modification of message contents) (4) The whole message is transferred (3) Attach the encrypted digest to the message (2) Encrypt the digest using the private key Message Message (7) R calculates the digest on its own and compares it with the digest from S (6) R decrypts the digest from S (5) R downloads the public key of S 65 65 Network P P R S S (1) Calculate a message digest CS 490-002/590-001 Network Security Message_Digest_Dig_Signature/007

  9.  Message digests (to prevent modification of message contents) H l o e l W o r d ! l Message 65 Network R S (1) Calculate a message digest If we have 8 bits for a digest, what is the probability of the digest accidentally match? (2) Attach the digest to the message CS 490-002/590-001 Network Security ASCII Code: 108 101 108 111 32 87 72 114 111 108 100 33 1/256 because of this hash algorithm = 65 ((total)) mod 255 (= 28 – 1) It’s 1/256! “Hash Collision” = Message_Digest_Dig_Signature/008

  10. CS 490-002/590-001 Network Security  Major hash (message digesting) algorithms 4-byte (32-bit) hash (those who generate a 32-bits hash digest)  fnv132, fnv1a32  adler32 20-byte (160-bit) hash  crc32, crc32b  joaat  sha1  tiger160_3, tiger160_4  haval160_3, haval160_4, haval160_5 8-byte (64-bit) hash  fnv164, fnv1a64 64-byte (512-bit) hash  sha3-512 16-byte (128-bit) hash  whirlpool  MD2, MD4, MD5 The longer the hash, the less chance of collision  tiger128_3, tiger128_4 The longer the hash, the slower to generate  ripemd128  haval128_3, haval128_4, haval128_5 Message_Digest_Dig_Signature/009

  11. Message Message 65 65 CS 490-002/590-001 Network Security  Known issues regarding digital signature ISSUE   Digital signatures do NOT verify the correctness of the contents signed This signature does NOT guarantee the contents are created at 14:02PM Aug. 26, 2019 Creation time of this document = 14:02 August 26, 2019 Creation time of this document = 14:02 August 26, 2019 Message_Digest_Dig_Signature/010

  12. P CS 490-002/590-001 Network Security  Known issues regarding digital signature ISSUE  How can receivers safely (and correctly) obtain this public key from you?  Digital signatures do NOT guarantee the correctness of P (public keys) (it needs a mechanism to guarantee the authenticity of public keys) Message_Digest_Dig_Signature/011

  13. Check List CS 490-002/590-001 Network Security  What are message digests?  What are “digital signatures”?  How do “digital signatures” prevent “modification of message contents”?  What are “hash collisions”?  How “hash collisions” can be avoided?  Why are correctness (the authenticity) of public keys are important for digital signature?  Can “digital signature” prevent replay attacks? - If yes, explain how - If no, explain why not Message_Digest_Dig_Signature/012

More Related