Rsa_Calc() - VeriFone MX800 series Programmer's Manual

Hide thumbs Also See for MX800 series:
Table of Contents

Advertisement

rsa_calc()

This function performs a public key RSA computation. It supports key lengths from
9 bits up to 2048 bits and exponent values that can be written as (2
instance 2, 3, 65537.
Prototype
int rsa_calc (unsigned char * msg,
unsigned char * mod,
int wds count, int exp,
unsigned char * result);
Parameters
Pointer to the buffer holding the input data
msg
Pointer to the buffer holding the modulus
mod
If count is odd, the first byte (leftmost) cannot be null, if count is
Note:
even the first two bytes (leftmost) cannot be both null. If it's the
case, the function returns an error.
Length of the modulus and input data in bytes. Minimum 3. Max 256.
count
exp
Code for exponent: actual exponent is 2
For instance, set exp to 17 for exponent 65537.
Pointer to the buffer receiving the result on exit.
result
Return Values
0
Successful execution
< 0
Error - Invalid parameter
D
exp
+1), for
exp
+1.
X
M
800 S
P
ERIES
ROGRAMMERS
D
EVICE
RIVERS
rsa_calc()
83
G
UIDE

Advertisement

Table of Contents
loading

Table of Contents