diff options
author | Greg Hudson <ghudson@mit.edu> | 2011-03-02 05:29:29 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2011-03-02 05:29:29 +0000 |
commit | ce6d249fdf1dd7dda5b202836ed387500324ae2a (patch) | |
tree | b0550b898743ddfdff76ac6647fca7a12d6db284 /src/include/k5-int.h | |
parent | e2d6d9ce23b878334d70a0f9c697064873619b75 (diff) | |
download | krb5-ce6d249fdf1dd7dda5b202836ed387500324ae2a.tar.gz krb5-ce6d249fdf1dd7dda5b202836ed387500324ae2a.tar.xz krb5-ce6d249fdf1dd7dda5b202836ed387500324ae2a.zip |
Consolidate almost all lib/crypto/krb headers into a single
crypto_int.h. In that header, define and document responsibilities
for crypto modules, some of which are satisfied through a
module-specific crypto_mod.h. In the OpenSSL and NSS modules, remove
many of the headers and sources providing functionality which isn't
needed by lib/crypto/krb any more (direct interfaces to MD4, MD5, and
SHA-1 hashing, as well as DES weak key testing). Change most
Makefile.ins to only include headers from lib/crypto/krb and
lib/crypto/$(CRYPTO_IMPL), instead of from many different directories.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24677 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include/k5-int.h')
-rw-r--r-- | src/include/k5-int.h | 94 |
1 files changed, 0 insertions, 94 deletions
diff --git a/src/include/k5-int.h b/src/include/k5-int.h index 779b25bdb..830abd5e0 100644 --- a/src/include/k5-int.h +++ b/src/include/k5-int.h @@ -643,61 +643,6 @@ struct krb5_key_st { void *cache; }; -/* new encryption provider api */ - -struct krb5_enc_provider { - /* keybytes is the input size to make_key; - keylength is the output size */ - size_t block_size, keybytes, keylength; - - krb5_error_code (*encrypt)(krb5_key key, const krb5_data *cipher_state, - krb5_crypto_iov *data, size_t num_data); - - krb5_error_code (*decrypt)(krb5_key key, const krb5_data *cipher_state, - krb5_crypto_iov *data, size_t num_data); - - /* May be NULL if the cipher is not used for a cbc-mac checksum. */ - krb5_error_code (*cbc_mac)(krb5_key key, const krb5_crypto_iov *data, - size_t num_data, const krb5_data *ivec, - krb5_data *output); - - krb5_error_code (*init_state)(const krb5_keyblock *key, - krb5_keyusage keyusage, - krb5_data *out_state); - krb5_error_code (*free_state)(krb5_data *state); - - /* May be NULL if there is no key-derived data cached. */ - void (*key_cleanup)(krb5_key key); -}; - -struct krb5_hash_provider { - char hash_name[8]; - size_t hashsize, blocksize; - - krb5_error_code (*hash)(const krb5_crypto_iov *data, size_t num_data, - krb5_data *output); -}; - -/* - * in here to deal with stuff from lib/crypto - */ - -void krb5int_nfold(unsigned int inbits, const unsigned char *in, - unsigned int outbits, unsigned char *out); - -krb5_error_code krb5int_hmac(const struct krb5_hash_provider *hash, - krb5_key key, const krb5_crypto_iov *data, - size_t num_data, krb5_data *output); - -krb5_error_code -krb5int_hmac_keyblock(const struct krb5_hash_provider *hash, - const krb5_keyblock *keyblock, - const krb5_crypto_iov *data, size_t num_data, - krb5_data *output); - -krb5_error_code krb5int_pbkdf2_hmac_sha1(const krb5_data *, unsigned long, - const krb5_data *, const krb5_data *); - /* These crypto functions are used by GSSAPI via the accessor. */ krb5_error_code @@ -757,21 +702,6 @@ zapfree(void *ptr, size_t len) } } -/* A definition of init_state for DES based encryption systems. - * sets up an 8-byte IV of all zeros - */ - -krb5_error_code -krb5int_des_init_state(const krb5_keyblock *key, krb5_keyusage keyusage, - krb5_data *new_state); - -/* - * normally to free a cipher_state you can just memset the length to zero and - * free it. - */ -krb5_error_code krb5int_default_free_state(krb5_data *state); - - /* * Combine two keys (normally used by the hardware preauth mechanism) */ @@ -790,13 +720,6 @@ krb5_error_code krb5int_c_copy_keyblock_contents(krb5_context context, const krb5_keyblock *from, krb5_keyblock *to); -/* - * Internal - for cleanup. - */ -extern void krb5int_prng_cleanup(void); -extern void krb5int_crypto_impl_cleanup(void); - - #ifdef KRB5_OLD_CRYPTO /* old provider api */ @@ -2603,10 +2526,6 @@ extern krb5_error_code krb5int_translate_gai_error(int); extern krb5_error_code krb5int_c_mandatory_cksumtype(krb5_context, krb5_enctype, krb5_cksumtype *); -extern int krb5int_crypto_init (void); -extern int krb5int_prng_init(void); -extern int krb5int_crypto_impl_init(void); - /* * Referral definitions, debugging hooks, and subfunctions. */ @@ -2621,19 +2540,6 @@ void krb5int_dbgref_dump_principal(char *, krb5_principal); krb5_error_code krb5int_clean_hostname(krb5_context, const char *, char *, size_t); -krb5_error_code -krb5int_aes_encrypt(krb5_key key, const krb5_data *ivec, krb5_crypto_iov *data, - size_t num_data); - -krb5_error_code -krb5int_aes_decrypt(krb5_key key, const krb5_data *ivec, krb5_crypto_iov *data, - size_t num_data); - -krb5_error_code -krb5int_camellia_cbc_mac(krb5_key key, const krb5_crypto_iov *data, - size_t num_data, const krb5_data *iv, - krb5_data *output); - #if 0 /* * There are no IANA assignments for these enctypes or cksumtypes yet. They |