LIBNETPGPRSA(3)

NAME
libnetpgprsa - BIGNUM library of multi-precision integers

LIBRARY
libnetpgprsa

SYNOPSIS
#include <netpgp/rsa.h>
RSA *
RSA_new(void);
int
RSA_size(const RSA *rsa);
void
RSA_free(RSA *rsa);
int
RSA_check_key(RSA *rsa);
RSA *
RSA_generate_key(int num, unsigned long e, void (*callback)(int, int, void *), void *callbackarg);
int
RSA_public_encrypt(int siglen, const uint8_t *signature, uint8_t *to, RSA *rsa, int padding);
int
RSA_private_encrypt(int siglen, const uint8_t *signature, uint8_t *to, RSA *rsa, int padding);
int
RSA_private_decrypt(int siglen, const uint8_t *signature, uint8_t *to, RSA *rsa, int padding);

DSA *
DSA_new(void);
int
DSA_size(const DSA *dsa);
void
DSA_free(DSA *dsa);
DSA_SIG *
DSA_SIG_new(void);
void
DSA_SIG_free(DSA_SIG *sig);
int
DSA_do_verify(const unsigned char *digest, int digestlen, DSA_SIG *sig, DSA *dsa);
int
DSA_do_sign(const unsigned char *digest, int digestlen, DSA *dsa);

DESCRIPTION
libnetpgprsa is a small library which provides RSA signing, encryption and decryption, and DSA signing. RSA and DSA verification are provided by the libnetpgpverify(3) library.

SEE ALSO
libnetpgpbn(3), libnetpgpverify(3)

HISTORY
The libnetpgprsa library first appeared in NetBSD 7.0.

AUTHORS
Alistair Crooks <agc@NetBSD.org>