A deep dive into discrete logarithms in the context of Linear Feedback Shift Registers (LFSRs), focusing on the 'easy' case where the group order is a smooth number with small prime factors. Explains how LFSRs can serve as fast hardware counters and how to recover the count value using the Silver-Pohlig-Hellman algorithm combined with the Chinese Remainder Theorem. Includes Python code examples using GF(2) arithmetic, demonstrating factoring group orders, computing subgroup discrete logs, and combining results via CRT to recover the original exponent.

14m read timeFrom embeddedrelated.com
Post cover image
Table of contents
What is a Discrete Logarithm, Anyway?Intentionally-easy Discrete LogsSilver-Pohlig-Hellman to the RescueThe Chinese Remainder TheoremWrapupReferences: