mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
Remove unused function monty_copy.
I wrote it for the sake of a test-system design I had in mind at the time, but that design changed after I committed, and now I think _even_ my upcoming test application won't need to copy MontyContexts. So I'll remove the function now, so as not to have to pointlessly write tests for it :-)
This commit is contained in:
parent
84f98c5bf9
commit
ffa8dcc13a
15
mpint.c
15
mpint.c
@ -1257,21 +1257,6 @@ MontyContext *monty_new(mp_int *modulus)
|
||||
return mc;
|
||||
}
|
||||
|
||||
MontyContext *monty_copy(MontyContext *orig)
|
||||
{
|
||||
MontyContext *mc = snew(MontyContext);
|
||||
|
||||
mc->rw = orig->rw;
|
||||
mc->pw = orig->pw;
|
||||
mc->rbits = orig->rbits;
|
||||
mc->m = mp_copy(orig->m);
|
||||
mc->minus_minv_mod_r = mp_copy(orig->minus_minv_mod_r);
|
||||
for (size_t j = 0; j < 3; j++)
|
||||
mc->powers_of_r_mod_m[j] = mp_copy(orig->powers_of_r_mod_m[j]);
|
||||
mc->scratch = mp_make_sized(monty_scratch_size(mc));
|
||||
return mc;
|
||||
}
|
||||
|
||||
void monty_free(MontyContext *mc)
|
||||
{
|
||||
mp_free(mc->m);
|
||||
|
1
mpint.h
1
mpint.h
@ -313,7 +313,6 @@ mp_int *mp_modsqrt(ModsqrtContext *sc, mp_int *x, unsigned *success);
|
||||
* pointers are still owned by the MontyContext, so don't free them!
|
||||
*/
|
||||
MontyContext *monty_new(mp_int *modulus);
|
||||
MontyContext *monty_copy(MontyContext *mc);
|
||||
void monty_free(MontyContext *mc);
|
||||
mp_int *monty_modulus(MontyContext *mc); /* doesn't transfer ownership */
|
||||
mp_int *monty_identity(MontyContext *mc); /* doesn't transfer ownership */
|
||||
|
Loading…
Reference in New Issue
Block a user