blob: 5b10c6ea90061f8dddbf4e1f33905e02ff5687f8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
/* See LICENSE file for copyright and license details. */
#include "internals"
void
zmodmul(z_t a, z_t b, z_t c)
{
/* TODO Montgomery modular multiplication */
if (a == d) {
zset(libzahl_tmp_modmul, d);
zmul(a, b, c);
zmod(a, a, libzahl_tmp_modmul);
} else {
zmul(a, b, c);
zmod(a, a, d);
}
}
|