SemiDrive SSDK Appication Program Interface PTG3.0
pke_prime.h File Reference
#include "stdint.h"

Go to the source code of this file.

Detailed Description

Macro Definition Documentation

◆ BIGINT_DIV_CHOICE

#define BIGINT_DIV_CHOICE   (2)

◆ FERMAT_ROUND

#define FERMAT_ROUND   (3)

◆ MAYBE_PRIME

#define MAYBE_PRIME   (0)

◆ NOT_PRIME

#define NOT_PRIME   (0xFFFFFFFF)

◆ PRIMALITY_TEST_CHOICE

#define PRIMALITY_TEST_CHOICE   (1)

◆ PTL_1024

#define PTL_1024    (400) /* the best PTL value for prime bit length 1024 (RSA2048) */

◆ PTL_512

#define PTL_512    (400) /* the best PTL value for prime bit length 512 (RSA1024) */

◆ PTL_MAX

#define PTL_MAX   (400) /* the max PTL value */

Typedef Documentation

◆ double_uint32_t

typedef uint32_t double_uint32_t

Function Documentation

◆ bigint_div_table_high()

uint32_t bigint_div_table_high ( uint32_t *  a,
uint32_t  awordlen,
uint16_t *  r,
double_uint32_t s,
uint16_t *  high_result,
uint32_t  PTL 
)

◆ bigint_div_table_low()

uint32_t bigint_div_table_low ( uint32_t *  a,
uint16_t *  r,
double_uint32_t s,
uint16_t *  high_result,
uint32_t  PTL 
)

◆ get_prime()

uint32_t get_prime ( uint32_t  p[],
uint32_t  pbitlen 
)

Variable Documentation

◆ primetable

const uint16_t primetable[PTL_MAX]
extern

◆ primetable_r

const uint16_t primetable_r[PTL_MAX]
extern

◆ primetable_s

const double_uint32_t primetable_s[PTL_MAX]
extern