Diffie-Hellman/Math: introduced the proposed changes by Alexander Kurpiers

addmod and submod are moved to the end of the math descriptor, in order
to be able to run existing software against a new version of ltc without need
to rebuild the software.
This commit is contained in:
Steffen Jaeckel
2011-01-18 21:16:11 +01:00
parent 6fecec107d
commit edf11c62c0
4 changed files with 30 additions and 27 deletions
+3 -3
View File
@@ -449,8 +449,6 @@ const ltc_math_descriptor gmp_desc = {
&gcd,
&lcm,
&addmod,
&submod,
&mulmod,
&sqrmod,
&invmod,
@@ -489,8 +487,10 @@ const ltc_math_descriptor gmp_desc = {
&rsa_make_key,
&rsa_exptmod,
#else
NULL, NULL
NULL, NULL,
#endif
&addmod,
&submod,
};
+4 -3
View File
@@ -451,8 +451,6 @@ const ltc_math_descriptor ltm_desc = {
&gcd,
&lcm,
&addmod,
&submod,
&mulmod,
&sqrmod,
&invmod,
@@ -491,8 +489,11 @@ const ltc_math_descriptor ltm_desc = {
&rsa_make_key,
&rsa_exptmod,
#else
NULL, NULL
NULL, NULL,
#endif
&addmod,
&submod,
};
+3 -3
View File
@@ -739,8 +739,6 @@ const ltc_math_descriptor tfm_desc = {
&gcd,
&lcm,
&addmod,
&submod,
&mulmod,
&sqrmod,
&invmod,
@@ -784,8 +782,10 @@ const ltc_math_descriptor tfm_desc = {
&rsa_make_key,
&rsa_exptmod,
#else
NULL, NULL
NULL, NULL,
#endif
&addmod,
&submod,
};