Block Ciphers and Modes of Operation

Total Page:16

File Type:pdf, Size:1020Kb

Block Ciphers and Modes of Operation Overview Block Ciphers and Modes of Operation Lesson contents Design structures for block ciphers: Feistel Network (FN) and Substitution & Permutation Network (SPN) Gerardo Pelosi The Feistel Network structure Department of Electronics, Information and Bioengineering (DEIB) Data Encryption Standard (DES) Politecnico di Milano Security of DES, Double-DES, Triple-DES, DES-X gerardo.pelosi - at - polimi.it Modes of Operation to guarantee Confidentiality: ECB, CBC, OFB, CFB, CTR G. Pelosi, A. Barenghi (DEIB) Block Ciphers and Modes of Operation 1 / 48 G. Pelosi, A. Barenghi (DEIB) Block Ciphers and Modes of Operation 2 / 48 Design of Symmetric-key Ciphers: Confusion & Diffusion Design of Symmetric-key Ciphers: Confusion & Diffusion Building on the weaknesses of Historical ciphers, C. Shannon stated the following (very general and informal) design principles to thwart cryptanalysis based on statistical properties of ptxs and ctxs Diffusion refers to the property that the statistical distribution of \groups of pxt A symmetric cipher should be composed as the iterative application of letters" frequencies (due to the redundancy of the ptx language) should operations that realize Confusion & Diffusion of the plaintext symbols be dissipated, as much as possible, into flat distribution statistics, i.e. the ctx should appear as random data. Confusion Ideally, keeping the same key, the change of a single bit in the plaintext make the relation between the key, plaintext and ciphertext as complex as drives the change of all bits in ciphertext possible. Ideally, each digit of the key influences the correspondence between pxt and cxt letters in a non-predictable way In contrast to confusion, diffusion spreads (diffuse) the influence of a single plaintext letter over many (or every) cxt letters Replacing every letter with the one next to it on the typewriter Ciphers suffering from poor diffusion can usually be broken by means keyboard is an insecure example of confusion by substitution of Known Plaintext Attacks (e.g., simple permutation ciphers) Ciphers that do not offer effective confusion are vulnerable to frequency analysis G. Pelosi, A. Barenghi (DEIB) Block Ciphers and Modes of Operation 3 / 48 G. Pelosi, A. Barenghi (DEIB) Block Ciphers and Modes of Operation 4 / 48 Purposes of a block cipher Modern Block Ciphers Block ciphers operate on a block of plaintext m2M (m = hm1;:::; mni, Security desiderata with m 2f0; 1g), to produce a block of ciphertext (c = hc ;:::; c i 2 C, i 1 n Provide nontrivial blending of plaintext and ciphertext (confusion) with ci 2f0; 1g) through a key-parametric transformation Provide statistical flatness of the output (diffusion) (either Ek () or Dk ()) The block size n is in the [64, 256] bit range Be analyzable in a clear and formal way to ensure sound security ptx size might not be multiple a of block size ! padding needed! A structure based on the repetition of a short sequence of steps Possible padding strategies: (round) is preferable to a monolithic design Known non-data values (e.g. nulls) A number indicating the size of the pad (may require an extra block) Efficiency desiderata A number indicating the size of the ptx (may require an extra block) Provide efficient encryption and decryption For ptxs longer than a single block, the scheme used to apply () Ek Possibly reuse SW/HW resources for both Ek () and Dk () (or Dk ()) is called mode of operation (lower code size or silicon area) G. Pelosi, A. Barenghi (DEIB) Block Ciphers and Modes of Operation 5 / 48 G. Pelosi, A. Barenghi (DEIB) Block Ciphers and Modes of Operation 6 / 48 Modern Design Strategies Modern Design Strategies: Feistel Networks and SPNs Glossary Feistel Networks Cipher state: The result of each operation performed by the cipher Invented by Horst Feistel (in '50-'60), it splits the cipher state in two Initialized with the ptx; contains the ctx at the end of the computation parts and acts on one of them per round Round: basic sequence of operations applied to the cipher state, a The decryption employs the same cipher structure, except for a number of times (involves blending the key into the state) reversal in the key schedule Key schedule: procedure expanding the original user key into key material to be used in each round Substitution Permutation Networks (SPNs) A SPN implements the confusion-diffusion principles suggested by High level structure Shannon with distinct enc/dec transformations Expand the user key into a set of subkeys and combine them with The round of a SPN acts on the whole cipher state with: the cipher state during the execution of the round primitive A \non-linear" function providing Confusion represented as a lookup Iterate the application of the Round. table, a.k.a.: Substitution-Box (S-box) A \linear" function providing Diffusion, f.i., a bitwise permutation, or Repeating the round increases the complexity of the dependency pairs of rotate & xor operations relations among the user key bits and the bits of the cipher state The addition of a part of the key schedule G. Pelosi, A. Barenghi (DEIB) Block Ciphers and Modes of Operation 7 / 48 G. Pelosi, A. Barenghi (DEIB) Block Ciphers and Modes of Operation 8 / 48 Feistel Network Structural Properties Definition Properties of a Feistel network: A Feistel network transforms an n-bit ptx block m=hL ; R i, into an n-bit 0 0 the round transformation is invertible regardless of the choice of ctx block c=hR ; L i through an r-round process (r≥1) defined as the r r the function F. Indeed, for the i-th round: repetition of r − 1 equal stages plus a final one; where the sub-blocks Li , R are n=2-bit long. i Li = Ri−1; Ri = Li−1 ⊕ F(ki ; Ri−1) Feistel(hL; Ri; k) 1 for i 0 to r − 2 we can also write 2 temp L 3 L R Ri−1 = Li ; Li−1 = Ri ⊕ F(ki ; Li ) 4 R temp ⊕ F(k ; R) // L = R ; R = L ⊕ F(k ; R ) i i i−1 i i−1 i i−1 Note that the last round block halves are swapped hR ; L i, and 5 R R ⊕ F(k ; L) r−1 r−1 r−1 not in their usual left-right order hL; Ri 6 return hR; Li // Note: the last round block halves are swapped where F is an arbitrary function (non-linear and possibly non-invertible) Applying the Feistel network on a ctx (using the subkeys in reverse order, i.e. kr−1 through k0) provides the ptx and each subkey ki , 0≤i≤r − 1, is computed from key schedule of the cipher key k G. Pelosi, A. Barenghi (DEIB) Block Ciphers and Modes of Operation 9 / 48 G. Pelosi, A. Barenghi (DEIB) Block Ciphers and Modes of Operation 10 / 48 Feistel Network Feistel Network Description Block Diagram Confusion: provided by the key-dependent F function Diffusion: obtained adding the F-processed part Ri to Li Enc: r-1 Ciphers based on a Feistel Network DES: block-size: 64-bit, key-size:56-bit, rounds: 16. Standard encryption algorithm employed by the US-government for unclassified documents from 1976 to 2000 Blowfish: block-size: 64-bit, key-size: 32{448 bits (4{56 bytes), rounds: 16. Part of the key schedule used to generate S-Boxes in the F, very demanding Dec: r-1 key-schedule Twofish: evolution of blowfish, block-size: 128-bit, key-size: 128, 192 o 256 bits, rounds: 16 CAST5: block-size: 128-bit, key-size: 40{128 bits (5{16 bytes), rounds: 12 Figure: The structure of a Feistel Network (16, with key-size ≥ 80 bits). Only arithmetic operations and key-dependent bit-rotations employed in the F map. Efficient SW implementation G. Pelosi, A. Barenghi (DEIB) Block Ciphers and Modes of Operation 11 / 48 G. Pelosi, A. Barenghi (DEIB) Block Ciphers and Modes of Operation 12 / 48 Feistel Network DES Structure DES Round DES - structure It takes a 64-bit block hLi−1; Ri−1i and a 48-bit subkey ki to compute L = R ; R = L ⊕ F(k ; R ), where P C i i−1 i i−1 i i−1 I F T T F(k ; R ) = P-box(S-box(k ⊕ E-box(R )) P P i i−1 i i−1 X X 1 E-box(Ri−1) expands Ri−1 from 32 into 48 bits (hb1b2 ::: b8i, each bi is 16-round Feistel cryptosystem with 64-bit wide cipher state: 6 bits) via a fixed expansion that simply duplicates some bits Cipher key: 64 bits; only 56 bits are used. One bit per byte is a parity bit. 2 Adds the 48-bit round key: hb1b2 ::: b8i ki ⊕hb1b2 ::: b8i 3 Map the 48-bit word into a 32-bit one via applying 8 fixed S-boxes. Key schedule: produces hk1;:::; k16i, 48 bits each. Each round key is obtained through bitwise permutation and selection of the initial 56 bits. For each bi , ci = Si (bi ), where Si maps 6 into 4 bits DES-peculiar feature: k0 = k15 Si are the only non-linear component of DES. The fixed permutations IP, FP=IP−1, have no effect on the security; Si described as a 4×16 look-up tables: 1st and 2nd input bit ! row IP and FP were motivated by the ease of laying out the circuit wires index, 3rd to 6th bit ! column index, each cell contains 4 output bits 4 Apply a fixed bitwise permutation specified by the P-box G. Pelosi, A. Barenghi (DEIB) Block Ciphers and Modes of Operation 13 / 48 G. Pelosi, A. Barenghi (DEIB) Block Ciphers and Modes of Operation 14 / 48 DES Round DES Properties F-function Complementation property Li = Ri−1; Ri = Li−1 ⊕ F(ki; Ri−1) ==half − word (Li ; Ri ) size :32−bit Inverting the bit values of the input ptx m and key k, yields a ctx equal to F(ki; Ri−1) = P-box(S-box(ki ⊕ E-box(Ri−1)) ==output size :32−bit bitwise inversion of the result of DES(k; m) E-box stage DES(k; m) = DES(k; m); 8 m 2 M; 8 k 2 K 4 × 8 = 32 bits ! 6 × 8 = 48 bits Chosen-ptx attack bitwise XOR with the 6 × 8 = 48-bit round Collect ptx-ctx pairs (m1;c1), (m1;c2), with c1=DES(k;m1), c2=DES(k;m1) subkey Noting that c = DES(k; m ) , c = DES(k; m ) S-box stage 2 1 2 1 6 × 8 = 48 bits ! Test for any ke, if either DES(ke; m1) yields c1 or c2.
Recommended publications
  • A Quantitative Study of Advanced Encryption Standard Performance
    United States Military Academy USMA Digital Commons West Point ETD 12-2018 A Quantitative Study of Advanced Encryption Standard Performance as it Relates to Cryptographic Attack Feasibility Daniel Hawthorne United States Military Academy, [email protected] Follow this and additional works at: https://digitalcommons.usmalibrary.org/faculty_etd Part of the Information Security Commons Recommended Citation Hawthorne, Daniel, "A Quantitative Study of Advanced Encryption Standard Performance as it Relates to Cryptographic Attack Feasibility" (2018). West Point ETD. 9. https://digitalcommons.usmalibrary.org/faculty_etd/9 This Doctoral Dissertation is brought to you for free and open access by USMA Digital Commons. It has been accepted for inclusion in West Point ETD by an authorized administrator of USMA Digital Commons. For more information, please contact [email protected]. A QUANTITATIVE STUDY OF ADVANCED ENCRYPTION STANDARD PERFORMANCE AS IT RELATES TO CRYPTOGRAPHIC ATTACK FEASIBILITY A Dissertation Presented in Partial Fulfillment of the Requirements for the Degree of Doctor of Computer Science By Daniel Stephen Hawthorne Colorado Technical University December, 2018 Committee Dr. Richard Livingood, Ph.D., Chair Dr. Kelly Hughes, DCS, Committee Member Dr. James O. Webb, Ph.D., Committee Member December 17, 2018 © Daniel Stephen Hawthorne, 2018 1 Abstract The advanced encryption standard (AES) is the premier symmetric key cryptosystem in use today. Given its prevalence, the security provided by AES is of utmost importance. Technology is advancing at an incredible rate, in both capability and popularity, much faster than its rate of advancement in the late 1990s when AES was selected as the replacement standard for DES. Although the literature surrounding AES is robust, most studies fall into either theoretical or practical yet infeasible.
    [Show full text]
  • New Comparative Study Between DES, 3DES and AES Within Nine Factors
    JOURNAL OF COMPUTING, VOLUME 2, ISSUE 3, MARCH 2010, ISSN 2151-9617 152 HTTPS://SITES.GOOGLE.COM/SITE/JOURNALOFCOMPUTING/ New Comparative Study Between DES, 3DES and AES within Nine Factors Hamdan.O.Alanazi, B.B.Zaidan, A.A.Zaidan, Hamid A.Jalab, M.Shabbir and Y. Al-Nabhani ABSTRACT---With the rapid development of various multimedia technologies, more and more multimedia data are generated and transmitted in the medical, also the internet allows for wide distribution of digital media data. It becomes much easier to edit, modify and duplicate digital information .Besides that, digital documents are also easy to copy and distribute, therefore it will be faced by many threats. It is a big security and privacy issue, it become necessary to find appropriate protection because of the significance, accuracy and sensitivity of the information. , which may include some sensitive information which should not be accessed by or can only be partially exposed to the general users. Therefore, security and privacy has become an important. Another problem with digital document and video is that undetectable modifications can be made with very simple and widely available equipment, which put the digital material for evidential purposes under question. Cryptography considers one of the techniques which used to protect the important information. In this paper a three algorithm of multimedia encryption schemes have been proposed in the literature and description. The New Comparative Study between DES, 3DES and AES within Nine Factors achieving an efficiency, flexibility and security, which is a challenge of researchers. Index Terms—Data Encryption Standared, Triple Data Encryption Standared, Advance Encryption Standared.
    [Show full text]
  • The Aes Project Any Lessons For
    THE AES PROJECT: Any Lessons for NC3? THOMAS A. BERSON, ANAGRAM LABORATORIES Technology for Global Security | June 23, 2020 THE AES PROJECT: ANY LESSONS FOR NC3? THOMAS A. BERSON JUNE 23, 2020 I. INTRODUCTION In this report, Tom Berson details how lessons from the Advanced Encryption Standard Competition can aid the development of international NC3 components and even be mirrored in the creation of a CATALINK1 community. Tom Berson is a cryptologist and founder of Anagram Laboratories. Contact: [email protected] This paper was prepared for the Antidotes for Emerging NC3 Technical Vulnerabilities, A Scenarios-Based Workshop held October 21-22, 2019 and convened by The Nautilus Institute for Security and Sustainability, Technology for Global Security, The Stanley Center for Peace and Security, and hosted by The Center for International Security and Cooperation (CISAC) Stanford University. A podcast with Tom Berson and Philip Reiner can be found here. It is published simultaneously here by Technology for Global Security and here by Nautilus Institute and is published under a 4.0 International Creative Commons License the terms of which are found here. Acknowledgments: The workshop was funded by the John D. and Catherine T. MacArthur Foundation. Maureen Jerrett provided copy editing services. Banner image is by Lauren Hostetter of Heyhoss Design II. TECH4GS SPECIAL REPORT BY TOM BERSON THE AES PROJECT: ANY LESSONS FOR NC3? JUNE 23, 2020 1. THE AES PROJECT From 1997 through 2001, the National Institute for Standards and Technology (US) (NIST) ran an open, transparent, international competition to design and select a standard block cipher called the Advanced Encryption Standard (AES)2.
    [Show full text]
  • Data Encryption Standard
    Data Encryption Standard The Data Encryption Standard (DES /ˌdiːˌiːˈɛs, dɛz/) is a Data Encryption Standard symmetric-key algorithm for the encryption of electronic data. Although insecure, it was highly influential in the advancement of modern cryptography. Developed in the early 1970s atIBM and based on an earlier design by Horst Feistel, the algorithm was submitted to the National Bureau of Standards (NBS) following the agency's invitation to propose a candidate for the protection of sensitive, unclassified electronic government data. In 1976, after consultation with theNational Security Agency (NSA), the NBS eventually selected a slightly modified version (strengthened against differential cryptanalysis, but weakened against brute-force attacks), which was published as an official Federal Information Processing Standard (FIPS) for the United States in 1977. The publication of an NSA-approved encryption standard simultaneously resulted in its quick international adoption and widespread academic scrutiny. Controversies arose out of classified The Feistel function (F function) of DES design elements, a relatively short key length of the symmetric-key General block cipher design, and the involvement of the NSA, nourishing Designers IBM suspicions about a backdoor. Today it is known that the S-boxes that had raised those suspicions were in fact designed by the NSA to First 1975 (Federal Register) actually remove a backdoor they secretly knew (differential published (standardized in January 1977) cryptanalysis). However, the NSA also ensured that the key size was Derived Lucifer drastically reduced such that they could break it by brute force from [2] attack. The intense academic scrutiny the algorithm received over Successors Triple DES, G-DES, DES-X, time led to the modern understanding of block ciphers and their LOKI89, ICE cryptanalysis.
    [Show full text]
  • Soft Error Resistant Design of the AES Cipher Using SRAM-Based FPGA
    Soft Error Resistant Design of the AES Cipher Using SRAM-based FPGA by Solmaz Ghaznavi A thesis presented to the University of Waterloo in fulfillment of the thesis requirement for the degree of Doctor of Philosophy in Electrical and Computer Engineering Waterloo, Ontario, Canada, 2011 ©Solmaz Ghaznavi 2011 AUTHOR'S DECLARATION I hereby declare that I am the sole author of this thesis. This is a true copy of the thesis, including any required final revisions, as accepted by my examiners. I understand that my thesis may be made electronically available to the public. ii Abstract This thesis presents a new architecture for the reliable implementation of the symmetric-key algorithm Advanced Encryption Standard (AES) in Field Programmable Gate Arrays (FPGAs). Since FPGAs are prone to soft errors caused by radiation, and AES is highly sensitive to errors, reliable architectures are of significant concern. Energetic particles hitting a device can flip bits in FPGA SRAM cells controlling all aspects of the implementation. Unlike previous research, heterogeneous error detection techniques based on properties of the circuit and functionality are used to provide adequate reliability at the lowest possible cost. The use of dual ported block memory for SubBytes, duplication for the control circuitry, and a new enhanced parity technique for MixColumns is proposed. Previous parity techniques cover single errors in datapath registers, however, soft errors can occur in the control circuitry as well as in SRAM cells forming the combinational logic and routing. In this research, propagation of single errors is investigated in the routed netlist. Weaknesses of the previous parity techniques are identified.
    [Show full text]
  • Cryptographic Algorithm Analysis and Implementation
    EasyChair Preprint № 3210 Cryptographic Algorithm Analysis and Implementation Nandkumar Niture EasyChair preprints are intended for rapid dissemination of research results and are integrated with the rest of EasyChair. April 20, 2020 Cryptographic Algorithm Analysis and Implementation By: - Nandkumar A Niture 1 Abstract The impact and necessity of information security has increased exponentially over the last f ew decades as the denial-of-service attacks are increasing, information is being stolen, hackers are using more sophisticated and smart methods with help of agile tools for stealing sensitive information. Do small/mid-size/large corporate organizations need the security of their system? Yes. They have sensitive user data, employee data, trading data, customer data and other sensitive confidential information stored in office systems. Do common people need the security of their systems at home? Yes. They may have their taxes files, social security card information, bank account details, private pictures, marketing strategy for their small business and many more private things. Computer cryptography was the exclusive domain for long period of time since World War II but now is practiced outside of military agencies. Cryptography is both science and art, it uses known obscurity and mathematical formulae. Cryptographic systems should have ability to assure the authenticity of source from where message gets originated and proof of complete message delivery. It is sometimes insufficient to protect ourselves from the rules and laws, but we need to protect ourselves with applying sufficient mathematical equations. So, it is individuals and legal organizations responsibility to protect their own data. By combining the digital signature with public-key cryptography, we can develop a protocol that combines the security of encryption with the authenticity of digital signatures.
    [Show full text]
  • 1. AES Seems Weak. 2. Linear Time Secure Cryptography
    Smith typeset 19:27 8 Jun 2007 AES bust 1. AES seems weak. 2. Linear time secure cryptography Warren D. Smith∗ [email protected] June 8, 2007 Abstract — We describe a new simple but more power- ciphertext pair. It would run almost instantaneously.) Any ful form of linear cryptanalysis. It appears to break AES secret key cipher with a K-bit key can be cracked by exhaus- (and undoubtably other cryptosystems too, e.g. SKIP- tive key search by performing 2K encryptions. It is a usual JACK). The break is “nonconstructive,” i.e. we make it design aim to try to make the≈ security level attain this 2K plausible (e.g. prove it in certain approximate probabilis- upper bound. tic models) that a small algorithm for quickly determining AES-256 keys from plaintext-ciphertext pairs exists – but without constructing the algorithm. The attack’s runtime is comparable to performing 64w encryptions where w is 1 DES and AES, their demise, and the (unknown) minimum Hamming weight in certain bi- the demise of privacy generally nary linear error-correcting codes (BLECCs) associated with AES-256. If w < 43 then our attack is faster than ex- DES and its successor AES were the product of cryptosystem- haustive key search; probably w < 10. (Also there should design competitions (1974, 2001) sponsored and judged by the be ciphertext-only attacks if the plaintext is natural En- US Government and as such are the two most famous cryp- glish.) tosystems. Even if this break breaks due to the underlying models in- DES’s obvious weakness was its short (56 bit) secret-key adequately approximating the real world, we explain how AES still could contain “trapdoors” which would make length.
    [Show full text]
  • DES Cracker" Machine
    Frequently Asked Questions (FAQ) About the Electronic Frontier Foundation's "DES Cracker" Machine Table of Contents Introduction What are cryptography, encryption and cryptanalysis? What is DES? Who uses DES? What claims have been made about DES? What is the 'EFF DES Cracker' and how does it work? Who built the EFF DES Cracker? Does the EFF DES Cracker really work? How much did the EFF DES Cracker cost to build? Why was the EFF DES Cracker built? What should those who depend on DES do now that we are clear on its insecurity? How long should cipher keys be to avoid these attacks? How long does the EFF DES Cracker take to crack DES? How does this affect cryptographic algorithms other than DES? What standards are replacing DES? How does this relate to the movie "Sneakers?" Is the EFF DES Cracker practical or a laboratory curiosity? What has been the impact of export controls on cryptography? Have other groups studied the implications of controls over the research and application of cryptography? What is the Electronic Frontier Foundation (EFF)? Sources Introduction The Electronic Frontier Foundation began its investigation into DES cracking in 1997 to determine just how easily and cheaply a hardware-based DES Cracker could be constructed. EFF set out to design and build a DES Cracker to counter the claim made by U.S. government officials that American industry or foreign governments cannot decrypt information when protected by DES or weaker encryption, or that it would take multimillion-dollar networks or computers months to decrypt one message. Less than one year later and for well under US $250,000, EFF's DES Cracker entered and won the RSA DES Challenge II-2 competition in less than 3 days, proving that DES is not secure and that such a machine is inexpensive to design and build.
    [Show full text]
  • Cryptanalysis of Selected Block Ciphers
    Downloaded from orbit.dtu.dk on: Sep 24, 2021 Cryptanalysis of Selected Block Ciphers Alkhzaimi, Hoda A. Publication date: 2016 Document Version Publisher's PDF, also known as Version of record Link back to DTU Orbit Citation (APA): Alkhzaimi, H. A. (2016). Cryptanalysis of Selected Block Ciphers. Technical University of Denmark. DTU Compute PHD-2015 No. 360 General rights Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. Users may download and print one copy of any publication from the public portal for the purpose of private study or research. You may not further distribute the material or use it for any profit-making activity or commercial gain You may freely distribute the URL identifying the publication in the public portal If you believe that this document breaches copyright please contact us providing details, and we will remove access to the work immediately and investigate your claim. Cryptanalysis of Selected Block Ciphers Dissertation Submitted in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy at the Department of Mathematics and Computer Science-COMPUTE in The Technical University of Denmark by Hoda A.Alkhzaimi December 2014 To my Sanctuary in life Bladi, Baba Zayed and My family with love Title of Thesis Cryptanalysis of Selected Block Ciphers PhD Project Supervisor Professor Lars R. Knudsen(DTU Compute, Denmark) PhD Student Hoda A.Alkhzaimi Assessment Committee Associate Professor Christian Rechberger (DTU Compute, Denmark) Professor Thomas Johansson (Lund University, Sweden) Professor Bart Preneel (Katholieke Universiteit Leuven, Belgium) Abstract The focus of this dissertation is to present cryptanalytic results on selected block ci- phers.
    [Show full text]
  • CNS Lecture 6
    In the news CNS Lecture 6 • Microsoft IE Active X remote code execution • Microsoft powerpoint remote code execution (0-day) Block ciphers -- AES (Rijndael) • MAX OS X multiple vulnerabilities Stream ciphers • OpenSSL ASN.1 remote buffer overflow Key management • gzip, firefox, Adobe flash player, … review assignment 5 A assignment 6 CNS Lecture 6 - 2 Block cipher modes You are here … Attacks & Defenses Cryptography Applied crypto • ECB, CBC, CFB, OFB, CTR • Risk assessment •Random numbers •SSH • applies to all block ciphers • Viruses • •Hash functions •PGP Padding, chaining and IV’s • Unix security • hide repeated plaintext MD5, SHA,RIPEMD •S/Mime • authentication • different error/attack properties • Network security •Classical + stego •SSL Firewalls,vpn,IPsec,IDS •Number theory •Kerberos •Symmetric key •IPsec encryption does not guarantee message integrity! DES, Rijndael, RC5 •Public key RSA, DSA, D-H,ECC CNS Lecture 6 - 3 CNS Lecture 6 - 4 Padding, IV’s, and key generation in OpenSSL Block ciphers • Encryption will pad to block size of cipher (DES: 8 bytes, AES 16) Feistel substitution and permutation – E.g., 3 bytes in 8 encrypted bytes out, 21 in 24 out – May want to pre-pad with random “salt” to obscure same message • DES •performance (time/space) vs strength • OpenSSL standard API encryption pads with bytes of IV • Lucifer •large keys – EVP methods pads with byte count (PKCS 5) •strong subkey generation and pre-pends 8-byte magic “Salted__” and 8 byte random salt • blowfish •large blocks – openssl des-cbc: 7 bytes in 24 encrypted
    [Show full text]
  • T-79.503 Cryptography and Data Security
    T-79.4501 Cryptography and Data Security Summary 2006 - Life cycle of a cryptographic algorithm - Searches and probabilities - Highlights 1 Building Blocks • one-way functions • one-way permutations • one-way trapdoor permutations • collision resistant compression (hash) functions • pseudo-random functions • (pseudo-) random number generators 2 1 Contemporary cryptographic primitives • Secret key (symmetric) primitives – Block cipher – Stream cipher – Integrity primitives • Message authentication code (MAC) • Hash functions • Public key (asymmetric) primitives – Public key encryption scheme – Digital signature scheme 3 Life Cycle of a Cryptographic Algorithm DEVELOPMENT • Construction • Security proofs and arguments • Evaluation USE • Publication of the algorithm • Implementation • Independent evaluation • Embedding into system • Key management • Independent evaluation END • Break; or • Degradation by time • Implementation attacks • Side channel attacks 4 2 One Time Pad • Claude Shannon laid (1949) the information theoretic fundamentals of secrecy systems. • Shannon’s pessimistic inequality: For perfect secrecy you need as much key as you have plaintext. • In practical ciphers the key is much shorter than the plaintext to be encrypted • Practical ciphers never provide perfect secrecy 5 DES Data Encryption Standard 1977 - 2002 • Standard for 25 years • Finally found to be too small. DES key is only 56 bits, that is, there are about 1016 different keys. By manufacturing one million chips, such that, each chip can test one million keys in a second, then one can find the key in about one minute. • The EFF DES Cracker built in 1998 can search for a key in about 4,5 days. The cost of the machine is $250 000. • The design was a joint effort by NSA and IBM.
    [Show full text]
  • Statistical Cryptanalysis of Block Ciphers
    STATISTICAL CRYPTANALYSIS OF BLOCK CIPHERS THÈSE NO 3179 (2005) PRÉSENTÉE À LA FACULTÉ INFORMATIQUE ET COMMUNICATIONS Institut de systèmes de communication SECTION DES SYSTÈMES DE COMMUNICATION ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE POUR L'OBTENTION DU GRADE DE DOCTEUR ÈS SCIENCES PAR Pascal JUNOD ingénieur informaticien dilpômé EPF de nationalité suisse et originaire de Sainte-Croix (VD) acceptée sur proposition du jury: Prof. S. Vaudenay, directeur de thèse Prof. J. Massey, rapporteur Prof. W. Meier, rapporteur Prof. S. Morgenthaler, rapporteur Prof. J. Stern, rapporteur Lausanne, EPFL 2005 to Mimi and Chlo´e Acknowledgments First of all, I would like to warmly thank my supervisor, Prof. Serge Vaude- nay, for having given to me such a wonderful opportunity to perform research in a friendly environment, and for having been the perfect supervisor that every PhD would dream of. I am also very grateful to the president of the jury, Prof. Emre Telatar, and to the reviewers Prof. em. James L. Massey, Prof. Jacques Stern, Prof. Willi Meier, and Prof. Stephan Morgenthaler for having accepted to be part of the jury and for having invested such a lot of time for reviewing this thesis. I would like to express my gratitude to all my (former and current) col- leagues at LASEC for their support and for their friendship: Gildas Avoine, Thomas Baign`eres, Nenad Buncic, Brice Canvel, Martine Corval, Matthieu Finiasz, Yi Lu, Jean Monnerat, Philippe Oechslin, and John Pliam. With- out them, the EPFL (and the crypto) would not be so fun! Without their support, trust and encouragement, the last part of this thesis, FOX, would certainly not be born: I owe to MediaCrypt AG, espe- cially to Ralf Kastmann and Richard Straub many, many, many hours of interesting work.
    [Show full text]