@CHIP-RTOS C Library - TCP/IP API
Crypt_BN_Mod_Mul
Big number modulo multiply. int far Crypt_BN_Mod_Mul ( Crypt_BigNumS far *result,
const Crypt_BigNumConstS far *a,
const Crypt_BigNumConstS far *b,
const Crypt_BigNumConstS far *m) ; Parameters
result
[out] On success the modulo product
of a and b will be reported here.
This location may reference one of the other inputs, which would
then be overwritten. ( Note that pointers to
Crypt_BigNumConstS
type can be safely cast to pointers to
Crypt_BigNumS
type. ) The caller must provide
m->bnDigitCnt digits of space in the buffer referenced by
result->bnDataPtr.
a
- Input Parameter: Pointer to big number
for first factor of product.
b
- Input Parameter: Pointer to the big number
for second factor of product.
m
- Input Parameter: Pointer to the big number
modulo value.
Return Value
- error code:
0 - Success (no error).
1 - Memory allocation failed.
3 - Invalid big number size.
5 - No solution found (e.g. divisor was zero).
Comments
- This API performs the modulo multiplication operation.
The value computed is:
result = a * b (mod m) ;
The big numbers must not exceed 512 bytes size or an error will result.
This function requires a 42 kByte workspace allocated from the system memory.
The function will execute significantly faster if this workspace memory
is available in the system's
fast memory area.
See Also
RTOS API
- On the first call, this library function invokes a software
interrupt
which modifies the code at the calling site inside your application
program. A direct FAR JMP into the @CHIP-RTOS-x86
implementation for this function is installed so that on
return and on any subsequent calls to this API this
dynamic link reaches the function's
implementation directly.
Supported since or modified in @CHIP-RTOS version-
| SC12 | SC13 | SC11 | SC1x3 | SC2x |
-
| n/a | n/a | n/a | V1.35 | V1.35 |
Supported by @CHIP-RTOS C Library since version
This API List
List of C Libraries
@CHIP-RTOS Main Index
End of document
|