EasyManua.ls Logo

VeriFone MX800 Series - Rsa_Calc()

VeriFone MX800 Series
344 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
DEVICE DRIVERS
rsa_calc()
M
X
800 SERIES PROGRAMMERS GUIDE 83
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
exp
+1), for
instance 2, 3, 65537.
Prototype
int rsa_calc (unsigned char * msg,
unsigned char * mod,
int wds count, int exp,
unsigned char * result);
Parameters
Return Values
msg Pointer to the buffer holding the input data
mod Pointer to the buffer holding the modulus
Note: If count is odd, the first byte (leftmost) cannot be null, if count is
even the first two bytes (leftmost) cannot be both null. If it’s the
case, the function returns an error.
count Length of the modulus and input data in bytes. Minimum 3. Max 256.
exp
Code for exponent: actual exponent is 2
exp
+1.
For instance, set exp to 17 for exponent 65537.
result Pointer to the buffer receiving the result on exit.
0 Successful execution
< 0 Error - Invalid parameter

Table of Contents

Other manuals for VeriFone MX800 Series

Related product manuals