Annotation of pgp/src/crypto.h, revision 1.1.1.6

1.1.1.5   root        1: /* crypto.h - C headers for crypto.c 
1.1.1.6 ! root        2:  */
1.1.1.5   root        3: 
                      4: /* Used to determine if nesting should be allowed */
                      5: boolean legal_ctb(byte ctb);
                      6: 
                      7: /* Write an RSA-signed message digest of input file to specified output
                      8:    file, and append input file to output file */
                      9: int signfile(boolean nested, boolean separate_signature, char *mcguffin,
1.1.1.6 ! root       10:          char *infile, char *outfile, char lit_mode, char *literalfile);
1.1.1.5   root       11: 
                     12: /* Reads the first count bytes from infile into header */
1.1.1.6 ! root       13: int get_header_info_from_file(char *infile, byte * header, int count);
1.1.1.5   root       14: 
                     15: /* RSA-encrypt a file */
1.1.1.6 ! root       16: int encryptfile(char **mcguffin, char *infile, char *outfile,
        !            17:                boolean attempt_compression);
1.1.1.5   root       18: 
                     19: /* Encrypt file with IPES/IDEA cipher */
1.1.1.6 ! root       20: int idea_encryptfile(char *infile, char *outfile,
        !            21:                     boolean attempt_compression);
1.1.1.5   root       22: 
                     23: /* Prepend a CTB_LITERAL prefix to a file */
1.1.1.6 ! root       24: int make_literal(char *infile, char *outfile, char lit_mode,
        !            25:                 char *literalfile);
1.1.1.5   root       26: 
                     27: /* Decrypt a file (RSA or IPES/IDEA) */
                     28: int decryptfile(char *infile, char *outfile);
                     29: 
                     30: /* Check signature in infile for validity.  Strip off the signature and
                     31:    write the remaining packet to outfile */
                     32: int check_signaturefile(char *infile, char *outfile, boolean strip_signature,
                     33:                        char *preserved_name);
                     34: 
                     35: /* Decrypt file with IPES/IDEA only */
                     36: int idea_decryptfile(char *infile, char *outfile);
                     37: 
                     38: /* Decompress a file with ZIP algorithm */
                     39: int decompress_file(char *infile, char *outfile);
                     40: 
                     41: /* Strip off literal prefix from infile, copying to outfile */
                     42: int strip_literal(char *infile, char *outfile, char *preserved_name,
1.1.1.6 ! root       43:                  char *lit_mode);
1.1.1.5   root       44: 
                     45: #ifndef VMS
                     46: struct IdeaCfbContext;
                     47: /* Write a multiprecision integer to a file */
1.1.1.6 ! root       48: void write_mpi(unitptr n, FILE * f, struct IdeaCfbContext *cfb);
1.1.1.5   root       49: 
                     50: /* Read a mutiprecision integer from a file */
1.1.1.6 ! root       51: int read_mpi(unitptr r, FILE * f, boolean adjust_precision,
        !            52:             struct IdeaCfbContext *cfb);
        !            53: #else                          /* !VMS */
1.1.1.5   root       54: void write_mpi();
                     55: int read_mpi();
1.1.1.6 ! root       56: #endif                         /* VMS */
1.1.1.5   root       57: 
                     58: /* Convert C <-> Quiche strings */
                     59: void CToPascal(char *s);
1.1.1.6 ! root       60: void PascalToC(char *s);
1.1.1.5   root       61: 
                     62: /* Tests if a randseed.bin file exists already */
                     63: int seedfile_exists(void);
                     64: 
                     65: /* Creates a randseed.bin file (call if above returns false) */
                     66: void create_seedfile(void);
                     67: 
1.1.1.6 ! root       68: /*      Return date string, given pointer to 32-bit timestamp */
        !            69: char *cdate(word32 * tstamp);
1.1.1.5   root       70: 
1.1.1.6 ! root       71: /*      Return date and time string, given pointer to 32-bit timestamp */
        !            72: char *ctdate(word32 * tstamp);
1.1.1.5   root       73: 
                     74: /* Return current timestamp as a byte array and as a 32-bit word */
1.1.1.6 ! root       75: word32 get_timestamp(byte * timestamp);
1.1.1.5   root       76: 
1.1.1.6 ! root       77: /*      Returns the length of a packet according to the CTB and the
        !            78:        length field */
        !            79: word32 getpastlength(byte ctb, FILE * f);
1.1.1.5   root       80: 
                     81: /* Write a CTB with the appropriate length field */
1.1.1.6 ! root       82: void write_ctb_len(FILE * f, byte ctb_type, word32 length, boolean big);
1.1.1.5   root       83: 
                     84: /* Print an error message and return nonzero if val != checkval */
1.1.1.6 ! root       85: int version_error(int val, int checkval);
1.1.1.5   root       86: /* The same, if val is not a recognized version */
1.1.1.6 ! root       87: int version_byte_error(int val);
1.1.1.5   root       88: 
1.1.1.6 ! root       89: int check_key_sig(FILE * fkey, long fpkey, int keypktlen, char *keyuserid,
        !            90:                  FILE * fsig, long fpsig, char *keyfile, char *siguserid,
        !            91:                  byte * xtimestamp,
        !            92:                  byte * sigclass);
1.1.1.5   root       93: 
                     94: int squish_file(char *infile, char *outfile);
                     95: 
                     96: int signkey(char *keyguffin, char *sigguffin, char *keyfile);
                     97: 
1.1.1.6 ! root       98: extern int compromise(byte * keyID, char *keyfile);

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.