cryptography cryptography
play

Cryptography Cryptography secret- secret -key and and public key - PDF document

Cryptography Cryptography secret- secret -key and and public key and and public- -key technologies key technologies September 4, 2020 Administrative getting VM files getting VM files Administrative new 1 Administrative


  1. Cryptography Cryptography secret- secret -key and and public key and and public- -key technologies key technologies September 4, 2020 Administrative – – getting VM files getting VM files Administrative new 1

  2. Administrative – – VM usage VM usage Administrative new info Administrative – – upcoming lab upcoming lab Administrative � read instructions before labtime – in general, advance examination a good idea – in particular, first part of RSA instructions this week, plus narrated lecture at link on class website entitled “My RSA lecture available online” 2

  3. Administrative – – submittal instructions submittal instructions Administrative � answer the lab assignment’s questions in written report form, as a text, pdf, or Word document file (no obscure formats please) � email to csci530l@usc.edu Our filter thanks you! � exact subject title must be “cryptolab” � deadline is start of your lab session the following week � reports not accepted (zero for lab) if – late – you did not attend – email subject title deviates This lab exercise uses… … This lab exercise uses � GPG (GNU Privacy Guard) – implements OpenPGP "GnuPG is the GNU project's...implementation of the OpenPGP standard..." � OpenPGP – a cryptography standard RFC4880 “OpenPGP … provide[s]…confidentiality, key management, authentication, and digital signatures” � bc – an arbitrary precision calculator able to perform the arithmetic necessary to operate the RSA algorithm 3

  4. Crypto covered in this lecture or lab? Crypto covered in this lecture or lab? cryptographic historical instances elemental* data lab exercises technology transformation method(s) used secret-key Japanese Naval carryless addition none Code 25 (JN-25) & half-borrow !! Not enough time !! … subtraction Data Encryption serial substitutions simplified-des Standard (DES) & permutations (omitted) public-key Rivest-Shamir- modular arithmetic manual RSA Adelman operation with the algorithm (RSA) bc calculator Digital Signature modular arithmetic keys, encryption, Algorithm (DSA) signing with GPG *Ultimately all ciphers are substitution ciphers in that, ultimately, they substitute ciphertext for plaintext! But this characterizes what the cipher does to each “element” of the plaintext (e.g., byte or block), as it processes elements. JN- -25 25 JN 4

  5. A real- -world secret world secret- -key substitution cipher key substitution cipher A real Japanese Navy Code JN- -25 25 Japanese Navy Code JN conceptual demonstration conceptual demonstration � in ciphertext a Japanese word appears as a number – a 5-decimal-digit number (digits chosen randomly) – called a “ code group ” [of digits] � the ciphertext code group is generated as � two other code groups – one assigned to the word (constant hard mapping, belonging to the word) – the other corresponded to that word (variable, soft mapping) First code group for a word First code group for a word � drawn from the “codebook” � amounts to a dictionary � entries are fixed English demo example code book: Code group Word 39318 apples 95280 bananas 80514 eat 72084 I 41712 like 64479 you 5

  6. A codebook A codebook Japanese codebook from 1933 on display at Bletchley Park Museum An example An example the Zimmerman note the Zimmerman note A message enciphered through a word-to-number codebook “dictionary.” The numbers map to German words. (The note, from Germany proposing that Mexico go to war with the US, was intercepted, decoded, and publicized. It catalyzed US entry into World War I soon after.) 6

  7. Footnote: WWI Footnote: WWI DES DES simplified academic version S- -DES DES simplified academic version S a conventional (i.e., 1- -key) substitution cipher key) substitution cipher a conventional (i.e., 1 represented by the following procedural example represented by the following procedural example 7

  8. S- S -DES* process flow DES* process flow *simplified version of the DES algorithm for tutorial purposes, by Edward Schaefer, Santa Clara University Credit to Cryptography and Network Security, Principles and Practice, William Stallings, Prentice Hall, 1999 for figure and precision of explanation. S- -DES DES S encryption encryption component component process flow process flow Credit to Cryptography and Network Security, Principles and Practice, William Stallings, Prentice Hall, 1999 for figures and precision of explanation. 8

  9. Time does not allow… … Time does not allow � discussion of DES procedural details here � nor manual exercise performing a simplified version in lab or as homework Time does not allow… … Time does not allow � discussion of DES procedural details here � manual exercise performing a simplified version in lab or as homework � slides with more detail attached a the end of this presentation as optional appendix 9

  10. GPG GPG and public- and public -key cryptography generally, key cryptography generally, of which it is an implementation of which it is an implementation Functional purposes of cryptograhy cryptograhy Functional purposes of � Confidentiality – ensuring illegibility to outsiders � Authentication – ensuring ostensible and actual sender are one and the same � Data integrity – ensuring non-alteration in transit 10

  11. Cryptographic processing Cryptographic processing Encryption Decryption (data sender) (data receiver) plaintext cryptogram cipher inverse cipher cryptogram plaintext 2 broad technologies 2 broad technologies � Secret-key cryptography versus � Public-key cryptography ������������� ���� �������� 11

  12. Known synonymously as: Known synonymously as: � One technology � Versus the other – single-key – dual-key – private-key – public-key – symmetric – asymmetric – secret-key – shared-key – conventional What a pity! this poor choice of words Key usage, per technology Key usage, per technology Which key encrypts? Which key decrypts? secret the only key! the only key! the public key the private key public !!-OR-!! the private key the public key 12

  13. Keys: secret- -key crypto key crypto Keys: secret Encryption Decryption (data sender) (data receiver) plaintext cryptogram (same key) cipher inverse cipher cryptogram plaintext Keys: public- -key crypto key crypto Keys: public Encryption Decryption plaintext cryptogram (different cipher inverse cipher key) cryptogram plaintext 13

  14. Wait a minute… … Wait a minute � If there are 2 guys, there are 2 key pairs (4 keys) � Who sends the key? � What key does he send? � What does that accomplish? Well… … Well � Only public keys can be sent! � So either guy could be the key sender � And he would send his public key (only! ever!) � Depending who sends, accomplishes � confidentiality, or � authentication 14

  15. Data receiver as key sender Data receiver as key sender Key sender Encryption Decryption (data sender) (data receiver) plaintext cryptogram (data receiver’s cipher inverse cipher private key) cryptogram plaintext Key sent (data receiver’s public key) Functional achievement checklist Functional achievement checklist Data receiver as key sender Data receiver as key sender � Confidentiality � Authentication � Data integrity 15

  16. Data sender as key sender Data sender as key sender Key sender Encryption Decryption (data sender) (data receiver) plaintext cryptogram (data cipher inverse cipher sender’s private key) cryptogram plaintext Key sent (data sender’s public key) Functional achievement checklist Functional achievement checklist Data sender as key sender Data sender as key sender � Confidentiality � Authentication � Data integrity 16

  17. But can’ But can ’t we have both together? t we have both together? � Confidentiality � Authentication � Data integrity Certainly! if you just encrypt and decrypt twice Encrypting the whole message Encrypting the whole message twice is too expensive!! twice is too expensive!! � Make a little token 1 from a big message with a hash function 2 � Encrypt the token instead of the message 1 also called a message digest or hash 2 also called a digest function, like MD5 or SHA1 or RIPEMD-160 (note: MD5 and SHA1, used only for illustration in following screenshots, are deprecated due to weaknesses found in recent years) 17

  18. What is a message digest (a.k.a. hash) What is a message digest (a.k.a. hash) � a value (digest) derived from a body of data (message) � by application of an algorithmic function � applied on all of the data (all bits) digest = f ( message ) Digest function characteristics Digest function characteristics � digest length constant (per particular function) � digest characteristic of (if not unique to) message � big digest variation for slight message variation � irreversible, one-way, inverseless 18

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend