+Tue Nov 8 17:55:47 1994 Theodore Y. Ts'o (tytso@dcl)
+
+ * encryption.h (krb5_string_to_key, krb5_random_key): Change
+ internal calling signature to pass in the encryption
+ block, so that the encryption type in the keyblock
+ structure can be properly initialized.
+
Thu Nov 3 16:38:44 1994 Theodore Y. Ts'o (tytso@dcl)
* encryption.h (krb5_keyblock): Added a field to hold an
typedef struct _krb5_keyblock {
krb5_magic magic;
krb5_keytype keytype;
- krb5_enctype enctype; /* hint of what encryption type to use */
+ krb5_enctype etype; /* hint of what encryption type to use */
int length;
krb5_octet *contents;
} krb5_keyblock;
krb5_error_code (*process_key) NPROTOTYPE((krb5_encrypt_block *,
const krb5_keyblock *));
krb5_error_code (*finish_key) NPROTOTYPE((krb5_encrypt_block *));
- krb5_error_code (*string_to_key) NPROTOTYPE((const krb5_keytype,
+ krb5_error_code (*string_to_key) NPROTOTYPE((const krb5_encrypt_block *,
+ const krb5_keytype,
krb5_keyblock *,
const krb5_data *,
const krb5_data *));
krb5_error_code (*init_random_key) NPROTOTYPE((const krb5_keyblock *,
krb5_pointer *));
krb5_error_code (*finish_random_key) NPROTOTYPE((krb5_pointer *));
- krb5_error_code (*random_key) NPROTOTYPE((krb5_pointer,
- krb5_keyblock **));
+ krb5_error_code (*random_key) NPROTOTYPE((const krb5_encrypt_block *,
+ krb5_pointer,
+ krb5_keyblock **));
int block_length;
int pad_minimum; /* needed for cksum size computation */
int keysize;
#define krb5_decrypt(inptr, outptr, size, eblock, ivec) (*(eblock)->crypto_entry->decrypt_func)(inptr, outptr, size, eblock, ivec)
#define krb5_process_key(eblock, key) (*(eblock)->crypto_entry->process_key)(eblock, key)
#define krb5_finish_key(eblock) (*(eblock)->crypto_entry->finish_key)(eblock)
-#define krb5_string_to_key(eblock, keytype, keyblock, data, princ) (*(eblock)->crypto_entry->string_to_key)(keytype, keyblock, data, princ)
+#define krb5_string_to_key(eblock, keytype, keyblock, data, princ) (*(eblock)->crypto_entry->string_to_key)(eblock, keytype, keyblock, data, princ)
#define krb5_init_random_key(eblock, keyblock, ptr) (*(eblock)->crypto_entry->init_random_key)(keyblock, ptr)
#define krb5_finish_random_key(eblock, ptr) (*(eblock)->crypto_entry->finish_random_key)(ptr)
-#define krb5_random_key(eblock, ptr, keyblock) (*(eblock)->crypto_entry->random_key)(ptr, keyblock)
+#define krb5_random_key(eblock, ptr, keyblock) (*(eblock)->crypto_entry->random_key)(eblock, ptr, keyblock)
/*
* Here's the stuff for the checksum switch:
+Tue Nov 8 17:57:47 1994 Theodore Y. Ts'o (tytso@dcl)
+
+ * des_int.h:
+ random_key.c (mit_des_random_key):
+ string2key.c (mit_des_string_to_key): Change
+ internal calling signature to pass in the encryption
+ block, so that the encryption type in the keyblock
+ structure can be properly initialized.
+
Thu Nov 3 18:31:55 1994 Mark Eichin (eichin@cygnus.com)
* Makefile.in: stop building f_pcbc.c, since it belongs in
/* random_key.c */
extern krb5_error_code mit_des_random_key
- PROTOTYPE(( krb5_pointer , krb5_keyblock **));
+ PROTOTYPE(( const krb5_encrypt_block *, krb5_pointer , krb5_keyblock **));
/* string2key.c */
extern krb5_error_code mit_des_string_to_key
- PROTOTYPE((const krb5_keytype, krb5_keyblock *, const krb5_data *,
- const krb5_data *));
+ PROTOTYPE(( const krb5_encrypt_block *, const krb5_keytype,
+ krb5_keyblock *, const krb5_data *, const krb5_data *));
/* weak_key.c */
extern int mit_des_is_weak_key PROTOTYPE((mit_des_cblock ));
filling in the keyblock address in *keyblock
*/
-krb5_error_code mit_des_random_key (DECLARG(krb5_pointer, seed),
+krb5_error_code mit_des_random_key (DECLARG(const krb5_encrypt_block *, eblock),
+ DECLARG(krb5_pointer, seed),
DECLARG(krb5_keyblock **, keyblock))
+OLDDECLARG(const krb5_encrypt_block *, eblock)
OLDDECLARG(krb5_pointer, seed)
OLDDECLARG(krb5_keyblock **, keyblock)
{
krb5_xfree(randkey);
return ENOMEM;
}
+ randkey->magic = KV5M_KEYBLOCK;
+ randkey->etype = eblock->crypto_entry->proto_enctype;
randkey->length = sizeof(mit_des_cblock);
randkey->keytype = KEYTYPE_DES;
mit_des_new_random_key(randkey->contents, (mit_des_random_key_seed *) seed);
returns: errors
*/
-krb5_error_code mit_des_string_to_key (DECLARG(const krb5_keytype, keytype),
+krb5_error_code mit_des_string_to_key (DECLARG(const krb5_encrypt_block *, eblock),
+ DECLARG(const krb5_keytype, keytype),
DECLARG(krb5_keyblock *,keyblock),
DECLARG(const krb5_data *,data),
DECLARG(const krb5_data *, salt))
+OLDDECLARG(const krb5_encrypt_block *, eblock)
OLDDECLARG(const krb5_keytype, keytype)
OLDDECLARG(krb5_keyblock *,keyblock)
OLDDECLARG(const krb5_data *,data)
if ( !(keyblock->contents = (krb5_octet *)malloc(sizeof(mit_des_cblock))) )
return(ENOMEM);
+ keyblock->magic = KV5M_KEYBLOCK;
+ keyblock->etype = eblock->crypto_entry->proto_enctype;
keyblock->keytype = KEYTYPE_DES;
keyblock->length = sizeof(mit_des_cblock);
key = keyblock->contents;