From the course: Symmetric Cryptography Essential Training
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Challenge: Software-based LFSR
From the course: Symmetric Cryptography Essential Training
Challenge: Software-based LFSR
(upbeat music plays) - [Instructor] This is the chapter three challenge. In this challenge, I'd like you to do something that we wouldn't normally do, and that's implement an LFSR in software. LFSRs are incredibly fast in hardware, so what we're doing here is useful really only to demonstrate the process rather than being usable for any real application. I'm providing an initial state in the code. It's this. And new bits are an XOR of bits 10, 12, 13, and 15. And you should iterate this process 35 times. This is the skeleton code I'm providing. It should be pretty self-explanatory, but let's go through it anyways. I have an array of 16 integers, but we're only storing the values one and zero in them for this exercise. Sure, we could pack these into a single integer and do bitwise operations, but we're going to keep it simple here. So iterate through this LFSR 35 times, and print the output of those iterations to the screen. Like I said before, the bits that come into the register…
Contents
-
-
-
-
-
Simple substitution ciphers4m 48s
-
(Locked)
Polyalphabetic substitution ciphers6m 28s
-
(Locked)
Permutation and transposition ciphers2m 50s
-
(Locked)
Simple one-time pads with XOR3m 6s
-
(Locked)
S-boxes and P-boxes1m 49s
-
(Locked)
Feistel networks2m 30s
-
(Locked)
Linear-feedback shift registers (LFSRs)2m 42s
-
(Locked)
Challenge: Software-based LFSR1m 15s
-
(Locked)
Solution: Software-based LFSR56s
-
-
-
-
-