webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Macros | Functions
prime.c File Reference
#include <openssl/bn.h>
#include <openssl/err.h>
#include <openssl/mem.h>
#include "internal.h"

Macros

#define BN_prime_checks_for_size(b)
 
#define NUMPRIMES   2048
 

Functions

void BN_GENCB_set (BN_GENCB *callback, int(*f)(int event, int n, struct bn_gencb_st *), void *arg)
 
int BN_GENCB_call (BN_GENCB *callback, int event, int n)
 
int BN_generate_prime_ex (BIGNUM *ret, int bits, int safe, const BIGNUM *add, const BIGNUM *rem, BN_GENCB *cb)
 
int BN_primality_test (int *is_probably_prime, const BIGNUM *candidate, int checks, BN_CTX *ctx, int do_trial_division, BN_GENCB *cb)
 
int BN_is_prime_ex (const BIGNUM *candidate, int checks, BN_CTX *ctx, BN_GENCB *cb)
 
int BN_is_prime_fasttest_ex (const BIGNUM *a, int checks, BN_CTX *ctx_passed, int do_trial_division, BN_GENCB *cb)
 

Macro Definition Documentation

◆ BN_prime_checks_for_size

#define BN_prime_checks_for_size (   b)
Value:
((b) >= 1300 ? 2 : \
(b) >= 850 ? 3 : \
(b) >= 650 ? 4 : \
(b) >= 550 ? 5 : \
(b) >= 450 ? 6 : \
(b) >= 400 ? 7 : \
(b) >= 350 ? 8 : \
(b) >= 300 ? 9 : \
(b) >= 250 ? 12 : \
(b) >= 200 ? 15 : \
(b) >= 150 ? 18 : \
/* b >= 100 */ 27)
GLboolean GLboolean GLboolean b
Definition: gl2ext.h:306

◆ NUMPRIMES

#define NUMPRIMES   2048

Function Documentation

◆ BN_GENCB_call()

int BN_GENCB_call ( BN_GENCB callback,
int  event,
int  n 
)

◆ BN_GENCB_set()

void BN_GENCB_set ( BN_GENCB callback,
int(*)(int event, int n, struct bn_gencb_st *)  f,
void arg 
)

◆ BN_generate_prime_ex()

int BN_generate_prime_ex ( BIGNUM ret,
int  bits,
int  safe,
const BIGNUM add,
const BIGNUM rem,
BN_GENCB cb 
)

◆ BN_is_prime_ex()

int BN_is_prime_ex ( const BIGNUM candidate,
int  checks,
BN_CTX ctx,
BN_GENCB cb 
)

◆ BN_is_prime_fasttest_ex()

int BN_is_prime_fasttest_ex ( const BIGNUM a,
int  checks,
BN_CTX ctx_passed,
int  do_trial_division,
BN_GENCB cb 
)

◆ BN_primality_test()

int BN_primality_test ( int *  is_probably_prime,
const BIGNUM candidate,
int  checks,
BN_CTX ctx,
int  do_trial_division,
BN_GENCB cb 
)