* k5-int.h (krb5int_zap_data, zap): New macros; call memset with
volatile cast for now.
+ (struct krb5_enc_provider, struct krb5_hash_provider, struct
+ krb5_keyhash_provider): Use numeric values for block size,
+ key size, hash size, etc, instead of function pointers.
2003-07-21 Alexandra Ellwood <lxs@mit.edu>
/* new encryption provider api */
struct krb5_enc_provider {
- void (*block_size) (size_t *output);
-
/* keybytes is the input size to make_key;
keylength is the output size */
- void (*keysize) (size_t *keybytes, size_t *keylength);
+ size_t block_size, keybytes, keylength;
/* cipher-state == 0 fresh state thrown away at end */
krb5_error_code (*encrypt) (const krb5_keyblock *key,
};
struct krb5_hash_provider {
- void (*hash_size) (size_t *output);
-
- void (*block_size) (size_t *output);
+ size_t hashsize, blocksize;
/* this takes multiple inputs to avoid lots of copying. */
krb5_error_code (*hash) (unsigned int icount, const krb5_data *input,
};
struct krb5_keyhash_provider {
- void (*hash_size) (size_t *output);
+ size_t hashsize;
krb5_error_code (*hash) (const krb5_keyblock *key,
krb5_keyusage keyusage,
-2003-07-13 Kenneth Raeburn <raeburn@mit.edu>
+2003-07-22 Ken Raeburn <raeburn@mit.edu>
+
+ * block_size.c (krb5_c_block_size): Read new numeric fields for
+ key/block/hash sizes instead of calling functions.
+ * checksum_length.c (krb5_c_checksum_length): Likewise.
+ * combine_keys.c (krb5int_c_combine_keys, dr): Likewise.
+ * hmac.c (krb5_hmac): Likewise.
+ * make_checksum.c (krb5_c_make_checksum): Likewise.
+ * make_random_key.c (krb5_c_make_random_key): Likewise.
+ * pbkdf2.c (hmac1): Likewise.
+ * string_to_key.c (krb5_c_string_to_key_with_params): Likewise.
+ * t_hmac.c (hmac1): Likewise.
+
+2003-07-13 Ken Raeburn <raeburn@mit.edu>
* pbkdf2.c (foo): Never call com_err.
+2003-07-22 Ken Raeburn <raeburn@mit.edu>
+
+ * arcfour.c (krb5_arcfour_encrypt_length, krb5_arcfour_encrypt,
+ krb5_arcfour_decrypt): Use new numeric fields for block/hash/key
+ sizes instead of calling functions.
+
2003-07-17 Ken Raeburn <raeburn@mit.edu>
* Makefile.in (LIBNAME) [##WIN16##]: Don't define.
{
size_t blocksize, hashsize;
- (*(enc->block_size))(&blocksize);
- (*(hash->hash_size))(&hashsize);
-
+ blocksize = enc->block_size;
+ hashsize = hash->hashsize;
/* checksum + (confounder + inputlen, in even blocksize) */
*length = hashsize + krb5_roundup(8 + inputlen, blocksize);
size_t keylength, keybytes, blocksize, hashsize;
krb5_error_code ret;
- (*(enc->block_size))(&blocksize);
- (*(enc->keysize))(&keybytes, &keylength);
- (*(hash->hash_size))(&hashsize);
+ blocksize = enc->block_size;
+ keybytes = enc->keybytes;
+ keylength = enc->keylength;
+ hashsize = hash->hashsize;
d1.length=keybytes;
d1.data=malloc(d1.length);
size_t keybytes, keylength, hashsize, blocksize;
krb5_error_code ret;
- (*(enc->block_size))(&blocksize);
- (*(enc->keysize))(&keybytes, &keylength);
- (*(hash->hash_size))(&hashsize);
+ blocksize = enc->block_size;
+ keybytes = enc->keybytes;
+ keylength = enc->keylength;
+ hashsize = hash->hashsize;
d1.length=keybytes;
d1.data=malloc(d1.length);
if (i == krb5_enctypes_length)
return(KRB5_BAD_ENCTYPE);
- (*(krb5_enctypes_list[i].enc->block_size))(blocksize);
+ *blocksize = krb5_enctypes_list[i].enc->block_size;
return(0);
}
return(KRB5_BAD_ENCTYPE);
if (krb5_cksumtypes_list[i].keyhash)
- (*(krb5_cksumtypes_list[i].keyhash->hash_size))(length);
+ *length = krb5_cksumtypes_list[i].keyhash->hashsize;
else if (krb5_cksumtypes_list[i].trunc_size)
*length = krb5_cksumtypes_list[i].trunc_size;
else
- (*(krb5_cksumtypes_list[i].hash->hash_size))(length);
+ *length = krb5_cksumtypes_list[i].hash->hashsize;
return(0);
}
enc = krb5_enctypes_list[i].enc;
- (*(enc->keysize))(&keybytes, &keylength);
+ keybytes = enc->keybytes;
+ keylength = enc->keylength;
/*
* Allocate and set up buffers
unsigned char *inblockdata, *outblockdata;
krb5_data inblock, outblock;
- (*(enc->block_size))(&blocksize);
- (*(enc->keysize))(&keybytes, &keylength);
+ blocksize = enc->block_size;
+ keybytes = enc->keybytes;
+ keylength = enc->keylength;
/* allocate and set up buffers */
+2003-07-22 Ken Raeburn <raeburn@mit.edu>
+
+ * checksum.c (krb5_dk_make_checksum, krb5_marc_dk_make_checksum):
+ Use new numeric fields for key/bolck sizes instead of calling
+ functions.
+ * derive.c (krb5_derive_key, krb5_derive_random): Likewise.
+ * dk_decrypt.c (krb5_dk_decrypt_maybe_trunc_hmac,
+ krb5_marc_dk_decrypt): Likewise.
+ * dk_encrypt.c (krb5_dk_encrypt_length, krb5_dk_encrypt,
+ krb5int_aes_encrypt_length, trunc_hmac, krb5int_aes_dk_encrypt,
+ krb5_marc_dk_encrypt_length, krb5_mark_dk_encrypt): Likewise.
+ * stringtokey.c (krb5int_dk_string_to_key): Likewise.
+
2003-07-17 Ken Raeburn <raeburn@mit.edu>
* Makefile.in (LIBNAME) [##WIN16##]: Don't define.
/* allocate and set to-be-derived keys */
- (*(enc->block_size))(&blocksize);
- (*(enc->keysize))(&keybytes, &keylength);
+ blocksize = enc->block_size;
+ keybytes = enc->keybytes;
+ keylength = enc->keylength;
/* key->length will be tested in enc->encrypt
output->length will be tested in krb5_hmac */
/* allocate and set to-be-derived keys */
- (*(enc->block_size))(&blocksize);
- (*(enc->keysize))(&keybytes, &keylength);
+ blocksize = enc->block_size;
+ keybytes = enc->keybytes;
+ keylength = enc->keylength;
/* key->length will be tested in enc->encrypt
output->length will be tested in krb5_hmac */
unsigned char *inblockdata, *outblockdata, *rawkey;
krb5_data inblock, outblock;
- (*(enc->block_size))(&blocksize);
- (*(enc->keysize))(&keybytes, &keylength);
+ blocksize = enc->block_size;
+ keybytes = enc->keybytes;
+ keylength = enc->keylength;
if ((inkey->length != keylength) ||
(outkey->length != keylength))
unsigned char *inblockdata, *outblockdata, *rawkey;
krb5_data inblock, outblock;
- (*(enc->block_size))(&blocksize);
- (*(enc->keysize))(&keybytes, &keylength);
+ blocksize = enc->block_size;
+ keybytes = enc->keybytes;
+ keylength = enc->keylength;
if ((inkey->length != keylength) ||
(outrnd->length != keybytes))
/* allocate and set up ciphertext and to-be-derived keys */
- (*(hash->hash_size))(&hashsize);
- (*(enc->block_size))(&blocksize);
- (*(enc->keysize))(&keybytes, &keylength);
+ hashsize = hash->hashsize;
+ blocksize = enc->block_size;
+ keybytes = enc->keybytes;
+ keylength = enc->keylength;
if (hmacsize == 0)
hmacsize = hashsize;
/* allocate and set up ciphertext and to-be-derived keys */
- (*(hash->hash_size))(&hashsize);
- (*(enc->block_size))(&blocksize);
- (*(enc->keysize))(&keybytes, &keylength);
+ hashsize = hash->hashsize;
+ blocksize = enc->block_size;
+ keybytes = enc->keybytes;
+ keylength = enc->keylength;
enclen = input->length - hashsize;
{
size_t blocksize, hashsize;
- (*(enc->block_size))(&blocksize);
- (*(hash->hash_size))(&hashsize);
-
+ blocksize = enc->block_size;
+ hashsize = hash->hashsize;
*length = krb5_roundup(blocksize+inputlen, blocksize) + hashsize;
}
/* allocate and set up plaintext and to-be-derived keys */
- (*(enc->block_size))(&blocksize);
- (*(enc->keysize))(&keybytes, &keylength);
+ blocksize = enc->block_size;
+ keybytes = enc->keybytes;
+ keylength = enc->keylength;
plainlen = krb5_roundup(blocksize+input->length, blocksize);
krb5_dk_encrypt_length(enc, hash, input->length, &enclen);
{
size_t blocksize, hashsize;
- (*(enc->block_size))(&blocksize);
+ blocksize = enc->block_size;
hashsize = 96 / 8;
/* No roundup, since CTS requires no padding once we've hit the
krb5_data tmp;
krb5_error_code ret;
- (hash->hash_size)(&hashsize);
+ hashsize = hash->hashsize;
if (hashsize < output->length)
return KRB5_CRYPTO_INTERNAL;
tmp.length = hashsize;
/* allocate and set up plaintext and to-be-derived keys */
- (*(enc->block_size))(&blocksize);
- (*(enc->keysize))(&keybytes, &keylength);
+ blocksize = enc->block_size;
+ keybytes = enc->keybytes;
+ keylength = enc->keylength;
plainlen = blocksize+input->length;
krb5int_aes_encrypt_length(enc, hash, input->length, &enclen);
{
size_t blocksize, hashsize;
- (*(enc->block_size))(&blocksize);
- (*(hash->hash_size))(&hashsize);
-
+ blocksize = enc->block_size;
+ hashsize = hash->hashsize;
*length = krb5_roundup(blocksize+4+inputlen, blocksize) + hashsize;
}
/* allocate and set up plaintext and to-be-derived keys */
- (*(enc->block_size))(&blocksize);
- (*(enc->keysize))(&keybytes, &keylength);
+ blocksize = enc->block_size;
+ keybytes = enc->keybytes;
+ keylength = enc->keylength;
plainlen = krb5_roundup(blocksize+4+input->length, blocksize);
krb5_marc_dk_encrypt_length(enc, hash, input->length, &enclen);
/* key->length is checked by krb5_derive_key */
- (*(enc->keysize))(&keybytes, &keylength);
+ keybytes = enc->keybytes;
+ keylength = enc->keylength;
concatlen = string->length+(salt?salt->length:0);
2003-07-22 Ken Raeburn <raeburn@mit.edu>
+ * aes.c (aes_block_size, aes128_keysize, aes256_keysize):
+ Deleted.
+ (krb5int_enc_aes128, krb5int_enc_aes256): Updated.
+ * arcfour.c (k5_arcfour_blocksize, k5_arcfour_keysize): Deleted.
+ (krb5int_enc_arcfour): Updated.
+ * des.c (k5_des_block_size, k5_des_keysize): Deleted.
+ (krb5int_enc_des): Updated.
+ * des3.c (k5_des3_block_size, k5_des3_keysize): Deleted.
+ (krb5int_enc_des3): Updated.
+
* des3.c (validate_and_schedule): Split out from old
k5_des3_docrypt.
(k5_des3_encrypt, k5_des3_decrypt): Call it, and
#include "enc_provider.h"
#include "aes.h"
-static void
-aes_block_size(size_t *blocksize)
-{
- *blocksize = 16;
-}
-
-static void
-aes128_keysize(size_t *keybytes, size_t *keylength)
-{
- *keybytes = *keylength = 16;
-}
-
-static void
-aes256_keysize(size_t *keybytes, size_t *keylength)
-{
- *keybytes = *keylength = 32;
-}
-
#if 0
aes_rval aes_blk_len(unsigned int blen, aes_ctx cx[1]);
aes_rval aes_enc_key(const unsigned char in_key[], unsigned int klen, aes_ctx cx[1]);
}
const struct krb5_enc_provider krb5int_enc_aes128 = {
- aes_block_size,
- aes128_keysize,
+ 16,
+ 16, 16,
krb5int_aes_encrypt,
krb5int_aes_decrypt,
k5_aes_make_key,
};
const struct krb5_enc_provider krb5int_enc_aes256 = {
- aes_block_size,
- aes256_keysize,
+ 16,
+ 32, 32,
krb5int_aes_encrypt,
krb5int_aes_decrypt,
k5_aes_make_key,
k5_arcfour_docrypt(const krb5_keyblock *, const krb5_data *,
const krb5_data *, krb5_data *);
-
-/* The blocksize for the enctype */
-static void k5_arcfour_blocksize(size_t *);
-
-/* keysize for the enctype (number of bytes, and length of key (parity/etc) */
-static void k5_arcfour_keysize(size_t *, size_t *);
-
/* from a random bitstrem, construct a key */
static krb5_error_code
k5_arcfour_make_key(const krb5_data *, krb5_keyblock *);
return 0;
}
-/* This seems to work... although I am not sure what the implications are
- in other places in the kerberos library */
-static void
-k5_arcfour_blocksize(size_t *blocksize)
-{
- *blocksize = 1;
-}
-
-/* Keysize is arbitrary in arcfour, but the constraints of the system, and
- to attempt to work with the MSFT system forces us to 16byte/128bit.
- Since there is no parity in the key, the byte and length are the same.
-*/
-static void
-k5_arcfour_keysize(size_t *keybytes, size_t *keylength)
-{
- *keybytes = 16;
- *keylength = 16;
-}
/* The workhorse of the arcfour system, this impliments the cipher */
static krb5_error_code
we just call "docrypt" directly
*/
const struct krb5_enc_provider krb5int_enc_arcfour = {
- k5_arcfour_blocksize,
- k5_arcfour_keysize,
+ /* This seems to work... although I am not sure what the
+ implications are in other places in the kerberos library */
+ 1,
+ /* Keysize is arbitrary in arcfour, but the constraints of the
+ system, and to attempt to work with the MSFT system forces us
+ to 16byte/128bit. Since there is no parity in the key, the
+ byte and length are the same. */
+ 16, 16,
k5_arcfour_docrypt,
k5_arcfour_docrypt,
k5_arcfour_make_key,
static const mit_des_cblock mit_des_zeroblock[8] /* = all zero */;
-static void
-k5_des_block_size(size_t *blocksize)
-{
- *blocksize = 8;
-}
-
-static void
-k5_des_keysize(size_t *keybytes, size_t *keylength)
-{
- *keybytes = 7;
- *keylength = 8;
-}
-
static krb5_error_code
k5_des_docrypt(const krb5_keyblock *key, const krb5_data *ivec,
const krb5_data *input, krb5_data *output, int enc)
}
const struct krb5_enc_provider krb5int_enc_des = {
- k5_des_block_size,
- k5_des_keysize,
+ 8,
+ 7, 8,
k5_des_encrypt,
k5_des_decrypt,
k5_des_make_key,
static const mit_des_cblock mit_des_zeroblock[8] /* = all zero */;
-static void
-k5_des3_block_size(size_t *blocksize)
-{
- *blocksize = 8;
-}
-
-static void
-k5_des3_keysize(size_t *keybytes, size_t *keylength)
-{
- *keybytes = 21;
- *keylength = 24;
-}
-
static krb5_error_code
validate_and_schedule(const krb5_keyblock *key, const krb5_data *ivec,
const krb5_data *input, const krb5_data *output,
}
const struct krb5_enc_provider krb5int_enc_des3 = {
- k5_des3_block_size,
- k5_des3_keysize,
+ 8,
+ 21, 24,
k5_des3_encrypt,
k5_des3_decrypt,
k5_des3_make_key,
+2003-07-22 Ken Raeburn <raeburn@mit.edu>
+
+ * hash_crc32.c (k5_crc32_hash_size, k5_crc32_block_size):
+ Deleted.
+ (krb5int_hash_crc32): Updated.
+ * hash_md4.c (k5_md4_hash_size, k5_md4_block_size): Deleted.
+ (krb5int_hash_md4): Updated.
+ * hash_md5.c (k5_md5_hash_size, k5_md5_block_size): Deleted.
+ (krb5int_hash_md5): Updated.
+ * hash_sha1.c (k5_sha1_hash_size, k5_sha1_block_size): Deleted.
+ (krb5int_hash_sha1): Updated.
+
2003-07-17 Ken Raeburn <raeburn@mit.edu>
* Makefile.in (LIBNAME) [##WIN16##]: Don't define.
#include "crc-32.h"
#include "hash_provider.h"
-static void
-k5_crc32_hash_size(size_t *output)
-{
- *output = CRC32_CKSUM_LENGTH;
-}
-
-static void
-k5_crc32_block_size(size_t *output)
-{
- *output = 1;
-}
-
static krb5_error_code
k5_crc32_hash(unsigned int icount, const krb5_data *input,
krb5_data *output)
}
const struct krb5_hash_provider krb5int_hash_crc32 = {
- k5_crc32_hash_size,
- k5_crc32_block_size,
+ CRC32_CKSUM_LENGTH,
+ 1,
k5_crc32_hash
};
#include "rsa-md4.h"
#include "hash_provider.h"
-static void
-k5_md4_hash_size(size_t *output)
-{
- *output = RSA_MD4_CKSUM_LENGTH;
-}
-
-static void
-k5_md4_block_size(size_t *output)
-{
- *output = 64;
-}
-
static krb5_error_code
k5_md4_hash(unsigned int icount, const krb5_data *input,
krb5_data *output)
}
const struct krb5_hash_provider krb5int_hash_md4 = {
- k5_md4_hash_size,
- k5_md4_block_size,
+ RSA_MD4_CKSUM_LENGTH,
+ 64,
k5_md4_hash
};
#include "rsa-md5.h"
#include "hash_provider.h"
-static void
-k5_md5_hash_size(size_t *output)
-{
- *output = RSA_MD5_CKSUM_LENGTH;
-}
-
-static void
-k5_md5_block_size(size_t *output)
-{
- *output = 64;
-}
-
static krb5_error_code
k5_md5_hash(unsigned int icount, const krb5_data *input,
krb5_data *output)
}
const struct krb5_hash_provider krb5int_hash_md5 = {
- k5_md5_hash_size,
- k5_md5_block_size,
+ RSA_MD5_CKSUM_LENGTH,
+ 64,
k5_md5_hash
};
#include "shs.h"
#include "hash_provider.h"
-static void
-k5_sha1_hash_size(size_t *output)
-{
- *output = SHS_DIGESTSIZE;
-}
-
-static void
-k5_sha1_block_size(size_t *output)
-{
- *output = SHS_DATASIZE;
-}
-
static krb5_error_code
k5_sha1_hash(unsigned int icount, const krb5_data *input,
krb5_data *output)
}
const struct krb5_hash_provider krb5int_hash_sha1 = {
- k5_sha1_hash_size,
- k5_sha1_block_size,
+ SHS_DIGESTSIZE,
+ SHS_DATASIZE,
k5_sha1_hash
};
krb5_data *hashin, hashout;
krb5_error_code ret;
- (*(hash->hash_size))(&hashsize);
- (*(hash->block_size))(&blocksize);
+ hashsize = hash->hashsize;
+ blocksize = hash->blocksize;
if (key->length > blocksize)
return(KRB5_CRYPTO_INTERNAL);
+2003-07-22 Ken Raeburn <raeburn@mit.edu>
+
+ * descbc.c (k5_descbc_hash_size): Deleted.
+ (krb5int_keyhash_descbc): Updated.
+ * hmac_md5.c (k5_hmac_md5_hash_size): Deleted.
+ (krb5int_keyhash_hmac_md5): Updated.
+ * k5_md4des.c (k5_md4des_hash_size): Deleted.
+ (krb5int_keyhash_md4des): Updated.
+ * k5_md5des.c (k5_md5des_hash_size): Deleted.
+ (krb5int_keyhash_md5des): Updated.
+ * t_cksum.c (main): Use the hashsize field instead of calling a
+ function.
+
2003-07-17 Ken Raeburn <raeburn@mit.edu>
* Makefile.in (LIBNAME) [##WIN16##]: Don't define.
static const mit_des_cblock mit_des_zeroblock[8] /* = all zero */;
-static void
-k5_descbc_hash_size(size_t *output)
-{
- *output = 8;
-}
-
static krb5_error_code
k5_descbc_hash(const krb5_keyblock *key, krb5_keyusage usage, const krb5_data *ivec,
const krb5_data *input, krb5_data *output)
}
const struct krb5_keyhash_provider krb5int_keyhash_descbc = {
- k5_descbc_hash_size,
+ 8,
k5_descbc_hash,
NULL
};
#include "rsa-md5.h"
#include "hash_provider.h"
-static void
-k5_hmac_md5_hash_size (size_t *output)
-{
- *output = 16;
-}
-
static krb5_error_code
k5_hmac_md5_hash (const krb5_keyblock *key, krb5_keyusage usage,
const krb5_data *iv,
const struct krb5_keyhash_provider krb5int_keyhash_hmac_md5 = {
- k5_hmac_md5_hash_size,
+ 16,
k5_hmac_md5_hash,
NULL /*checksum again*/
};
static const mit_des_cblock mit_des_zeroblock[8] /* = all zero */;
-static void
-k5_md4des_hash_size(size_t *output)
-{
- *output = CONFLENGTH+RSA_MD4_CKSUM_LENGTH;
-}
-
/* des-cbc(xorkey, conf | rsa-md4(conf | data)) */
/* this could be done in terms of the md4 and des providers, but
}
const struct krb5_keyhash_provider krb5int_keyhash_md4des = {
- k5_md4des_hash_size,
+ CONFLENGTH+RSA_MD4_CKSUM_LENGTH,
k5_md4des_hash,
k5_md4des_verify
};
static const mit_des_cblock mit_des_zeroblock[8] /* = all zero */;
-static void
-k5_md5des_hash_size(size_t *output)
-{
- *output = CONFLENGTH+RSA_MD5_CKSUM_LENGTH;
-}
-
/* des-cbc(xorkey, conf | rsa-md5(conf | data)) */
/* this could be done in terms of the md5 and des providers, but
}
const struct krb5_keyhash_provider krb5int_keyhash_md5des = {
- k5_md5des_hash_size,
+ CONFLENGTH+RSA_MD5_CKSUM_LENGTH,
k5_md5des_hash,
k5_md5des_verify
};
keyblock.length = sizeof(testkey);
keyblock.contents = testkey;
- (*(khp.hash_size))(&length);
+ length = khp.hashsize;
newstyle_checksum.length = length;
return(KRB5_BAD_ENCTYPE);
if (krb5_cksumtypes_list[i].keyhash)
- (*(krb5_cksumtypes_list[i].keyhash->hash_size))(&cksumlen);
+ cksumlen = krb5_cksumtypes_list[i].keyhash->hashsize;
else
- (*(krb5_cksumtypes_list[i].hash->hash_size))(&cksumlen);
+ cksumlen = krb5_cksumtypes_list[i].hash->hashsize;
cksum->length = cksumlen;
enc = krb5_enctypes_list[i].enc;
- (*(enc->keysize))(&keybytes, &keylength);
+ keybytes = enc->keybytes;
+ keylength = enc->keylength;
if ((bytes = (unsigned char *) malloc(keybytes)) == NULL)
return(ENOMEM);
+2003-07-22 Ken Raeburn <raeburn@mit.edu>
+
+ * old_decrypt.c (krb5_old_decrypt): Use block_size and hashsize
+ fields instead of calling functions.
+ * old_encrypt.c (krb5_old_encrypt_length, krb5_old_encrypt):
+ Likewise.
+
2003-07-17 Ken Raeburn <raeburn@mit.edu>
* Makefile.in (LIBNAME) [##WIN16##]: Don't define.
krb5_data output, cksum, crcivec;
int alloced;
- (*(enc->block_size))(&blocksize);
- (*(hash->hash_size))(&hashsize);
+ blocksize = enc->block_size;
+ hashsize = hash->hashsize;
plainsize = input->length - blocksize - hashsize;
{
size_t blocksize, hashsize;
- (*(enc->block_size))(&blocksize);
- (*(hash->hash_size))(&hashsize);
+ blocksize = enc->block_size;
+ hashsize = hash->hashsize;
*length = krb5_roundup(blocksize+hashsize+inputlen, blocksize);
}
krb5_data datain, crcivec;
int real_ivec;
- (*(enc->block_size))(&blocksize);
- (*(hash->hash_size))(&hashsize);
+ blocksize = enc->block_size;
+ hashsize = hash->hashsize;
krb5_old_encrypt_length(enc, hash, input->length, &enclen);
if (debug_hmac)
printk(" test key", key);
- h->block_size(&blocksize);
- h->hash_size(&hashsize);
+ blocksize = h->blocksize;
+ hashsize = h->hashsize;
if (hashsize > sizeof(tmp))
abort();
if (key->length > blocksize) {
+2003-07-22 Ken Raeburn <raeburn@mit.edu>
+
+ * raw_encrypt.c (krb5_raw_encrypt_length): Use block_size field
+ instead of calling a function.
+
2003-07-17 Ken Raeburn <raeburn@mit.edu>
* Makefile.in (LIBNAME) [##WIN16##]: Don't define.
{
size_t blocksize;
- (*(enc->block_size))(&blocksize);
+ blocksize = enc->block_size;
*length = krb5_roundup(inputlen, blocksize);
}
}
}
-
- (*(enc->keysize))(&keybytes, &keylength);
+ keybytes = enc->keybytes;
+ keylength = enc->keylength;
if ((key->contents = (krb5_octet *) malloc(keylength)) == NULL)
return(ENOMEM);
krb5_error_code err;
printk(" test key", key);
- h->block_size(&blocksize);
- h->hash_size(&hashsize);
+ blocksize = h->blocksize;
+ hashsize = h->hashsize;
if (hashsize > sizeof(tmp))
abort();
if (key->length > blocksize) {
+2003-07-22 Ken Raeburn <raeburn@mit.edu>
+
+ * ycipher.c (krb5int_yarrow_cipher_init): Use keybytes and
+ keylength fields instead of calling a function.
+
2003-07-17 Ken Raeburn <raeburn@mit.edu>
* Makefile.in (LIBNAME) [##WIN16##]: Don't define.
const struct krb5_enc_provider *enc = &yarrow_enc_provider;
krb5_error_code ret;
krb5_data randombits;
- enc->keysize (&keybytes, &keylength);
+ keybytes = enc->keybytes;
+ keylength = enc->keylength;
assert (keybytes == CIPHER_KEY_SIZE);
if (ctx->key.contents) {
memset (ctx->key.contents, 0, ctx->key.length);