Windows global stuff:
[krb5.git] / src / lib / des425 / key_sched.c
1 /*
2  * lib/des425/key_sched.c
3  *
4  * Copyright 1985, 1986, 1987, 1988, 1990 by the Massachusetts Institute
5  * of Technology.
6  * All Rights Reserved.
7  *
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.
12  * 
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.
23  * 
24  *
25  * This routine computes the DES key schedule given a key.  The
26  * permutations and shifts have been done at compile time, resulting
27  * in a direct one-step mapping from the input key to the key
28  * schedule.
29  *
30  * Also checks parity and weak keys.
31  *
32  * Watch out for the subscripts -- most effectively start at 1 instead
33  * of at zero.  Maybe some bugs in that area.
34  *
35  * DON'T change the data types for arrays and such, or it will either
36  * break or run slower.  This was optimized for Uvax2.
37  *
38  * In case the user wants to cache the computed key schedule, it is
39  * passed as an arg.  Also implies that caller has explicit control
40  * over zeroing both the key schedule and the key.
41  *
42  * All registers labeled imply Vax using the Ultrix or 4.2bsd compiler.
43  *
44  * Originally written 6/85 by Steve Miller, MIT Project Athena.
45  */
46
47
48 #include <stdio.h>
49 #include "des.h"
50
51 int
52 des_key_sched(k,schedule)
53     register mit_des_cblock k;  /* r11 */
54     mit_des_key_schedule schedule;
55 {
56         return (mit_des_key_sched(k, schedule));
57 }