1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00
putty-source/test
Simon Tatham 072d3c665a numbertheory.py: generalise SqrtModP to do other roots.
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.
2020-02-28 20:40:08 +00:00
..
sclog Formatting change to braces around one case of a switch. 2020-02-16 11:26:21 +00:00
agenttest.py New test script 'agenttest.py' for testing Pageant. 2020-01-09 19:57:35 +00:00
agenttestdata.py New test script 'agenttest.py' for testing Pageant. 2020-01-09 19:57:35 +00:00
agenttestgen.py New test script 'agenttest.py' for testing Pageant. 2020-01-09 19:57:35 +00:00
colours.txt Rename the 'testdata' subdirectory to 'test'. 2019-01-03 16:56:02 +00:00
cryptsuite.py New query function ecc_montgomery_is_identity. 2020-02-28 20:40:08 +00:00
desref.py Whitespace rationalisation of entire code base. 2019-09-08 20:29:21 +01:00
display.txt Rename the 'testdata' subdirectory to 'test'. 2019-01-03 16:56:02 +00:00
eccref.py numbertheory.py: generalise SqrtModP to do other roots. 2020-02-28 20:40:08 +00:00
lattrs.txt Rename the 'testdata' subdirectory to 'test'. 2019-01-03 16:56:02 +00:00
numbertheory.py numbertheory.py: generalise SqrtModP to do other roots. 2020-02-28 20:40:08 +00:00
scocols.txt Rename the 'testdata' subdirectory to 'test'. 2019-01-03 16:56:02 +00:00
ssh.py New test script 'agenttest.py' for testing Pageant. 2020-01-09 19:57:35 +00:00
testcrypt.py cmdgen: add a --dump option. 2020-02-22 18:42:13 +00:00
utf8.txt Rename the 'testdata' subdirectory to 'test'. 2019-01-03 16:56:02 +00:00
vt100.txt Rename the 'testdata' subdirectory to 'test'. 2019-01-03 16:56:02 +00:00