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

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