BIGUTILS(3BM)

NAME

SYNOPSIS
#include <libcrypt.h>
Stdio-based functions:

long fgetLength P((FILE *stream);

void fputLength P((long length, register FILE *stream);

int fgetBoolean P((FILE *stream, int form);

void fputBoolean P((int value, register FILE *stream, int form);

long fgetInteger P((FILE *stream, int form);

void fputInteger P((long value, register FILE *stream, int form);

long fgetString P((unsigned char *string, int limi,
			   register FILE *stream, int form));

void fputString P((unsigned char *cp, long lengt,
			   register FILE *stream, int form, int stringtype));

unsigned char *fgetBitString P((unsigned char *bstring, int limi,
					register FILE *stream, int form));

void fputBitString P((unsigned char *bstring, int blengt,
			      register FILE *stream,int form));

int featDataUnit P((FILE *stream, int form, register tag);

void fgetEOC P((FILE *stream, int form);

void fputEOC P((FILE *stream);

void fputBigInt P((BigInt big, FILE *stream);

BigInt fgetBigInt P((FILE *stream);

void fputTable P((Table *table, FILE *stream);

Table * fgetTable P((FILE *stream);

void fputRSAPublicKey P((RSAPublicKey *key, FILE *stream);

RSAPublicKey * fgetRSAPublicKey P((FILE *stream);

void fputRSAPrivateKey P((RSAPrivateKey *key, FILE *stream);

RSAPrivateKey * fgetRSAPrivateKey P((FILE *stream);

void fputRSASignature P((RSASignature *sig, FILE *stream);

RSASignature * fgetRSASignature P((FILE *stream);

RSAPublicKey * nfgetRSAPublicKey P((char *);

RSAPrivateKey * nfgetRSAPrivateKey P((char *);

void fputEGParams P((EGParams *params, FILE *stream);

EGParams * fgetEGParams P((FILE *stream);

void fputEGPublicKey P((EGPublicKey *key, FILE *stream);

EGPublicKey * fgetEGPublicKey P((FILE *stream);

void fputEGPrivateKey P((EGPrivateKey *key, FILE *stream);

EGPrivateKey * fgetEGPrivateKey P((FILE *stream);

void fputEGSignature P((EGSignature *sig, FILE *stream);

EGSignature * fgetEGSignature P((FILE *stream);

void fputDSASignature P((DSASignature *sig, FILE *stream);

DSASignature * fgetDSASignature P((FILE *stream);

Buffer-based functions:

long bufGetLength P((unsigned char **buffer);

void bufPutLength P((long length, register unsigned char **buffer);

int bufGetBoolean P((unsigned char **buffer, int form);

void bufPutBoolean P((int value, register unsigned char **buffer, int form);

long bufGetInteger P((unsigned char **buffer, int form);

void bufPutInteger P((long value, register unsigned char **buffer, int form);

long bufGetString P((unsigned char *string, int limit,
			   register unsigned char **buffer, int form));

void bufPutString P((unsigned char *cp, long length,
			   register unsigned char **buffer, int form, int stringtype));

unsigned char *bufGetBitString P((unsigned char *bstring, int limit,
					register unsigned char **buffer, int form));

void bufPutBitString P((unsigned char *bstring, int blength,
			      register unsigned char **buffer,int form));

int bufEatDataUnit P((unsigned char **buffer, int form, register tag);

void bufGetEOC P((unsigned char **buffer, int form);

void bufPutEOC P((unsigned char **buffer);

void bufPutBigInt P((BigInt big, unsigned char **buffer);

BigInt bufGetBigInt P((unsigned char **buffer);

void bufPutTable P((Table *table, unsigned char **buffer);

Table * bufGetTable P((unsigned char **buffer);

void bufPutRSAPublicKey P((RSAPublicKey *key, unsigned char **buffer);

RSAPublicKey * bufGetRSAPublicKey P((unsigned char **buffer);

void bufPutRSAPrivateKey P((RSAPrivateKey *key, unsigned char **buffer);

RSAPrivateKey * bufGetRSAPrivateKey P((unsigned char **buffer);

void bufPutRSASignature P((RSASignature *sig, unsigned char **buffer);

RSASignature * bufGetRSASignature P((unsigned char **buffer);

void bufPutEGParams P((EGParams *params, unsigned char **buffer);

EGParams * bufGetEGParams P((unsigned char **buffer);

void bufPutEGPublicKey P((EGPublicKey *key, unsigned char **buffer);

EGPublicKey * bufGetEGPublicKey P((unsigned char **buffer);

void bufPutEGPrivateKey P((EGPrivateKey *key, unsigned char **buffer);

EGPrivateKey * bufGetEGPrivateKey P((unsigned char **buffer);

void bufPutEGSignature P((EGSignature *sig, unsigned char **buffer);

EGSignature * bufGetEGSignature P((unsigned char **buffer);

void bufPutDSASignature P((DSASignature *sig, unsigned char **buffer);

DSASignature * bufGetDSASignature P((unsigned char **buffer);

DESCRIPTION

These functions may be used to move various cryptolib structures in and out of buffers or stdio streams. Functions of the form bufPut or bufGet use usigned char ** buffers and are useful for creating messages out of various structures. Stdio-based functions are useful for moving objects in and out of files. ASN.1 (abstract syntax notation 1) is used to push these structures around. This is not BER or DER (Basic and Distinguished Encoding rules).

This part of CryptoLib is probably most subject to change and should not be relied upon too strictly.