1*0a6a1f1dSLionel Sambuc /* $NetBSD: crypto-des.c,v 1.1.1.2 2014/04/24 12:45:49 pettai Exp $ */
2ebfedea0SLionel Sambuc
3ebfedea0SLionel Sambuc /*
4ebfedea0SLionel Sambuc * Copyright (c) 1997 - 2008 Kungliga Tekniska Högskolan
5ebfedea0SLionel Sambuc * (Royal Institute of Technology, Stockholm, Sweden).
6ebfedea0SLionel Sambuc * All rights reserved.
7ebfedea0SLionel Sambuc *
8ebfedea0SLionel Sambuc * Redistribution and use in source and binary forms, with or without
9ebfedea0SLionel Sambuc * modification, are permitted provided that the following conditions
10ebfedea0SLionel Sambuc * are met:
11ebfedea0SLionel Sambuc *
12ebfedea0SLionel Sambuc * 1. Redistributions of source code must retain the above copyright
13ebfedea0SLionel Sambuc * notice, this list of conditions and the following disclaimer.
14ebfedea0SLionel Sambuc *
15ebfedea0SLionel Sambuc * 2. Redistributions in binary form must reproduce the above copyright
16ebfedea0SLionel Sambuc * notice, this list of conditions and the following disclaimer in the
17ebfedea0SLionel Sambuc * documentation and/or other materials provided with the distribution.
18ebfedea0SLionel Sambuc *
19ebfedea0SLionel Sambuc * 3. Neither the name of the Institute nor the names of its contributors
20ebfedea0SLionel Sambuc * may be used to endorse or promote products derived from this software
21ebfedea0SLionel Sambuc * without specific prior written permission.
22ebfedea0SLionel Sambuc *
23ebfedea0SLionel Sambuc * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
24ebfedea0SLionel Sambuc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25ebfedea0SLionel Sambuc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26ebfedea0SLionel Sambuc * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
27ebfedea0SLionel Sambuc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28ebfedea0SLionel Sambuc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29ebfedea0SLionel Sambuc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30ebfedea0SLionel Sambuc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31ebfedea0SLionel Sambuc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32ebfedea0SLionel Sambuc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33ebfedea0SLionel Sambuc * SUCH DAMAGE.
34ebfedea0SLionel Sambuc */
35ebfedea0SLionel Sambuc
36ebfedea0SLionel Sambuc #include "krb5_locl.h"
37ebfedea0SLionel Sambuc
38ebfedea0SLionel Sambuc #ifdef HEIM_WEAK_CRYPTO
39ebfedea0SLionel Sambuc
40ebfedea0SLionel Sambuc
41ebfedea0SLionel Sambuc static void
krb5_DES_random_key(krb5_context context,krb5_keyblock * key)42ebfedea0SLionel Sambuc krb5_DES_random_key(krb5_context context,
43ebfedea0SLionel Sambuc krb5_keyblock *key)
44ebfedea0SLionel Sambuc {
45ebfedea0SLionel Sambuc DES_cblock *k = key->keyvalue.data;
46ebfedea0SLionel Sambuc do {
47ebfedea0SLionel Sambuc krb5_generate_random_block(k, sizeof(DES_cblock));
48ebfedea0SLionel Sambuc DES_set_odd_parity(k);
49ebfedea0SLionel Sambuc } while(DES_is_weak_key(k));
50ebfedea0SLionel Sambuc }
51ebfedea0SLionel Sambuc
52ebfedea0SLionel Sambuc static void
krb5_DES_schedule_old(krb5_context context,struct _krb5_key_type * kt,struct _krb5_key_data * key)53ebfedea0SLionel Sambuc krb5_DES_schedule_old(krb5_context context,
54ebfedea0SLionel Sambuc struct _krb5_key_type *kt,
55ebfedea0SLionel Sambuc struct _krb5_key_data *key)
56ebfedea0SLionel Sambuc {
57ebfedea0SLionel Sambuc DES_set_key_unchecked(key->key->keyvalue.data, key->schedule->data);
58ebfedea0SLionel Sambuc }
59ebfedea0SLionel Sambuc
60ebfedea0SLionel Sambuc static void
krb5_DES_random_to_key(krb5_context context,krb5_keyblock * key,const void * data,size_t size)61ebfedea0SLionel Sambuc krb5_DES_random_to_key(krb5_context context,
62ebfedea0SLionel Sambuc krb5_keyblock *key,
63ebfedea0SLionel Sambuc const void *data,
64ebfedea0SLionel Sambuc size_t size)
65ebfedea0SLionel Sambuc {
66ebfedea0SLionel Sambuc DES_cblock *k = key->keyvalue.data;
67ebfedea0SLionel Sambuc memcpy(k, data, key->keyvalue.length);
68ebfedea0SLionel Sambuc DES_set_odd_parity(k);
69ebfedea0SLionel Sambuc if(DES_is_weak_key(k))
70ebfedea0SLionel Sambuc _krb5_xor(k, (const unsigned char*)"\0\0\0\0\0\0\0\xf0");
71ebfedea0SLionel Sambuc }
72ebfedea0SLionel Sambuc
73ebfedea0SLionel Sambuc static struct _krb5_key_type keytype_des_old = {
74*0a6a1f1dSLionel Sambuc ETYPE_DES_CBC_CRC,
75ebfedea0SLionel Sambuc "des-old",
76ebfedea0SLionel Sambuc 56,
77ebfedea0SLionel Sambuc 8,
78ebfedea0SLionel Sambuc sizeof(DES_key_schedule),
79ebfedea0SLionel Sambuc krb5_DES_random_key,
80ebfedea0SLionel Sambuc krb5_DES_schedule_old,
81ebfedea0SLionel Sambuc _krb5_des_salt,
82*0a6a1f1dSLionel Sambuc krb5_DES_random_to_key,
83*0a6a1f1dSLionel Sambuc NULL,
84*0a6a1f1dSLionel Sambuc NULL
85ebfedea0SLionel Sambuc };
86ebfedea0SLionel Sambuc
87ebfedea0SLionel Sambuc static struct _krb5_key_type keytype_des = {
88*0a6a1f1dSLionel Sambuc ETYPE_DES_CBC_CRC,
89ebfedea0SLionel Sambuc "des",
90ebfedea0SLionel Sambuc 56,
91ebfedea0SLionel Sambuc 8,
92ebfedea0SLionel Sambuc sizeof(struct _krb5_evp_schedule),
93ebfedea0SLionel Sambuc krb5_DES_random_key,
94ebfedea0SLionel Sambuc _krb5_evp_schedule,
95ebfedea0SLionel Sambuc _krb5_des_salt,
96ebfedea0SLionel Sambuc krb5_DES_random_to_key,
97ebfedea0SLionel Sambuc _krb5_evp_cleanup,
98ebfedea0SLionel Sambuc EVP_des_cbc
99ebfedea0SLionel Sambuc };
100ebfedea0SLionel Sambuc
101ebfedea0SLionel Sambuc static krb5_error_code
CRC32_checksum(krb5_context context,struct _krb5_key_data * key,const void * data,size_t len,unsigned usage,Checksum * C)102ebfedea0SLionel Sambuc CRC32_checksum(krb5_context context,
103ebfedea0SLionel Sambuc struct _krb5_key_data *key,
104ebfedea0SLionel Sambuc const void *data,
105ebfedea0SLionel Sambuc size_t len,
106ebfedea0SLionel Sambuc unsigned usage,
107ebfedea0SLionel Sambuc Checksum *C)
108ebfedea0SLionel Sambuc {
109ebfedea0SLionel Sambuc uint32_t crc;
110ebfedea0SLionel Sambuc unsigned char *r = C->checksum.data;
111ebfedea0SLionel Sambuc _krb5_crc_init_table ();
112ebfedea0SLionel Sambuc crc = _krb5_crc_update (data, len, 0);
113ebfedea0SLionel Sambuc r[0] = crc & 0xff;
114ebfedea0SLionel Sambuc r[1] = (crc >> 8) & 0xff;
115ebfedea0SLionel Sambuc r[2] = (crc >> 16) & 0xff;
116ebfedea0SLionel Sambuc r[3] = (crc >> 24) & 0xff;
117ebfedea0SLionel Sambuc return 0;
118ebfedea0SLionel Sambuc }
119ebfedea0SLionel Sambuc
120ebfedea0SLionel Sambuc static krb5_error_code
RSA_MD4_checksum(krb5_context context,struct _krb5_key_data * key,const void * data,size_t len,unsigned usage,Checksum * C)121ebfedea0SLionel Sambuc RSA_MD4_checksum(krb5_context context,
122ebfedea0SLionel Sambuc struct _krb5_key_data *key,
123ebfedea0SLionel Sambuc const void *data,
124ebfedea0SLionel Sambuc size_t len,
125ebfedea0SLionel Sambuc unsigned usage,
126ebfedea0SLionel Sambuc Checksum *C)
127ebfedea0SLionel Sambuc {
128ebfedea0SLionel Sambuc if (EVP_Digest(data, len, C->checksum.data, NULL, EVP_md4(), NULL) != 1)
129ebfedea0SLionel Sambuc krb5_abortx(context, "md4 checksum failed");
130ebfedea0SLionel Sambuc return 0;
131ebfedea0SLionel Sambuc }
132ebfedea0SLionel Sambuc
133ebfedea0SLionel Sambuc static krb5_error_code
RSA_MD4_DES_checksum(krb5_context context,struct _krb5_key_data * key,const void * data,size_t len,unsigned usage,Checksum * cksum)134ebfedea0SLionel Sambuc RSA_MD4_DES_checksum(krb5_context context,
135ebfedea0SLionel Sambuc struct _krb5_key_data *key,
136ebfedea0SLionel Sambuc const void *data,
137ebfedea0SLionel Sambuc size_t len,
138ebfedea0SLionel Sambuc unsigned usage,
139ebfedea0SLionel Sambuc Checksum *cksum)
140ebfedea0SLionel Sambuc {
141ebfedea0SLionel Sambuc return _krb5_des_checksum(context, EVP_md4(), key, data, len, cksum);
142ebfedea0SLionel Sambuc }
143ebfedea0SLionel Sambuc
144ebfedea0SLionel Sambuc static krb5_error_code
RSA_MD4_DES_verify(krb5_context context,struct _krb5_key_data * key,const void * data,size_t len,unsigned usage,Checksum * C)145ebfedea0SLionel Sambuc RSA_MD4_DES_verify(krb5_context context,
146ebfedea0SLionel Sambuc struct _krb5_key_data *key,
147ebfedea0SLionel Sambuc const void *data,
148ebfedea0SLionel Sambuc size_t len,
149ebfedea0SLionel Sambuc unsigned usage,
150ebfedea0SLionel Sambuc Checksum *C)
151ebfedea0SLionel Sambuc {
152ebfedea0SLionel Sambuc return _krb5_des_verify(context, EVP_md4(), key, data, len, C);
153ebfedea0SLionel Sambuc }
154ebfedea0SLionel Sambuc
155ebfedea0SLionel Sambuc static krb5_error_code
RSA_MD5_DES_checksum(krb5_context context,struct _krb5_key_data * key,const void * data,size_t len,unsigned usage,Checksum * C)156ebfedea0SLionel Sambuc RSA_MD5_DES_checksum(krb5_context context,
157ebfedea0SLionel Sambuc struct _krb5_key_data *key,
158ebfedea0SLionel Sambuc const void *data,
159ebfedea0SLionel Sambuc size_t len,
160ebfedea0SLionel Sambuc unsigned usage,
161ebfedea0SLionel Sambuc Checksum *C)
162ebfedea0SLionel Sambuc {
163ebfedea0SLionel Sambuc return _krb5_des_checksum(context, EVP_md5(), key, data, len, C);
164ebfedea0SLionel Sambuc }
165ebfedea0SLionel Sambuc
166ebfedea0SLionel Sambuc static krb5_error_code
RSA_MD5_DES_verify(krb5_context context,struct _krb5_key_data * key,const void * data,size_t len,unsigned usage,Checksum * C)167ebfedea0SLionel Sambuc RSA_MD5_DES_verify(krb5_context context,
168ebfedea0SLionel Sambuc struct _krb5_key_data *key,
169ebfedea0SLionel Sambuc const void *data,
170ebfedea0SLionel Sambuc size_t len,
171ebfedea0SLionel Sambuc unsigned usage,
172ebfedea0SLionel Sambuc Checksum *C)
173ebfedea0SLionel Sambuc {
174ebfedea0SLionel Sambuc return _krb5_des_verify(context, EVP_md5(), key, data, len, C);
175ebfedea0SLionel Sambuc }
176ebfedea0SLionel Sambuc
177ebfedea0SLionel Sambuc struct _krb5_checksum_type _krb5_checksum_crc32 = {
178ebfedea0SLionel Sambuc CKSUMTYPE_CRC32,
179ebfedea0SLionel Sambuc "crc32",
180ebfedea0SLionel Sambuc 1,
181ebfedea0SLionel Sambuc 4,
182ebfedea0SLionel Sambuc 0,
183ebfedea0SLionel Sambuc CRC32_checksum,
184ebfedea0SLionel Sambuc NULL
185ebfedea0SLionel Sambuc };
186ebfedea0SLionel Sambuc
187ebfedea0SLionel Sambuc struct _krb5_checksum_type _krb5_checksum_rsa_md4 = {
188ebfedea0SLionel Sambuc CKSUMTYPE_RSA_MD4,
189ebfedea0SLionel Sambuc "rsa-md4",
190ebfedea0SLionel Sambuc 64,
191ebfedea0SLionel Sambuc 16,
192ebfedea0SLionel Sambuc F_CPROOF,
193ebfedea0SLionel Sambuc RSA_MD4_checksum,
194ebfedea0SLionel Sambuc NULL
195ebfedea0SLionel Sambuc };
196ebfedea0SLionel Sambuc
197ebfedea0SLionel Sambuc struct _krb5_checksum_type _krb5_checksum_rsa_md4_des = {
198ebfedea0SLionel Sambuc CKSUMTYPE_RSA_MD4_DES,
199ebfedea0SLionel Sambuc "rsa-md4-des",
200ebfedea0SLionel Sambuc 64,
201ebfedea0SLionel Sambuc 24,
202ebfedea0SLionel Sambuc F_KEYED | F_CPROOF | F_VARIANT,
203ebfedea0SLionel Sambuc RSA_MD4_DES_checksum,
204ebfedea0SLionel Sambuc RSA_MD4_DES_verify
205ebfedea0SLionel Sambuc };
206ebfedea0SLionel Sambuc
207ebfedea0SLionel Sambuc struct _krb5_checksum_type _krb5_checksum_rsa_md5_des = {
208ebfedea0SLionel Sambuc CKSUMTYPE_RSA_MD5_DES,
209ebfedea0SLionel Sambuc "rsa-md5-des",
210ebfedea0SLionel Sambuc 64,
211ebfedea0SLionel Sambuc 24,
212ebfedea0SLionel Sambuc F_KEYED | F_CPROOF | F_VARIANT,
213ebfedea0SLionel Sambuc RSA_MD5_DES_checksum,
214ebfedea0SLionel Sambuc RSA_MD5_DES_verify
215ebfedea0SLionel Sambuc };
216ebfedea0SLionel Sambuc
217ebfedea0SLionel Sambuc static krb5_error_code
evp_des_encrypt_null_ivec(krb5_context context,struct _krb5_key_data * key,void * data,size_t len,krb5_boolean encryptp,int usage,void * ignore_ivec)218ebfedea0SLionel Sambuc evp_des_encrypt_null_ivec(krb5_context context,
219ebfedea0SLionel Sambuc struct _krb5_key_data *key,
220ebfedea0SLionel Sambuc void *data,
221ebfedea0SLionel Sambuc size_t len,
222ebfedea0SLionel Sambuc krb5_boolean encryptp,
223ebfedea0SLionel Sambuc int usage,
224ebfedea0SLionel Sambuc void *ignore_ivec)
225ebfedea0SLionel Sambuc {
226ebfedea0SLionel Sambuc struct _krb5_evp_schedule *ctx = key->schedule->data;
227ebfedea0SLionel Sambuc EVP_CIPHER_CTX *c;
228ebfedea0SLionel Sambuc DES_cblock ivec;
229ebfedea0SLionel Sambuc memset(&ivec, 0, sizeof(ivec));
230ebfedea0SLionel Sambuc c = encryptp ? &ctx->ectx : &ctx->dctx;
231ebfedea0SLionel Sambuc EVP_CipherInit_ex(c, NULL, NULL, NULL, (void *)&ivec, -1);
232ebfedea0SLionel Sambuc EVP_Cipher(c, data, data, len);
233ebfedea0SLionel Sambuc return 0;
234ebfedea0SLionel Sambuc }
235ebfedea0SLionel Sambuc
236ebfedea0SLionel Sambuc static krb5_error_code
evp_des_encrypt_key_ivec(krb5_context context,struct _krb5_key_data * key,void * data,size_t len,krb5_boolean encryptp,int usage,void * ignore_ivec)237ebfedea0SLionel Sambuc evp_des_encrypt_key_ivec(krb5_context context,
238ebfedea0SLionel Sambuc struct _krb5_key_data *key,
239ebfedea0SLionel Sambuc void *data,
240ebfedea0SLionel Sambuc size_t len,
241ebfedea0SLionel Sambuc krb5_boolean encryptp,
242ebfedea0SLionel Sambuc int usage,
243ebfedea0SLionel Sambuc void *ignore_ivec)
244ebfedea0SLionel Sambuc {
245ebfedea0SLionel Sambuc struct _krb5_evp_schedule *ctx = key->schedule->data;
246ebfedea0SLionel Sambuc EVP_CIPHER_CTX *c;
247ebfedea0SLionel Sambuc DES_cblock ivec;
248ebfedea0SLionel Sambuc memcpy(&ivec, key->key->keyvalue.data, sizeof(ivec));
249ebfedea0SLionel Sambuc c = encryptp ? &ctx->ectx : &ctx->dctx;
250ebfedea0SLionel Sambuc EVP_CipherInit_ex(c, NULL, NULL, NULL, (void *)&ivec, -1);
251ebfedea0SLionel Sambuc EVP_Cipher(c, data, data, len);
252ebfedea0SLionel Sambuc return 0;
253ebfedea0SLionel Sambuc }
254ebfedea0SLionel Sambuc
255ebfedea0SLionel Sambuc static krb5_error_code
DES_CFB64_encrypt_null_ivec(krb5_context context,struct _krb5_key_data * key,void * data,size_t len,krb5_boolean encryptp,int usage,void * ignore_ivec)256ebfedea0SLionel Sambuc DES_CFB64_encrypt_null_ivec(krb5_context context,
257ebfedea0SLionel Sambuc struct _krb5_key_data *key,
258ebfedea0SLionel Sambuc void *data,
259ebfedea0SLionel Sambuc size_t len,
260ebfedea0SLionel Sambuc krb5_boolean encryptp,
261ebfedea0SLionel Sambuc int usage,
262ebfedea0SLionel Sambuc void *ignore_ivec)
263ebfedea0SLionel Sambuc {
264ebfedea0SLionel Sambuc DES_cblock ivec;
265ebfedea0SLionel Sambuc int num = 0;
266ebfedea0SLionel Sambuc DES_key_schedule *s = key->schedule->data;
267ebfedea0SLionel Sambuc memset(&ivec, 0, sizeof(ivec));
268ebfedea0SLionel Sambuc
269ebfedea0SLionel Sambuc DES_cfb64_encrypt(data, data, len, s, &ivec, &num, encryptp);
270ebfedea0SLionel Sambuc return 0;
271ebfedea0SLionel Sambuc }
272ebfedea0SLionel Sambuc
273ebfedea0SLionel Sambuc static krb5_error_code
DES_PCBC_encrypt_key_ivec(krb5_context context,struct _krb5_key_data * key,void * data,size_t len,krb5_boolean encryptp,int usage,void * ignore_ivec)274ebfedea0SLionel Sambuc DES_PCBC_encrypt_key_ivec(krb5_context context,
275ebfedea0SLionel Sambuc struct _krb5_key_data *key,
276ebfedea0SLionel Sambuc void *data,
277ebfedea0SLionel Sambuc size_t len,
278ebfedea0SLionel Sambuc krb5_boolean encryptp,
279ebfedea0SLionel Sambuc int usage,
280ebfedea0SLionel Sambuc void *ignore_ivec)
281ebfedea0SLionel Sambuc {
282ebfedea0SLionel Sambuc DES_cblock ivec;
283ebfedea0SLionel Sambuc DES_key_schedule *s = key->schedule->data;
284ebfedea0SLionel Sambuc memcpy(&ivec, key->key->keyvalue.data, sizeof(ivec));
285ebfedea0SLionel Sambuc
286ebfedea0SLionel Sambuc DES_pcbc_encrypt(data, data, len, s, &ivec, encryptp);
287ebfedea0SLionel Sambuc return 0;
288ebfedea0SLionel Sambuc }
289ebfedea0SLionel Sambuc
290ebfedea0SLionel Sambuc struct _krb5_encryption_type _krb5_enctype_des_cbc_crc = {
291ebfedea0SLionel Sambuc ETYPE_DES_CBC_CRC,
292ebfedea0SLionel Sambuc "des-cbc-crc",
293ebfedea0SLionel Sambuc 8,
294ebfedea0SLionel Sambuc 8,
295ebfedea0SLionel Sambuc 8,
296ebfedea0SLionel Sambuc &keytype_des,
297ebfedea0SLionel Sambuc &_krb5_checksum_crc32,
298ebfedea0SLionel Sambuc NULL,
299ebfedea0SLionel Sambuc F_DISABLED|F_WEAK,
300ebfedea0SLionel Sambuc evp_des_encrypt_key_ivec,
301ebfedea0SLionel Sambuc 0,
302ebfedea0SLionel Sambuc NULL
303ebfedea0SLionel Sambuc };
304ebfedea0SLionel Sambuc
305ebfedea0SLionel Sambuc struct _krb5_encryption_type _krb5_enctype_des_cbc_md4 = {
306ebfedea0SLionel Sambuc ETYPE_DES_CBC_MD4,
307ebfedea0SLionel Sambuc "des-cbc-md4",
308ebfedea0SLionel Sambuc 8,
309ebfedea0SLionel Sambuc 8,
310ebfedea0SLionel Sambuc 8,
311ebfedea0SLionel Sambuc &keytype_des,
312ebfedea0SLionel Sambuc &_krb5_checksum_rsa_md4,
313ebfedea0SLionel Sambuc &_krb5_checksum_rsa_md4_des,
314ebfedea0SLionel Sambuc F_DISABLED|F_WEAK,
315ebfedea0SLionel Sambuc evp_des_encrypt_null_ivec,
316ebfedea0SLionel Sambuc 0,
317ebfedea0SLionel Sambuc NULL
318ebfedea0SLionel Sambuc };
319ebfedea0SLionel Sambuc
320ebfedea0SLionel Sambuc struct _krb5_encryption_type _krb5_enctype_des_cbc_md5 = {
321ebfedea0SLionel Sambuc ETYPE_DES_CBC_MD5,
322ebfedea0SLionel Sambuc "des-cbc-md5",
323ebfedea0SLionel Sambuc 8,
324ebfedea0SLionel Sambuc 8,
325ebfedea0SLionel Sambuc 8,
326ebfedea0SLionel Sambuc &keytype_des,
327ebfedea0SLionel Sambuc &_krb5_checksum_rsa_md5,
328ebfedea0SLionel Sambuc &_krb5_checksum_rsa_md5_des,
329ebfedea0SLionel Sambuc F_DISABLED|F_WEAK,
330ebfedea0SLionel Sambuc evp_des_encrypt_null_ivec,
331ebfedea0SLionel Sambuc 0,
332ebfedea0SLionel Sambuc NULL
333ebfedea0SLionel Sambuc };
334ebfedea0SLionel Sambuc
335ebfedea0SLionel Sambuc struct _krb5_encryption_type _krb5_enctype_des_cbc_none = {
336ebfedea0SLionel Sambuc ETYPE_DES_CBC_NONE,
337ebfedea0SLionel Sambuc "des-cbc-none",
338ebfedea0SLionel Sambuc 8,
339ebfedea0SLionel Sambuc 8,
340ebfedea0SLionel Sambuc 0,
341ebfedea0SLionel Sambuc &keytype_des,
342ebfedea0SLionel Sambuc &_krb5_checksum_none,
343ebfedea0SLionel Sambuc NULL,
344ebfedea0SLionel Sambuc F_PSEUDO|F_DISABLED|F_WEAK,
345ebfedea0SLionel Sambuc evp_des_encrypt_null_ivec,
346ebfedea0SLionel Sambuc 0,
347ebfedea0SLionel Sambuc NULL
348ebfedea0SLionel Sambuc };
349ebfedea0SLionel Sambuc
350ebfedea0SLionel Sambuc struct _krb5_encryption_type _krb5_enctype_des_cfb64_none = {
351ebfedea0SLionel Sambuc ETYPE_DES_CFB64_NONE,
352ebfedea0SLionel Sambuc "des-cfb64-none",
353ebfedea0SLionel Sambuc 1,
354ebfedea0SLionel Sambuc 1,
355ebfedea0SLionel Sambuc 0,
356ebfedea0SLionel Sambuc &keytype_des_old,
357ebfedea0SLionel Sambuc &_krb5_checksum_none,
358ebfedea0SLionel Sambuc NULL,
359ebfedea0SLionel Sambuc F_PSEUDO|F_DISABLED|F_WEAK,
360ebfedea0SLionel Sambuc DES_CFB64_encrypt_null_ivec,
361ebfedea0SLionel Sambuc 0,
362ebfedea0SLionel Sambuc NULL
363ebfedea0SLionel Sambuc };
364ebfedea0SLionel Sambuc
365ebfedea0SLionel Sambuc struct _krb5_encryption_type _krb5_enctype_des_pcbc_none = {
366ebfedea0SLionel Sambuc ETYPE_DES_PCBC_NONE,
367ebfedea0SLionel Sambuc "des-pcbc-none",
368ebfedea0SLionel Sambuc 8,
369ebfedea0SLionel Sambuc 8,
370ebfedea0SLionel Sambuc 0,
371ebfedea0SLionel Sambuc &keytype_des_old,
372ebfedea0SLionel Sambuc &_krb5_checksum_none,
373ebfedea0SLionel Sambuc NULL,
374ebfedea0SLionel Sambuc F_PSEUDO|F_DISABLED|F_WEAK,
375ebfedea0SLionel Sambuc DES_PCBC_encrypt_key_ivec,
376ebfedea0SLionel Sambuc 0,
377ebfedea0SLionel Sambuc NULL
378ebfedea0SLionel Sambuc };
379ebfedea0SLionel Sambuc #endif /* HEIM_WEAK_CRYPTO */
380