Polly 20.0.0git
|
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
#include <unistd.h>
#include "imath.h"
#include "iprime.h"
Go to the source code of this file.
Typedefs | |
typedef mp_result(* | find_f) (mp_int, FILE *) |
Functions | |
int | randomize (unsigned char *buf, size_t len) |
mp_result | mp_int_randomize (mp_int a, mp_size n_bits) |
mp_result | find_prime (mp_int seed, FILE *fb) |
mp_result | find_strong_prime (mp_int seed, FILE *fb) |
int | main (int argc, char *argv[]) |
Definition at line 59 of file randprime.c.
Definition at line 184 of file randprime.c.
References count(), MP_FALSE, mp_int_add_value, mp_int_is_even(), mp_int_is_prime(), MP_OK, MP_TRUE, and res.
Referenced by find_strong_prime(), and main().
Definition at line 210 of file randprime.c.
References find_prime(), MP_FALSE, mp_int_add_value, mp_int_clear, mp_int_copy, mp_int_init, mp_int_is_prime(), mp_int_mul_pow2, MP_OK, MP_TRUE, res, and t.
Referenced by main().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 61 of file randprime.c.
References find_prime(), find_strong_prime(), mp_error_string, mp_int_clear, mp_int_init, mp_int_randomize(), mp_int_string_len, mp_int_to_string, MP_OK, res, and tag().
Definition at line 151 of file randprime.c.
References a(), mp_int_read_unsigned, MP_MEMORY, MP_OK, MP_TRUNC, randomize(), and res.
Referenced by main().
int randomize | ( | unsigned char * | buf, |
size_t | len | ||
) |
Definition at line 139 of file randprime.c.
Referenced by mp_int_randomize().