int cnvenc2(FILE *, FILE *, unsigned char *);
int cnvdec2(FILE *, FILE *, unsigned char *);
int pkeenc2(FILE *, unsigned long long, unsigned char *, int);
int pkedec2(FILE *, unsigned char *);
int sigmak2(FILE *, FILE *, unsigned char *, unsigned long long, int, int);
int sigchk2(FILE *, FILE *, int);

int dearmor(FILE *, FILE *);
int armor(FILE *, FILE *, char *, char *);
int getlit(FILE *, FILE *);
int enlit(FILE *, FILE *, unsigned char *, int);
void delit(FILE * inpf);
int pgpcomp(FILE *, FILE *, int);

/* assumes RSAKEY, which is true for pgp2 compatibility */
#include <rsa.h>
#include <bn.h>

int getkey2(RSA **, char *, unsigned char *, unsigned long long *);

FILE *setkeyring(char *);
void setkeyring_fp(FILE *);

void rsatopgp(FILE * sec, FILE * pub, unsigned char *hp, char *uid, RSA *);

int skip2ctb(FILE *, unsigned char, unsigned char);
BIGNUM *pgp2BN(unsigned char **buf, int decrypt);
