2 C K _ D E S . C - libDES interface for Kermit 95"
4 Copyright (C) 1998, 2001, Trustees of Columbia University in the City of New
5 York. The C-Kermit software may not be, in whole or in part, licensed or
6 sold for profit as a software product itself, nor may it be included in or
7 distributed with commercial products or otherwise distributed by commercial
8 concerns to their clients or customers without written permission of the
9 Office of Kermit Development and Distribution, Columbia University. This
10 copyright notice must not be removed, altered, or obscured.
13 Jeffrey E Altman (jaltman@secure-endpoints.com)
17 This file contains wrappers so that the following functions will be imported
18 into the k95crypt.dll/k2crypt.dll files in such a form that they can be
19 re-exported to k95.exe/k2.exe. This subset of the DES library is needed to
20 provide DES based Kerberos authentication.
25 /* The following is specific to my installation, but since I'm the only one */
26 /* that uses this file ... */
33 #include <c:\srp\des\des.h>
35 #include <c:\src\srp\des\des.h>
38 #include <c:\srp\des\des.h>
42 libdes_random_key(des_cblock B)
49 libdes_random_seed(des_cblock B)
55 libdes_key_sched(des_cblock * B, des_key_schedule S)
61 libdes_ecb_encrypt(des_cblock * B1, des_cblock * B2, des_key_schedule S, int n)
63 des_ecb_encrypt(B1,B2,S,n);
67 libdes_string_to_key(char * s, des_cblock * B)
69 des_string_to_key(s,B);
74 libdes_fixup_key_parity(des_cblock * B)
76 des_set_odd_parity(B);
80 libdes_pcbc_encrypt(des_cblock *input, des_cblock *output, long length,
81 des_key_schedule schedule, des_cblock *ivec, int enc)
83 des_pcbc_encrypt(input,output,length,schedule,ivec,enc);
87 libdes_dll_init(struct _crypt_dll_init * init)
89 init->p_install_funcs("libdes_random_key",libdes_random_key);
90 init->p_install_funcs("libdes_random_seed",libdes_random_seed);
91 init->p_install_funcs("libdes_key_sched",libdes_key_sched);
92 init->p_install_funcs("libdes_ecb_encrypt",libdes_ecb_encrypt);
93 init->p_install_funcs("libdes_string_to_key",libdes_string_to_key);
94 init->p_install_funcs("libdes_fixup_key_parity",libdes_fixup_key_parity);
95 init->p_install_funcs("libdes_pcbc_encrypt",libdes_pcbc_encrypt);