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 * The key schedule is passed as an arg, as well as the cleartext or
35 * All registers labeled imply Vax using the Ultrix or 4.2bsd
39 * NOTE: bit and byte numbering:
40 * DES algorithm is defined in terms of bits of L
41 * followed by bits of R.
45 * Always work in register pairs, FROM L1,R1 TO L2,R2 to make
48 * originally written by Steve Miller, MIT Project Athena
55 des_ecb_encrypt(clear, cipher, schedule, encrypt)
57 unsigned long *cipher;
58 int encrypt; /* 0 ==> decrypt, else encrypt */
59 register mit_des_key_schedule schedule; /* r11 */
61 return (mit_des_ecb_encrypt(clear, cipher, schedule, encrypt));