summaryrefslogtreecommitdiffstats
path: root/src/lib/crypto/des/cs_entry.c
blob: 8baa8778ff3a3c5e40c86f97d09b4e271988d2df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/*
 * lib/crypto/des/cs_entry.c
 *
 * Copyright 1990,1991 by the Massachusetts Institute of Technology.
 * All Rights Reserved.
 *
 * Export of this software from the United States of America may
 *   require a specific license from the United States Government.
 *   It is the responsibility of any person or organization contemplating
 *   export to obtain such a license before exporting.
 * 
 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
 * distribute this software and its documentation for any purpose and
 * without fee is hereby granted, provided that the above copyright
 * notice appear in all copies and that both that copyright notice and
 * this permission notice appear in supporting documentation, and that
 * the name of M.I.T. not be used in advertising or publicity pertaining
 * to distribution of the software without specific, written prior
 * permission.  M.I.T. makes no representations about the suitability of
 * this software for any purpose.  It is provided "as is" without express
 * or implied warranty.
 * 
 *
 * DES encryption interface file
 */



#include <krb5/krb5.h>
#include <krb5/crc-32.h>

#include "des_int.h"

static krb5_cryptosystem_entry mit_raw_des_cryptosystem_entry = {
    0,
    mit_raw_des_encrypt_func,
    mit_raw_des_decrypt_func,
    mit_des_process_key,
    mit_des_finish_key,
    mit_des_string_to_key,
    mit_des_init_random_key,
    mit_des_finish_random_key,
    mit_des_random_key,
    sizeof(mit_des_cblock),
    0,
    sizeof(mit_des_cblock),
    ETYPE_RAW_DES_CBC,
    KEYTYPE_DES
    };

static krb5_cryptosystem_entry mit_des_cryptosystem_entry = {
    0,
    mit_des_encrypt_func,
    mit_des_decrypt_func, 
    mit_des_process_key,
    mit_des_finish_key,
    mit_des_string_to_key,
    mit_des_init_random_key,
    mit_des_finish_random_key,
    mit_des_random_key,
    sizeof(mit_des_cblock),
    CRC32_CKSUM_LENGTH+sizeof(mit_des_cblock),
    sizeof(mit_des_cblock),
    ETYPE_DES_CBC_CRC,
    KEYTYPE_DES
    };

krb5_cs_table_entry krb5_raw_des_cst_entry = {
    0,
    &mit_raw_des_cryptosystem_entry,
    0
    };

krb5_cs_table_entry krb5_des_cst_entry = {
    0,
    &mit_des_cryptosystem_entry,
    0
    };

extern krb5_error_code mit_des_cbc_checksum PROTOTYPE ((krb5_pointer ,
							size_t ,
							krb5_pointer ,
							size_t ,
							krb5_checksum * ));


krb5_checksum_entry krb5_des_cbc_cksumtable_entry = {
    0,
    mit_des_cbc_checksum,
    sizeof(mit_des_cblock),
    1,					/* is collision proof */
    1,					/* is keyed */
};