12. Inv_fun_ctest_gfp
12.1. Function description:
This demo shows the operation of modular inversion in GF(p).
Allocate enough memory space of SRAM used by internal logic during computation.
Filling data to address of operand x, y for modular inversion, then configure & start modular inversion operation.
Waiting process done to compare the result with the golden data to check.
12.2. Main Configuration:
12.2.1. INV operation:
Operation code |
Option |
Field |
Operand x length |
Operand y length |
OP_INV |
ordinary |
GF(p) |
6 words |
6 words |
Note
Operation code is OP_INV, the operand x is Gx, operand y is Gy, a = Gx^-1 mod Gy and b = Gy^-1 mod Gx.
12.3. Test result:
If the result is same as the standard data, then print pass, if not print fail.
12.4. IO connection:
None