krb5_c_block_size, krb5_c_decrypt, krb5_c_encrypt, krb5_c_encrypt_length, krb5_c_enctype_compare,
Contents
Description
The functions starting with krb5_c are compat functions with MIT kerberos.
The krb5_enc_data structure holds and encrypted data. There are two public accessible members of
krb5_enc_data. enctype that holds the encryption type of the data encrypted and ciphertext that is a
krb5_data that might contain the encrypted data.
krb5_c_block_size() returns the blocksize of the encryption type.
krb5_c_decrypt() decrypts input and store the data in output. If ivec is NULL the default initialization
vector for that encryption type will be used.
krb5_c_encrypt() encrypts the plaintext in input and store the ciphertext in output.
krb5_c_encrypt_length() returns the length the encrypted data given the plaintext length.
krb5_c_enctype_compare() compares to encryption types and returns if they use compatible encryption key
types.
krb5_c_make_checksum() creates a checksum cksum with the checksum type cksumtype of the data in data.
key and usage are used if the checksum is a keyed checksum type. Returns 0 or an error code.
krb5_c_verify_checksum() verifies the checksum of data in cksum that was created with key using the key
usage usage. verify is set to non-zero if the checksum verifies correctly and zero if not. Returns 0 or
an error code.
krb5_c_checksum_length() returns the length of the checksum.
krb5_c_set_checksum() sets the krb5_checksum structure given type and data. The content of cksum should
be freeed with krb5_c_free_checksum_contents().
krb5_c_get_checksum() retrieves the components of the krb5_checksum. structure. data should be free
with krb5_free_data(). If some either of data or checksum is not needed for the application, NULL can be
passed in.
krb5_c_valid_enctype() returns true if etype is a valid encryption type.
krb5_c_valid_cksumtype() returns true if ctype is a valid checksum type.
krb5_c_is_keyed_cksum() return true if ctype is a keyed checksum type.
krb5_c_is_coll_proof_cksum() returns true if ctype is a collision proof checksum type.
krb5_c_keylengths() return the minimum length (inlength) bytes needed to create a key and the length
(keylength) of the resulting key for the enctype.
Library
Kerberos 5 Library (libkrb5, -lkrb5)
Name
krb5_c_block_size, krb5_c_decrypt, krb5_c_encrypt, krb5_c_encrypt_length, krb5_c_enctype_compare,
krb5_c_get_checksum, krb5_c_is_coll_proof_cksum, krb5_c_is_keyed_cksum, krb5_c_keylength,
krb5_c_make_checksum, krb5_c_make_random_key, krb5_c_set_checksum, krb5_c_valid_cksumtype,
krb5_c_valid_enctype, krb5_c_verify_checksum, krb5_c_checksum_length — Kerberos 5 crypto API
See Also
krb5(3), krb5_create_checksum(3), krb5_free_data(3), kerberos(8) HEIMDAL Nov 17, 2006 KRB5_C_MAKE_CHECKSUM(3)
Synopsis
#include<krb5.h>krb5_error_codekrb5_c_block_size(krb5_contextcontext, krb5_enctypeenctype, size_t*blocksize);
krb5_error_codekrb5_c_decrypt(krb5_contextcontext, constkrb5_keyblockkey, krb5_keyusageusage, constkrb5_data*ivec,
krb5_enc_data*input, krb5_data*output);
krb5_error_codekrb5_c_encrypt(krb5_contextcontext, constkrb5_keyblock*key, krb5_keyusageusage,
constkrb5_data*ivec, constkrb5_data*input, krb5_enc_data*output);
krb5_error_codekrb5_c_encrypt_length(krb5_contextcontext, krb5_enctypeenctype, size_tinputlen, size_t*length);
krb5_error_codekrb5_c_enctype_compare(krb5_contextcontext, krb5_enctypee1, krb5_enctypee2, krb5_boolean*similar);
krb5_error_codekrb5_c_make_random_key(krb5_contextcontext, krb5_enctypeenctype, krb5_keyblock*random_key);
krb5_error_codekrb5_c_make_checksum(krb5_contextcontext, krb5_cksumtypecksumtype, constkrb5_keyblock*key,
krb5_keyusageusage, constkrb5_data*input, krb5_checksum*cksum);
krb5_error_codekrb5_c_verify_checksum(krb5_contextcontext, constkrb5_keyblock*key, krb5_keyusageusage,
constkrb5_data*data, constkrb5_checksum*cksum, krb5_boolean*valid);
krb5_error_codekrb5_c_checksum_length(krb5_contextcontext, krb5_cksumtypecksumtype, size_t*length);
krb5_error_codekrb5_c_get_checksum(krb5_contextcontext, constkrb5_checksum*cksum, krb5_cksumtype*type,
krb5_data**data);
krb5_error_codekrb5_c_set_checksum(krb5_contextcontext, krb5_checksum*cksum, krb5_cksumtypetype,
constkrb5_data*data);
krb5_booleankrb5_c_valid_enctype(krb5_enctype, etype");
krb5_booleankrb5_c_valid_cksumtype(krb5_cksumtypectype);
krb5_booleankrb5_c_is_coll_proof_cksum(krb5_cksumtypectype);
krb5_booleankrb5_c_is_keyed_cksum(krb5_cksumtypectype);
krb5_error_codekrb5_c_keylengths(krb5_contextcontext, krb5_enctypeenctype, size_t*inlength, size_t*keylength);
