4 * Copyright 1985, 1986, 1987, 1988, 1990 by the Massachusetts Institute
8 * Export of this software from the United States of America may
9 * require a specific license from the United States Government.
10 * It is the responsibility of any person or organization contemplating
11 * export to obtain such a license before exporting.
13 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
14 * distribute this software and its documentation for any purpose and
15 * without fee is hereby granted, provided that the above copyright
16 * notice appear in all copies and that both that copyright notice and
17 * this permission notice appear in supporting documentation, and that
18 * the name of M.I.T. not be used in advertising or publicity pertaining
19 * to distribution of the software without specific, written prior
20 * permission. M.I.T. makes no representations about the suitability of
21 * this software for any purpose. It is provided "as is" without express
22 * or implied warranty.
25 * These routines perform encryption and decryption using the DES
26 * private key algorithm, or else a subset of it-- fewer inner loops.
27 * (AUTH_DES_ITER defaults to 16, may be less.)
29 * Under U.S. law, this software may not be exported outside the US
30 * without license from the U.S. Commerce department.
32 * These routines form the library interface to the DES facilities.
34 * spm 8/85 MIT project athena
41 * This routine performs DES cipher-block-chaining checksum operation,
42 * a.k.a. Message Authentication Code. It ALWAYS encrypts from input
43 * to a single 64 bit output MAC checksum.
45 * The key schedule is passed as an arg, as well as the cleartext or
46 * ciphertext. The cleartext and ciphertext should be in host order.
48 * NOTE-- the output is ALWAYS 8 bytes long. If not enough space was
49 * provided, your program will get trashed.
51 * The input is null padded, at the end (highest addr), to an integral
52 * multiple of eight bytes.
56 des_cbc_cksum(in,out,length,key,iv)
57 krb5_octet *in; /* >= length bytes of inputtext */
58 krb5_octet *out; /* >= length bytes of outputtext */
59 register long length; /* in bytes */
60 mit_des_key_schedule key; /* precomputed key schedule */
61 krb5_octet *iv; /* 8 bytes of ivec */
63 mit_des_cbc_cksum(in, out, length, key, iv);