PostgreSQL Source Code
git master
|
Go to the source code of this file.
Functions | |
static mpz_t * | mp_new () |
static void | mp_clear_free (mpz_t *a) |
static int | mp_px_rand (uint32 bits, mpz_t *res) |
static void | mp_modmul (mpz_t *a, mpz_t *b, mpz_t *p, mpz_t *res) |
static mpz_t * | mpi_to_bn (PGP_MPI *n) |
static PGP_MPI * | bn_to_mpi (mpz_t *bn) |
static int | decide_k_bits (int p_bits) |
int | pgp_elgamal_encrypt (PGP_PubKey *pk, PGP_MPI *_m, PGP_MPI **c1_p, PGP_MPI **c2_p) |
int | pgp_elgamal_decrypt (PGP_PubKey *pk, PGP_MPI *_c1, PGP_MPI *_c2, PGP_MPI **msg_p) |
int | pgp_rsa_encrypt (PGP_PubKey *pk, PGP_MPI *_m, PGP_MPI **c_p) |
int | pgp_rsa_decrypt (PGP_PubKey *pk, PGP_MPI *_c, PGP_MPI **m_p) |
Definition at line 121 of file pgp-mpi-internal.c.
References PGP_MPI::bytes, PGP_MPI::data, mp_int_count_bits(), mp_int_to_unsigned(), pgp_mpi_alloc(), pgp_mpi_free(), and px_debug().
Referenced by pgp_elgamal_decrypt(), pgp_elgamal_encrypt(), pgp_rsa_decrypt(), and pgp_rsa_encrypt().
|
static |
Definition at line 159 of file pgp-mpi-internal.c.
Referenced by pgp_elgamal_encrypt().
|
static |
Definition at line 48 of file pgp-mpi-internal.c.
References mp_int_free().
Referenced by mp_modmul(), mpi_to_bn(), pgp_elgamal_decrypt(), pgp_elgamal_encrypt(), pgp_rsa_decrypt(), and pgp_rsa_encrypt().
Definition at line 92 of file pgp-mpi-internal.c.
References mp_clear_free(), mp_int_mod(), mp_int_mul(), and mp_new().
Referenced by pgp_elgamal_decrypt(), and pgp_elgamal_encrypt().
|
static |
Definition at line 39 of file pgp-mpi-internal.c.
References mp_int_alloc(), and mp_int_init_size().
Referenced by mp_modmul(), mpi_to_bn(), pgp_elgamal_decrypt(), pgp_elgamal_encrypt(), pgp_rsa_decrypt(), and pgp_rsa_encrypt().
Definition at line 58 of file pgp-mpi-internal.c.
References buf, mp_int_read_unsigned(), pg_strong_random(), px_alloc, px_free, and PXE_NO_RANDOM.
Referenced by pgp_elgamal_encrypt().
Definition at line 102 of file pgp-mpi-internal.c.
References PGP_MPI::bits, PGP_MPI::bytes, PGP_MPI::data, mp_clear_free(), mp_int_count_bits(), mp_int_read_unsigned(), mp_new(), and px_debug().
Referenced by pgp_elgamal_decrypt(), pgp_elgamal_encrypt(), pgp_rsa_decrypt(), and pgp_rsa_encrypt().
int pgp_elgamal_decrypt | ( | PGP_PubKey * | pk, |
PGP_MPI * | _c1, | ||
PGP_MPI * | _c2, | ||
PGP_MPI ** | msg_p | ||
) |
Definition at line 218 of file pgp-mpi-internal.c.
Referenced by decrypt_elgamal().
int pgp_elgamal_encrypt | ( | PGP_PubKey * | pk, |
PGP_MPI * | _m, | ||
PGP_MPI ** | c1_p, | ||
PGP_MPI ** | c2_p | ||
) |
Definition at line 168 of file pgp-mpi-internal.c.
Referenced by encrypt_and_write_elgamal().
int pgp_rsa_decrypt | ( | PGP_PubKey * | pk, |
PGP_MPI * | _c, | ||
PGP_MPI ** | m_p | ||
) |
Definition at line 284 of file pgp-mpi-internal.c.
Referenced by decrypt_rsa().
int pgp_rsa_encrypt | ( | PGP_PubKey * | pk, |
PGP_MPI * | _m, | ||
PGP_MPI ** | c_p | ||
) |
Definition at line 256 of file pgp-mpi-internal.c.
Referenced by encrypt_and_write_rsa().