You are here |
fredrikj.net | ||
| | | |
cp4space.hatsya.com
|
|
| | | | A couple of years ago I described a primep which possesses various properties that renders it useful for computing number-theoretic transforms over the field $latex \mathbb{F}_p$. Specifically, we have: $latex p = \Phi_{192}(2) = \Phi_6(2^{32}) = 2^{64} - 2^{32} + 1$ where the first of these equalities uses the identity that: $latex \Phi_{k}(x) = \Phi_{rad(k)}(x^{k/rad(k)})$... | |
| | | |
www.jeremykun.com
|
|
| | | | Problem: Compute the product of two polynomials efficiently. Solution: import numpy from numpy.fft import fft, ifft def poly_mul(p1, p2): """Multiply two polynomials. p1 and p2 are arrays of coefficients in degree-increasing order. """ deg1 = p1.shape[0] - 1 deg2 = p1.shape[0] - 1 # Would be 2*(deg1 + deg2) + 1, but the next-power-of-2 handles the +1 total_num_pts = 2 * (deg1 + deg2) next_power_of_2 = 1 << (total_num_pts - 1). | |
| | | |
imapenguin.com
|
|
| | | | What is an LFSR? An LFSR is a Linear Feedback Shift Register. It's a simple way of generating a sequence of numbers that look random. Used in cryptography and in generating pseudo-random numbers, they are interesting because they are so simple. Shift bits and feed a few of them back into the sequence. That's it. Important note: LFSRs are not cryptographically secure on their own. ESPECIALLY 8-bit LFSRs. More on that in the next post on this topic. | |
| | | |
77wolfhowls.wordpress.com
|
|
| | The lone wolf stands atop the cliff, cranes back her head and unleashes her nocturnal ululation to the full moon. |