size_t hashsize;
krb5_error_code (*hash)(krb5_key key, krb5_keyusage keyusage,
- const krb5_data *ivec, const krb5_data *input,
- krb5_data *output);
+ const krb5_data *input, krb5_data *output);
krb5_error_code (*verify)(krb5_key key, krb5_keyusage keyusage,
- const krb5_data *ivec, const krb5_data *input,
- const krb5_data *hash, krb5_boolean *valid);
+ const krb5_data *input, const krb5_data *hash,
+ krb5_boolean *valid);
krb5_error_code (*hash_iov)(krb5_key key, krb5_keyusage keyusage,
- const krb5_data *ivec,
const krb5_crypto_iov *data, size_t num_data,
krb5_data *output);
krb5_error_code (*verify_iov)(krb5_key key, krb5_keyusage keyusage,
- const krb5_data *ivec,
const krb5_crypto_iov *data,
size_t num_data, const krb5_data *hash,
krb5_boolean *valid);
plaintext.length = strlen(argv[msgindex]);
plaintext.data = argv[msgindex];
- if ((kret = (*(khp.hash))(key, 0, 0, &plaintext, &newstyle_checksum))) {
+ if ((kret = (*(khp.hash))(key, 0, &plaintext, &newstyle_checksum))) {
printf("krb5_calculate_checksum choked with %d\n", kret);
break;
}
print_checksum("correct", MD, argv[msgindex], &newstyle_checksum);
- if ((kret = (*(khp.verify))(key, 0, 0, &plaintext, &newstyle_checksum,
+ if ((kret = (*(khp.verify))(key, 0, &plaintext, &newstyle_checksum,
&valid))) {
printf("verify on new checksum choked with %d\n", kret);
break;
printf("Verify succeeded for \"%s\"\n", argv[msgindex]);
newstyle_checksum.data[0]++;
- if ((kret = (*(khp.verify))(key, 0, 0, &plaintext, &newstyle_checksum,
+ if ((kret = (*(khp.verify))(key, 0, &plaintext, &newstyle_checksum,
&valid))) {
printf("verify on new checksum choked with %d\n", kret);
break;
kret = 1;
break;
}
- if ((kret = (*(khp.verify))(key, 0, 0, &plaintext, &knowncksum_dat,
+ if ((kret = (*(khp.verify))(key, 0, &plaintext, &knowncksum_dat,
&valid))) {
printf("verify on known checksum choked with %d\n", kret);
break;
if (cksum_type->keyhash->hash_iov == NULL)
return KRB5_BAD_ENCTYPE;
- ret = cksum_type->keyhash->hash_iov(key, usage, 0, data, num_data,
+ ret = cksum_type->keyhash->hash_iov(key, usage, data, num_data,
cksum_data);
} else if (cksum_type->flags & KRB5_CKSUMFLAG_DERIVE) {
ret = krb5int_dk_make_checksum(cksum_type->hash, key, usage, data,
#include "keyhash_provider.h"
static krb5_error_code
-k5_descbc_hash(krb5_key key, krb5_keyusage usage, const krb5_data *ivec,
- const krb5_data *input, krb5_data *output)
+k5_descbc_hash(krb5_key key, krb5_keyusage usage, const krb5_data *input,
+ krb5_data *output)
{
mit_des_key_schedule schedule;
return(KRB5_BAD_KEYSIZE);
if ((input->length%8) != 0)
return(KRB5_BAD_MSIZE);
- if (ivec && (ivec->length != 8))
- return(KRB5_CRYPTO_INTERNAL);
if (output->length != 8)
return(KRB5_CRYPTO_INTERNAL);
mit_des_cbc_cksum((unsigned char *) input->data,
(unsigned char *) output->data, input->length,
schedule,
- ivec? (const unsigned char *)ivec->data:
(const unsigned char *)mit_des_zeroblock);
memset(schedule, 0, sizeof(schedule));
#include "../aead.h"
static krb5_error_code
-k5_hmac_md5_hash(krb5_key key, krb5_keyusage usage, const krb5_data *iv,
- const krb5_data *input, krb5_data *output)
+k5_hmac_md5_hash(krb5_key key, krb5_keyusage usage, const krb5_data *input,
+ krb5_data *output)
{
krb5_keyusage ms_usage;
krb5_error_code ret;
}
static krb5_error_code
-k5_hmac_md5_hash_iov(krb5_key key, krb5_keyusage usage, const krb5_data *iv,
+k5_hmac_md5_hash_iov(krb5_key key, krb5_keyusage usage,
const krb5_crypto_iov *data, size_t num_data,
krb5_data *output)
{
}
static krb5_error_code
-k5_md4des_hash(krb5_key key, krb5_keyusage usage, const krb5_data *ivec,
- const krb5_data *input, krb5_data *output)
+k5_md4des_hash(krb5_key key, krb5_keyusage usage, const krb5_data *input,
+ krb5_data *output)
{
krb5_error_code ret;
krb5_data data;
static krb5_error_code
k5_md4des_verify(krb5_key key, krb5_keyusage usage,
- const krb5_data *ivec,
const krb5_data *input, const krb5_data *hash,
krb5_boolean *valid)
{
}
static krb5_error_code
-k5_md5des_hash(krb5_key key, krb5_keyusage usage, const krb5_data *ivec,
- const krb5_data *input, krb5_data *output)
+k5_md5des_hash(krb5_key key, krb5_keyusage usage, const krb5_data *input,
+ krb5_data *output)
{
krb5_error_code ret;
krb5_data data;
}
static krb5_error_code
-k5_md5des_verify(krb5_key key, krb5_keyusage usage, const krb5_data *ivec,
- const krb5_data *input, const krb5_data *hash,
- krb5_boolean *valid)
+k5_md5des_verify(krb5_key key, krb5_keyusage usage, const krb5_data *input,
+ const krb5_data *hash, krb5_boolean *valid)
{
krb5_error_code ret;
krb5_MD5_CTX ctx;
#include "hash_provider.h"
static krb5_error_code
-k5_md5_hmac_hash(krb5_key key, krb5_keyusage usage, const krb5_data *iv,
- const krb5_data *input, krb5_data *output)
+k5_md5_hmac_hash(krb5_key key, krb5_keyusage usage, const krb5_data *input,
+ krb5_data *output)
{
krb5_keyusage ms_usage;
krb5_MD5_CTX ctx;
keyhash = ctp->keyhash;
if (keyhash->hash == NULL) {
assert(keyhash->hash_iov != NULL);
- ret = (*keyhash->hash_iov)(key, usage, 0, &iov, 1, &data);
+ ret = (*keyhash->hash_iov)(key, usage, &iov, 1, &data);
} else {
- ret = (*keyhash->hash)(key, usage, 0, input, &data);
+ ret = (*keyhash->hash)(key, usage, input, &data);
}
} else if (ctp->flags & KRB5_CKSUMFLAG_DERIVE) {
ret = krb5int_dk_make_checksum(ctp->hash, key, usage, &iov, 1, &data);
iov[0].data.data = data->data;
iov[0].data.length = data->length;
- return (*keyhash->verify_iov)(key, usage, 0, iov, 1, &indata,
- valid);
+ return (*keyhash->verify_iov)(key, usage, iov, 1, &indata, valid);
} else if (keyhash->verify != NULL) {
- return (*keyhash->verify)(key, usage, 0, data, &indata, valid);
+ return (*keyhash->verify)(key, usage, data, &indata, valid);
}
}
/* If there's actually a verify function, call it. */
if (ctp->keyhash && ctp->keyhash->verify_iov) {
- return (*ctp->keyhash->verify_iov)(key, usage, 0, data, num_data,
+ return (*ctp->keyhash->verify_iov)(key, usage, data, num_data,
&checksum->data, valid);
}