1 / 18

Experiment 2 Problem 1 Grain-128 stream cipher

Experiment 2 Problem 1 Grain-128 stream cipher. Cipher. Message / Ciphertext. m bits. Cryptographic Key. Encrypt/Decrypt. k bits. 1 bit. m bits. Ciphertext / Message. Secret-Key Ciphers. key of Alice and Bob - K AB. key of Alice and Bob - K AB. Network. Decryption.

daisy
Download Presentation

Experiment 2 Problem 1 Grain-128 stream cipher

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. Experiment 2 Problem 1 Grain-128 stream cipher

  2. Cipher Message / Ciphertext m bits Cryptographic Key Encrypt/Decrypt k bits 1 bit m bits Ciphertext / Message

  3. Secret-Key Ciphers key of Alice and Bob - KAB key of Alice and Bob - KAB Network Decryption Encryption Bob Alice

  4. Block vs. stream ciphers M1, M2, …, Mn m1, m2, …, mn memory Block cipher K K Stream cipher C1, C2, …, Cn c1, c2, …, cn Ci=fK(Mi) ci = fK(mi, mi-1, …, m2, m1) Every block of ciphertext is a function of only one corresponding blockof plaintext Every block of ciphertext is a function of the current and all proceeding blocks of plaintext

  5. Typical stream cipher Sender Receiver Initialization Vector - IV Initialization Vector - IV Key - K Key - K Pseudorandom Key Generator Pseudorandom Key Generator keystream ki keystream ki mi ci ci mi plaintext ciphertext ciphertext plaintext

  6. Example ci = mi ki message mi ki ci 01110110101001010110101 11011101110110101110110 10101011011111111000011 keystream ciphertext mi = ci ki ci ki mi ciphertext 10101011011111111000011 11011101110110101110110 01110110101001010110101 keystream message

  7. Grain-128: Keystream Generator zi keystream

  8. Example of a simpler 5-stage LFSR LFSR = Linear Feedback Shift Register si si+1 si+2 si+3 si+4 si+5 si+5 = si + si+1 + si+3 + is used to denote XOR

  9. LFSR in Grain-128 si+7 si+96 si+38 si+70 si+81 . . . . si si+1 si+2 si+126 si+127 si+128 + is used to denote XOR

  10. Example of a simpler 5-stage NFSR NFSR = Non-Linear Feedback Shift Register bi bi+1 bi+2 bi+3 bi+4 bi+5 bi+5 = bibi+1 + bi+3 + is used to denote XOR bmbn is used to denote bm AND bn

  11. NFSR in Grain-128 bi+26 bi+68 bi+84 . . . . bi+56 bi+91 si . . . . bi bi+1 bi+2 bi+126 bi+127 bi+128 + is used to denote XOR bmbn is used to denote bm AND bn

  12. Output function in Grain-128

  13. Grain-128: Keystream Generator zi keystream

  14. Key and IV Initialization Phase 1 Initial state of NFSR: bi = ki for i=0..127, where ki are bits of the key, k Initial state of LFSR: si = IVi for i=0..95, where IVi are bits of the si = ‘1’ for i=96..127 initialization vector, IV Phase 2 256 clock cycles of key mixing using connections shown in the next slide (output fed back and xor’ed with inputs to LFSR and NFSR)

  15. Grain-128: Connections in the circuit during Key & IV Initialization, Phase 2

  16. Grain-128: Keystream Generation Optimization for 2 bits per clock cycle

  17. Example Programmable LFSR-based Pseudorandom Number Generator

  18. cL-1 cL-2 c1 c0 sin Current_state

More Related