mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
072d3c665a
I'm about to want to solve quartics mod a prime, which means I'll need to be able to take cube roots mod p as well as square roots. This commit introduces a more general class which can take rth roots for any prime r, and moreover, it can do it in a general cyclic group. (You have to tell it the group's order and give it some primitives for doing arithmetic, plus a way of iterating over the group elements that it can use to look for a non-rth-power and roots of unity.) That system makes it nicely easy to test, because you can give it a cyclic group represented as the integers under _addition_, and then you obviously know what all the right answers are. So I've also added a unit test system checking that. |
||
---|---|---|
.. | ||
sclog | ||
agenttest.py | ||
agenttestdata.py | ||
agenttestgen.py | ||
colours.txt | ||
cryptsuite.py | ||
desref.py | ||
display.txt | ||
eccref.py | ||
lattrs.txt | ||
numbertheory.py | ||
scocols.txt | ||
ssh.py | ||
testcrypt.py | ||
utf8.txt | ||
vt100.txt |