[][src]Crate kerberos_crypto

Kerberos crypto

Library to implement the cryptographic algorithms involved in the kerberos protocol.

The library provides different ciphers. The ciphers are classes which implements the diferent algorithms. All of them implement the KerberosCipher trait.

Supported algorithms

  • RC4-HMAC
  • AES128-CTS-HMAC-SHA1-96
  • AES256-CTS-HMAC-SHA1-96

Modules

aes_hmac_sha1

This module provides routines to encrypt/decrypt by using the AES algorithm with HMAC-SHA1 required by AES128_CTS_HMAC_SHA1_96 and AES256_CTS_HMAC_SHA1_96.

rc4_hmac_md5

This module provides routines to encrypt/decrypt by using the RC4 algorithm with HMAC-MD5 required by RC4_HMAC

Structs

AesCipher

Cipher for the AES algorithm, used by the encryption types AES128_CTS_HMAC_SHA1_96 and AES256_CTS_HMAC_SHA1_96

Rc4Cipher

Cipher for the RC4 algorithm, used by the encryption type RC4_HMAC

Enums

AesSizes

Enum to provide asociated parameters with each size of the AES algorithm

Error

Error raised by the routines of this library

Key

Encapsules the possible keys used by this Kerberos implementation. Each key can be used by a different cryptographic algorithm.

Constants

AES128_KEY_SIZE

Size of AES-128 key, 16 bytes

AES128_SEED_SIZE
AES256_KEY_SIZE

Size of AES-256 key, 32 bytes

AES256_SEED_SIZE
AES_BLOCK_SIZE
AES_MAC_SIZE
RC4_KEY_SIZE

Size of RC4 key , 16 bytes

Traits

KerberosCipher

Trait implemented by the ciphers of this library

Functions

checksum_hmac_md5
is_supported_etype

Helper to check is an encryption type is supported by this library

new_kerberos_cipher

Creates the appropiate cipher based on the encryption type specified

supported_etypes

Returns a vector with the etypes of the supported algorithms by this library

Type Definitions

Result

Result that encapsulates the Error type of this library