|
You are here |
fredrikj.net | ||
| | | | |
blag.nullteilerfrei.de
|
|
| | | | | ||
| | | | |
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). | |
| | | | |
jaykmody.com
|
|
| | | | | Efficiently computing distances matrixes in NumPy. | |
| | | | |
kndrck.co
|
|
| | | Motivation In my quest to understand zero knowledge proofs from the ground up, I've decided to go back to the basics, and really understand how everyday cryptography tools work, not just how to use them. In this post, I'll attempt to explain how and why the diffie hellman key exchange protocol works, along with proofs and a working example. The examples are purely for educational purposes only! Introduction The Diffie-Hellman key exchange protocol is an algorithm that allows two parties to generate a uni... | ||