zrtp_crypto.h File Reference

#include "bn.h"
#include "zrtp_types.h"
#include "zrtp_error.h"
#include "zrtp_engine.h"
#include "aes.h"

Go to the source code of this file.

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)


This file is part of the documentation for Zfone.
Copyright ©  2006-2008 Philip R. Zimmermann. All rights reserved.
Generated on Mon November 10 2008 by doxygen 1.5.7-20060202. Written by Viktor Krikun, © 2006-2008