krb5_generate_random_keyblock

Langue: en

Version: 271386 (debian - 07/07/09)

Section: 3 (Bibliothèques de fonctions)


BSD mandoc
HEIMDAL

NAME

krb5_keyblock krb5_keyblock_get_enctype krb5_copy_keyblock krb5_copy_keyblock_contents krb5_free_keyblock krb5_free_keyblock_contents krb5_generate_random_keyblock krb5_generate_subkey krb5_generate_subkey_extended krb5_keyblock_init krb5_keyblock_zero krb5_random_to_key - Kerberos 5 key handling functions

LIBRARY

Kerberos 5 Library (libkrb5, -lkrb5)

SYNOPSIS

In krb5.h

krb5_keyblock Ft krb5_enctype Fo krb5_keyblock_get_enctype Fa const krb5_keyblock *block Fc Ft krb5_error_code Fo krb5_copy_keyblock Fa krb5_context context Fa krb5_keyblock **to Fc Ft krb5_error_code Fo krb5_copy_keyblock_contents Fa krb5_context context Fa const krb5_keyblock *inblock Fa krb5_keyblock *to Fc Ft void Fo krb5_free_keyblock Fa krb5_context context Fa krb5_keyblock *keyblock Fc Ft void Fo krb5_free_keyblock_contents Fa krb5_context context Fa krb5_keyblock *keyblock Fc Ft krb5_error_code Fo krb5_generate_random_keyblock Fa krb5_context context Fa krb5_enctype type Fa krb5_keyblock *key Fc Ft krb5_error_code Fo krb5_generate_subkey Fa krb5_context context Fa const krb5_keyblock *key Fa krb5_keyblock **subkey Fc Ft krb5_error_code Fo krb5_generate_subkey_extended Fa krb5_context context Fa const krb5_keyblock *key Fa krb5_enctype enctype Fa krb5_keyblock **subkey Fc Ft krb5_error_code Fo krb5_keyblock_init Fa krb5_context context Fa krb5_enctype type Fa const void *data Fa size_t size Fa krb5_keyblock *key Fc Ft void Fo krb5_keyblock_zero Fa krb5_keyblock *keyblock Fc Ft krb5_error_code Fo krb5_random_to_key Fa krb5_context context Fa krb5_enctype type Fa const void *data Fa size_t size Fa krb5_keyblock *key Fc  

DESCRIPTION

krb5_keyblock holds the encryption key for a specific encryption type. There is no component inside krb5_keyblock that is directly referable.

Fn krb5_keyblock_get_enctype returns the encryption type of the keyblock.

Fn krb5_copy_keyblock makes a copy the keyblock Fa inblock to the output Fa out . Fa out should be freed by the caller with Fa krb5_free_keyblock .

Fn krb5_copy_keyblock_contents copies the contents of Fa inblock to the Fa to keyblock. The destination keyblock is overritten.

Fn krb5_free_keyblock zeros out and frees the content and the keyblock itself.

Fn krb5_free_keyblock_contents zeros out and frees the content of the keyblock.

Fn krb5_generate_random_keyblock creates a new content of the keyblock Fa key of type encrytion type Fa type . The content of Fa key is overwritten and not freed, so the caller should be sure it is freed before calling the function.

Fn krb5_generate_subkey generates a Fa subkey of the same type as Fa key . The caller must free the subkey with Fa krb5_free_keyblock .

Fn krb5_generate_subkey_extended generates a Fa subkey of the specified encryption type Fa type . If Fa type is ETYPE_NULL of the same type as Fa key . The caller must free the subkey with Fa krb5_free_keyblock .

Fn krb5_keyblock_init Fill in Fa key with key data of type Fa enctype from Fa data of length Fa size . Key should be freed using Fn krb5_free_keyblock_contents .

Fn krb5_keyblock_zero zeros out the keyblock to to make sure no keymaterial is in memory. Note that Fn krb5_free_keyblock_contents also zeros out the memory.

Fn krb5_random_to_key converts the random bytestring to a protocol key according to Kerberos crypto frame work. It the resulting key will be of type Fa enctype . It may be assumed that all the bits of the input string are equally random, even though the entropy present in the random source may be limited

SEE ALSO

krb5_crypto_init3, krb5(3), krb5.conf5