18 lines
245 B
Plaintext
18 lines
245 B
Plaintext
|
All numbers (a) are stored aR mod N (except abRR)
|
||
|
|
||
|
RR = REDC(R*R) /* RR mod N */
|
||
|
|
||
|
|
||
|
convert a -> aR
|
||
|
convert b -> bR
|
||
|
|
||
|
{
|
||
|
abRR = aR * bR
|
||
|
abR = REDC(abRR); /* mod N */
|
||
|
}
|
||
|
|
||
|
ab = REDC(abR); /* mod N */
|
||
|
|
||
|
|
||
|
REDC strips off a multiplicaion by R mod N
|