|
Polly 22.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.
Classes | |
| struct | rsa_key |
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 | rsa_key_init (rsa_key *kp) |
| void | rsa_key_clear (rsa_key *kp) |
| void | rsa_key_write (rsa_key *kp, FILE *ofp) |
| int | main (int argc, char *argv[]) |
Definition at line 246 of file rsakey.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 main().
| int main | ( | int | argc, |
| char * | argv[] ) |
Definition at line 72 of file rsakey.c.
References rsa_key::d, rsa_key::e, find_prime(), mp_error_string, mp_int_add_value, mp_int_invmod, mp_int_mul, mp_int_randomize(), mp_int_read_string, mp_int_sub, MP_OK, rsa_key::n, rsa_key::p, rsa_key::q, res, rsa_key_clear(), rsa_key_init(), and rsa_key_write().
Definition at line 213 of file rsakey.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 201 of file rsakey.c.
Referenced by mp_int_randomize().
| void rsa_key_clear | ( | rsa_key * | kp | ) |
Definition at line 276 of file rsakey.c.
References rsa_key::d, rsa_key::e, mp_int_clear, rsa_key::n, rsa_key::p, and rsa_key::q.
Referenced by main().
Definition at line 266 of file rsakey.c.
References rsa_key::d, rsa_key::e, mp_int_init, MP_OK, rsa_key::n, rsa_key::p, and rsa_key::q.
Referenced by main().
| void rsa_key_write | ( | rsa_key * | kp, |
| FILE * | ofp ) |
Definition at line 284 of file rsakey.c.
References rsa_key::d, rsa_key::e, mp_int_string_len, mp_int_to_string, rsa_key::n, rsa_key::p, and rsa_key::q.
Referenced by main().