* this software for any purpose. It is provided "as is" without express
* or implied warranty.
*
- *
- * These routines perform encryption and decryption using the DES
- * private key algorithm, or else a subset of it-- fewer inner loops.
- * (AUTH_DES_ITER defaults to 16, may be less.)
- *
- * Under U.S. law, this software may not be exported outside the US
- * without license from the U.S. Commerce department.
- *
- * The key schedule is passed as an arg, as well as the cleartext or
- * ciphertext.
- *
- * All registers labeled imply Vax using the Ultrix or 4.2bsd
- * compiler.
- *
- *
- * NOTE: bit and byte numbering:
- * DES algorithm is defined in terms of bits of L
- * followed by bits of R.
- * bit 0 ==> lsb of L
- * bit 63 ==> msb of R
- *
- * Always work in register pairs, FROM L1,R1 TO L2,R2 to make
- * bookkeeping easier.
- *
- * originally written by Steve Miller, MIT Project Athena
*/
#include "des_int.h"
* of Technology.
* All Rights Reserved.
*
- * These routines perform encryption and decryption using the DES
- * private key algorithm, or else a subset of it -- fewer inner loops.
- * (AUTH_DES_ITER defaults to 16, may be less.)
- *
- * Under U.S. law, this software may not be exported outside the US
- * without license from the U.S. Commerce department.
- *
- * These routines form the library interface to the DES facilities.
- *
- * Originally written 8/85 by Steve Miller, MIT Project Athena.
- *
* 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
#include "des_int.h"
#include "des.h"
-/*
- * This routine performs DES cipher-block-chaining operation, either
- * encrypting from cleartext to ciphertext, if encrypt != 0 or
- * decrypting from ciphertext to cleartext, if encrypt == 0.
- *
- * The key schedule is passed as an arg, as well as the cleartext or
- * ciphertext. The cleartext and ciphertext should be in host order.
- *
- * NOTE-- the output is ALWAYS an multiple of 8 bytes long. If not
- * enough space was provided, your program will get trashed.
- *
- * For encryption, the cleartext string is null padded, at the end, to
- * an integral multiple of eight bytes.
- *
- * For decryption, the ciphertext will be used in integral multiples
- * of 8 bytes, but only the first "length" bytes returned into the
- * cleartext.
- */
-
int
des_cbc_encrypt(in,out,length,key,iv,encrypt)
krb5_octet *in; /* >= length bytes of input text */
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
*
- *
- * These routines check and fix parity of encryption keys for the DES
- * algorithm.
- *
- * Under U.S. law, this software may not be exported outside the US
- * without license from the U.S. Commerce department.
- *
- * These routines form the library interface to the DES facilities.
- *
*/
#include "des_int.h"
/*
* des_check_key_parity: returns true iff key has the correct des parity.
- * See des_fix_key_parity for the definition of
- * correct des parity.
*/
int
des_check_key_parity(key)
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
*
- *
- * This routine computes the DES key schedule given a key. The
- * permutations and shifts have been done at compile time, resulting
- * in a direct one-step mapping from the input key to the key
- * schedule.
- *
- * Also checks parity and weak keys.
- *
- * Watch out for the subscripts -- most effectively start at 1 instead
- * of at zero. Maybe some bugs in that area.
- *
- * DON'T change the data types for arrays and such, or it will either
- * break or run slower. This was optimized for Uvax2.
- *
- * In case the user wants to cache the computed key schedule, it is
- * passed as an arg. Also implies that caller has explicit control
- * over zeroing both the key schedule and the key.
- *
- * All registers labeled imply Vax using the Ultrix or 4.2bsd compiler.
- *
- * Originally written 6/85 by Steve Miller, MIT Project Athena.
*/
#include "des_int.h"
#include "des.h"
-/*
- * des_init_random_number_generator:
- *
- * This routine takes a secret key possibly shared by a number
- * of servers and uses it to generate a random number stream that is
- * not shared by any of the other servers. It does this by using the current
- * process id, host id, and the current time to the nearest second. The
- * resulting stream seed is not useful information for cracking the secret
- * key. Moreover, this routine keeps no copy of the secret key.
- * This routine is used for example, by the kerberos server(s) with the
- * key in question being the kerberos master key.
- *
- * Note: this routine calls des_set_random_generator_seed.
- */
void
des_init_random_number_generator(key)
mit_des_cblock key;
return 0;
}
-
* this software for any purpose. It is provided "as is" without express
* or implied warranty.
*
- *
- * Under U.S. law, this software may not be exported outside the US
- * without license from the U.S. Commerce department.
- *
- * These routines form the library interface to the DES facilities.
- *
- * Originally written 8/85 by Steve Miller, MIT Project Athena.
*/
#include "des_int.h"