Collaboration diagram for Library crypto-components:
Data Structures | |
| struct | zrtp_comp |
| Global structure for all crypto-component types. More... | |
| struct | zrtp_hash |
| Structure for defining the hash-value computing scheme The ZRTP context field zrtp_stream_ctx::_hash is initialized by the given type value and used for all hash calculations within the ZRTP sessions. Having implemented a structure of this type, it is possible to integrate new hash calculation schemes into libzrtp. More... | |
| struct | zrtp_auth_tag_length |
| Structure for defining the SRTP authentication scheme The ZRTP context field zrtp_stream_ctx::_authtaglength is initialized by the given type value and used for SRTP encryption configuration. More... | |
| struct | zrtp_pk_scheme |
| Structure for describing the public key scheme The ZRTP context field zrtp_stream_ctx::_pubkeyscheme is initialized by the given type value and used by libzrtp in public key exchange. More... | |
| struct | zrtp_sas_scheme |
| Structure for defining SAS generation scheme The type of the ZRTP context's field zrtp_stream_ctx::_sasscheme. It is used to generate short authentication strings. LibZRTP functionality can be augmented with a new SAS scheme by supplying your own instance of zrtp_sas_scheme. More... | |
| struct | zrtp_sig_scheme |
| Structure for describing the signature scheme The ZRTP context field zrtp_stream_ctx::_sigscheme is initialized by the given type value and used by libzrtp in public key exchange. More... | |
| struct | zrtp_cipher_mode |
| struct | zrtp_cipher |
Defines | |
| #define | ZRTP_COMP_UNKN 0 |
Typedefs | |
| typedef enum zrtp_crypto_comp | zrtp_crypto_comp_t |
| Enumeration for crypto-components types definition. | |
| typedef enum zrtp_hash_id | zrtp_hash_id_t |
| typedef enum zrtp_cipher_id | zrtp_cipher_id_t |
| typedef enum zrtp_atl_id | zrtp_atl_id_t |
| typedef enum zrtp_pktype_id | zrtp_pktype_id_t |
| typedef enum zrtp_sigtype_id | zrtp_sigtype_id_t |
| typedef enum zrtp_sas_id | zrtp_sas_id_t |
| typedef zrtp_comp | zrtp_comp_t |
| Global structure for all crypto-component types. | |
| typedef enum zrtp_cipher_mode_values | zrtp_cipher_mode_values_t |
| typedef zrtp_cipher_mode | zrtp_cipher_mode_t |
Enumerations | |
| enum | zrtp_crypto_comp { ZRTP_CC_HASH = 1, ZRTP_CC_SAS = 2, ZRTP_CC_CIPHER = 3, ZRTP_CC_PKT = 4, ZRTP_CC_ATL = 5, ZRTP_CC_SIG = 6 } |
| Enumeration for crypto-components types definition. More... | |
| enum | zrtp_hash_id { ZRTP_HASH_SHA256 = 1, ZRTP_HASH_SHA128 = 2 } |
| enum | zrtp_cipher_id { ZRTP_CIPHER_AES128 = 1, ZRTP_CIPHER_AES256 = 2 } |
| enum | zrtp_atl_id { ZRTP_ATL_HS32 = 1, ZRTP_ATL_HS80 = 2 } |
| enum | zrtp_pktype_id { ZRTP_PKTYPE_PRESH = 1, ZRTP_PKTYPE_MULT = 2, ZRTP_PKTYPE_DH3072 = 3 } |
| enum | zrtp_sigtype_id { ZRTP_SIGTYPE_EC256P = 1, ZRTP_SIGTYPE_EC384P = 2, ZRTP_SIGTYPE_EC521P = 3 } |
| enum | zrtp_sas_id { ZRTP_SAS_BASE32 = 1, ZRTP_SAS_BASE256 = 2 } |
| enum | zrtp_cipher_mode_values { ZRTP_CIPHER_MODE_CTR = 1, ZRTP_CIPHER_MODE_CFB = 2 } |
Functions | |
| zrtp_status_t | zrtp_clear_comp (zrtp_crypto_comp_t type, zrtp_global_ctx_t *zrtp_global) |
Clear components buffer This function clears the buffer of the components which are defined by the type parameter. It is used before registering a component. | |
| zrtp_status_t | zrtp_done_comp (zrtp_crypto_comp_t type, zrtp_global_ctx_t *zrtp_global) |
| Destroy components buffer This function clears the list of components of the specified type, destroys all components and releases all allocated resources. It is used on libzrtp down. zrtp_done_comp calls zrtp_comp_t::free() if it isn't NULL. | |
| zrtp_status_t | zrtp_register_comp (zrtp_crypto_comp_t type, void *comp, zrtp_global_ctx_t *zrtp_global) |
| Registering a new crypto-component Correctness of values in the necessary structure is the developer's responsibility. zrtp_register_comp calls zrtp_comp_t::init() if it isn't NULL. | |
| void * | zrtp_find_comp (zrtp_crypto_comp_t type, uint8_t id, zrtp_global_ctx_t *zrtp_global) |
| Search component by ID. | |
| char * | zrtp_comp_id2type (zrtp_crypto_comp_t type, uint8_t id) |
| uint8_t | zrtp_comp_type2id (zrtp_crypto_comp_t type, char *name) |
The concept behind crypto components is similar to that of classes in object oriented programming. The components are defined as structures and manipulated by functions. Component attributes are stored in 'contexts', and are defined during initialization. Resources allocated at initialization are freed with the 'free' function.
Components are divided into 5 functional groups (component types):
| #define ZRTP_COMP_UNKN 0 |
This ID with code 0 is used as an error signal by all crypto-components groups to indicate a wrongly defined component identifier.
Definition at line 91 of file zrtp_crypto.h.
| typedef enum zrtp_atl_id zrtp_atl_id_t |
Defines SRTP authentication schemes
| typedef enum zrtp_cipher_id zrtp_cipher_id_t |
Defines types of ciphers
| typedef struct zrtp_cipher_mode zrtp_cipher_mode_t |
| typedef enum zrtp_cipher_mode_values zrtp_cipher_mode_values_t |
Defines block cipher modes.
| typedef struct zrtp_comp zrtp_comp_t |
Global structure for all crypto-component types.
| typedef enum zrtp_crypto_comp zrtp_crypto_comp_t |
Enumeration for crypto-components types definition.
| typedef enum zrtp_hash_id zrtp_hash_id_t |
Defines types of hash functions
| typedef enum zrtp_pktype_id zrtp_pktype_id_t |
Defines public key exchange schemes
| typedef enum zrtp_sas_id zrtp_sas_id_t |
Defines modes of short authentication scheme calculation
| typedef enum zrtp_sigtype_id zrtp_sigtype_id_t |
Defines signature schemes
| enum zrtp_atl_id |
Defines SRTP authentication schemes
Definition at line 108 of file zrtp_crypto.h.
| enum zrtp_cipher_id |
Defines types of ciphers
Definition at line 101 of file zrtp_crypto.h.
Defines block cipher modes.
Definition at line 522 of file zrtp_crypto.h.
| enum zrtp_crypto_comp |
Enumeration for crypto-components types definition.
Definition at line 75 of file zrtp_crypto.h.
| enum zrtp_hash_id |
Defines types of hash functions
Definition at line 94 of file zrtp_crypto.h.
| enum zrtp_pktype_id |
Defines public key exchange schemes
Definition at line 115 of file zrtp_crypto.h.
| enum zrtp_sas_id |
Defines modes of short authentication scheme calculation
Definition at line 141 of file zrtp_crypto.h.
| enum zrtp_sigtype_id |
Defines signature schemes
Definition at line 132 of file zrtp_crypto.h.
| zrtp_status_t zrtp_clear_comp | ( | zrtp_crypto_comp_t | type, | |
| zrtp_global_ctx_t * | zrtp_global | |||
| ) |
Clear components buffer This function clears the buffer of the components which are defined by the type parameter. It is used before registering a component.
| zrtp_global | - the ZRTP global context where components are stored; | |
| type | - specifies the component pool type for clearing. |
| char* zrtp_comp_id2type | ( | zrtp_crypto_comp_t | type, | |
| uint8_t | id | |||
| ) |
Converts a component's integer ID to a symbolic ZRTP name
| uint8_t zrtp_comp_type2id | ( | zrtp_crypto_comp_t | type, | |
| char * | name | |||
| ) |
Converts a component's ZRTP symbolic name to an integer ID
| zrtp_status_t zrtp_done_comp | ( | zrtp_crypto_comp_t | type, | |
| zrtp_global_ctx_t * | zrtp_global | |||
| ) |
Destroy components buffer This function clears the list of components of the specified type, destroys all components and releases all allocated resources. It is used on libzrtp down. zrtp_done_comp calls zrtp_comp_t::free() if it isn't NULL.
| zrtp_global | - the ZRTP global context where components are stored; | |
| type | - specifies the component pool type for destroying. |
| void* zrtp_find_comp | ( | zrtp_crypto_comp_t | type, | |
| uint8_t | id, | |||
| zrtp_global_ctx_t * | zrtp_global | |||
| ) |
Search component by ID.
| type | - type of sought component; | |
| zrtp_global | - the ZRTP global context where components are stored; | |
| id | - integer identifier of the necessary element. |
| zrtp_status_t zrtp_register_comp | ( | zrtp_crypto_comp_t | type, | |
| void * | comp, | |||
| zrtp_global_ctx_t * | zrtp_global | |||
| ) |
Registering a new crypto-component Correctness of values in the necessary structure is the developer's responsibility. zrtp_register_comp calls zrtp_comp_t::init() if it isn't NULL.
| type | - type of registred component; | |
| comp | - registered crypto-component; | |
| zrtp_global | - the ZRTP global context where components are stored. |