Collaboration diagram for libzrtp types for developers:
Data Structures | |
| struct | zrtp_global_ctx |
Library global context Compilers and linkers on some operating systems don't support the declaration of global variables in c files. Storing a context allows us to solve this problem in a way that unifies component use. The context is created by calling zrtp_init(), and is destroyed with zrtp_down(). It contains data necessary for crypto-component algorithms, including hash schemes, cipher types, SAS schemes etc. Context data can be divided into three groups:
| |
| struct | zrtp_rtp_info |
| RTP packet structure used in libzrtp Used for conveniently working with RTP/ZRTP packets. A binary RTP/ZRTP packet is converted into a zrtp_rtp_info_t structure before processing by _zrtp_preparse_packet(). More... | |
| struct | zrtp_shared_secret |
| Shared secret structure This structure stores ZRTP shared secret values used in the protocol. More... | |
| struct | zrtp_secrets |
Retained secrets container Contains the session's shared secret values and related flags restored from the cache. Every subsequent stream within a session uses these values through zrtp_proto_secret_t pointers. By definition, different ZRTP streams can't change secret values. Secret flags are protected against race conditions by the mutex _protector. For internal use only. More... | |
| struct | zrtp_proto_secret |
| Protocol shared secret Wrapper around the session shared secrets zrtp_shared_secret. Used for ID storing and secret sorting according to ZRTP ID sec. 5.4.4. More... | |
| struct | zrtp_stream_mescache |
| ZRTP messages cache This structure contains ZRTP messages prepared for sending or received from the other side. This scheme allows speed-ups the resending of packets and computing message hashes, and makes resending thread-safe. Besides packets, tasks retries are stored as well. More... | |
| struct | zrtp_dh_crypto_context |
| Crypto context for Diffie-Hellman calculations Used only by DH streams to store Diffie-Hellman calculations. Allocated on protocol initialization and released on switching to SECURE mode. More... | |
| struct | zrtp_dsa_crypto_context |
| Crypto context for ECDSA calculations Used to store ECDSA keys and calculations. Allocated on protocol initialization and released on switching to SECURE mode. More... | |
| struct | zrtp_proto_crypto |
| Protocol crypto context Used as temporary storage for ZRTP crypto data during protocol running. Unlike zrtp_stream_crypto_t this context is needed only during key negotiation and destroyed on switching to SECURE state. More... | |
| struct | zrtp_protocol |
| ZRTP protocol structure Protocol structure is responsible for ZRTP protocol logic (CLEAR-SECURE switching) and RTP media encrypting/decrypting. The protocol is created right after the discovery phase and destroyed on stream closing. More... | |
| struct | zrtp_stream_crypto |
| Stream-persistent crypto options. Unlike zrtp_proto_crypto_t these data are kept after switching to Secure state or stopping the protocol; used to sign/verify Confirm and GoClear packets. More... | |
| struct | zrtp_media_context |
| stream media context. Contains all RTP media-related information. More... | |
Typedefs | |
| typedef enum zrtp_stream_mode | zrtp_stream_mode_t |
| Enumeration for ZRTP stream mode definition. | |
| typedef enum zrtp_mitm_mode | zrtp_mitm_mode_t |
| Lists MitM roles on PBX call transferring Enumeration type for the ZRTP modes based on the role of the MitM. | |
| typedef enum zrtp_statemachine_type | zrtp_statemachine_type_t |
| enumeration for protocol state-machine roles Protocol role fully defines it's behavior. ZRTP peer chooses a role according to specification. For details see internal developers documentation | |
| typedef zrtp_rtp_info | zrtp_rtp_info_t |
| RTP packet structure used in libzrtp Used for conveniently working with RTP/ZRTP packets. A binary RTP/ZRTP packet is converted into a zrtp_rtp_info_t structure before processing by _zrtp_preparse_packet(). | |
| typedef zrtp_secrets | zrtp_secrets_t |
Retained secrets container Contains the session's shared secret values and related flags restored from the cache. Every subsequent stream within a session uses these values through zrtp_proto_secret_t pointers. By definition, different ZRTP streams can't change secret values. Secret flags are protected against race conditions by the mutex _protector. For internal use only. | |
| typedef zrtp_proto_secret | zrtp_proto_secret_t |
| Protocol shared secret Wrapper around the session shared secrets zrtp_shared_secret. Used for ID storing and secret sorting according to ZRTP ID sec. 5.4.4. | |
| typedef zrtp_stream_mescache | zrtp_stream_mescache_t |
| ZRTP messages cache This structure contains ZRTP messages prepared for sending or received from the other side. This scheme allows speed-ups the resending of packets and computing message hashes, and makes resending thread-safe. Besides packets, tasks retries are stored as well. | |
| typedef zrtp_dh_crypto_context | zrtp_dh_crypto_context_t |
| Crypto context for Diffie-Hellman calculations Used only by DH streams to store Diffie-Hellman calculations. Allocated on protocol initialization and released on switching to SECURE mode. | |
| typedef zrtp_dsa_crypto_context | zrtp_dsa_crypto_context_t |
| Crypto context for ECDSA calculations Used to store ECDSA keys and calculations. Allocated on protocol initialization and released on switching to SECURE mode. | |
| typedef zrtp_proto_crypto | zrtp_proto_crypto_t |
| Protocol crypto context Used as temporary storage for ZRTP crypto data during protocol running. Unlike zrtp_stream_crypto_t this context is needed only during key negotiation and destroyed on switching to SECURE state. | |
| typedef zrtp_stream_crypto | zrtp_stream_crypto_t |
| Stream-persistent crypto options. Unlike zrtp_proto_crypto_t these data are kept after switching to Secure state or stopping the protocol; used to sign/verify Confirm and GoClear packets. | |
| typedef zrtp_media_context | zrtp_media_context_t |
| stream media context. Contains all RTP media-related information. | |
Enumerations | |
| enum | zrtp_state_t { ZRTP_STATE_NONE = 0, ZRTP_STATE_ACTIVE, ZRTP_STATE_START, ZRTP_STATE_WAIT_HELLOACK, ZRTP_STATE_WAIT_HELLO, ZRTP_STATE_CLEAR, ZRTP_STATE_START_INITIATINGSECURE, ZRTP_STATE_INITIATINGSECURE, ZRTP_STATE_WAIT_CONFIRM1, ZRTP_STATE_WAIT_CONFIRMACK, ZRTP_STATE_PENDINGSECURE, ZRTP_STATE_WAIT_CONFIRM2, ZRTP_STATE_SECURE, ZRTP_STATE_SASRELAYING, ZRTP_STATE_INITIATINGCLEAR, ZRTP_STATE_PENDINGCLEAR, ZRTP_STATE_INITIATINGERROR, ZRTP_STATE_PENDINGERROR, ZRTP_STATE_ERROR, ZRTP_STATE_NO_ZRTP, ZRTP_STATE_COUNT } |
| Defines ZRTP state-machine states The conditions for switching from one state to another, and libzrtp behavior in every state is described in detail in 7.2 Protocol scenarios and depicted in diagram 1.6 and 1.7. The current stream state is stored in the zrtp_stream_ctx_t::state variable and available for reading at any time. More... | |
| enum | zrtp_stream_mode { ZRTP_STREAM_MODE_UNKN = 0, ZRTP_STREAM_MODE_CLEAR = 1, ZRTP_STREAM_MODE_DH = 2, ZRTP_STREAM_MODE_PRESHARED = 3, ZRTP_STREAM_MODE_MULT = 4, ZRTP_STREAM_MODE_COUNT = 5 } |
| Enumeration for ZRTP stream mode definition. More... | |
| enum | zrtp_msg_type_t { ZRTP_UNPARSED = -1, ZRTP_NONE = 0, ZRTP_HELLO = 1, ZRTP_HELLOACK = 2, ZRTP_COMMIT = 3, ZRTP_DHPART1 = 4, ZRTP_DHPART2 = 5, ZRTP_CONFIRM1 = 6, ZRTP_CONFIRM2 = 7, ZRTP_CONFIRM2ACK = 8, ZRTP_GOCLEAR = 9, ZRTP_GOCLEARACK = 10, ZRTP_ERROR = 11, ZRTP_ERRORACK = 12, ZRTP_PROCESS = 13, ZRTP_SASRELAY = 14, ZRTP_RELAYACK = 15, ZRTP_MSG_TYPE_COUNT = 16 } |
| Enumeration for ZRTP protocol packets type definition. More... | |
| enum | zrtp_mitm_mode { ZRTP_MITM_MODE_UNKN = 0, ZRTP_MITM_MODE_RECONFIRM_SERVER = 1, ZRTP_MITM_MODE_RECONFIRM_CLIENT = 2, ZRTP_MITM_MODE_SERVER_REG = 3, ZRTP_MITM_MODE_CLIENT_REG = 4 } |
| Lists MitM roles on PBX call transferring Enumeration type for the ZRTP modes based on the role of the MitM. More... | |
| enum | zrtp_statemachine_type { ZRTP_STATEMACHINE_NONE = 0, ZRTP_STATEMACHINE_INITIATOR = 1, ZRTP_STATEMACHINE_RESPONDER = 2 } |
| enumeration for protocol state-machine roles Protocol role fully defines it's behavior. ZRTP peer chooses a role according to specification. For details see internal developers documentation More... | |
| typedef struct zrtp_dh_crypto_context zrtp_dh_crypto_context_t |
Crypto context for Diffie-Hellman calculations Used only by DH streams to store Diffie-Hellman calculations. Allocated on protocol initialization and released on switching to SECURE mode.
| typedef struct zrtp_dsa_crypto_context zrtp_dsa_crypto_context_t |
Crypto context for ECDSA calculations Used to store ECDSA keys and calculations. Allocated on protocol initialization and released on switching to SECURE mode.
| typedef struct zrtp_media_context zrtp_media_context_t |
stream media context. Contains all RTP media-related information.
| typedef enum zrtp_mitm_mode zrtp_mitm_mode_t |
Lists MitM roles on PBX call transferring Enumeration type for the ZRTP modes based on the role of the MitM.
| typedef struct zrtp_proto_crypto zrtp_proto_crypto_t |
Protocol crypto context Used as temporary storage for ZRTP crypto data during protocol running. Unlike zrtp_stream_crypto_t this context is needed only during key negotiation and destroyed on switching to SECURE state.
| typedef struct zrtp_proto_secret zrtp_proto_secret_t |
Protocol shared secret Wrapper around the session shared secrets zrtp_shared_secret. Used for ID storing and secret sorting according to ZRTP ID sec. 5.4.4.
| typedef struct zrtp_rtp_info zrtp_rtp_info_t |
RTP packet structure used in libzrtp Used for conveniently working with RTP/ZRTP packets. A binary RTP/ZRTP packet is converted into a zrtp_rtp_info_t structure before processing by _zrtp_preparse_packet().
| typedef struct zrtp_secrets zrtp_secrets_t |
Retained secrets container Contains the session's shared secret values and related flags restored from the cache. Every subsequent stream within a session uses these values through zrtp_proto_secret_t pointers. By definition, different ZRTP streams can't change secret values. Secret flags are protected against race conditions by the mutex _protector. For internal use only.
| typedef enum zrtp_statemachine_type zrtp_statemachine_type_t |
enumeration for protocol state-machine roles Protocol role fully defines it's behavior. ZRTP peer chooses a role according to specification. For details see internal developers documentation
| typedef struct zrtp_stream_crypto zrtp_stream_crypto_t |
Stream-persistent crypto options. Unlike zrtp_proto_crypto_t these data are kept after switching to Secure state or stopping the protocol; used to sign/verify Confirm and GoClear packets.
| typedef struct zrtp_stream_mescache zrtp_stream_mescache_t |
ZRTP messages cache This structure contains ZRTP messages prepared for sending or received from the other side. This scheme allows speed-ups the resending of packets and computing message hashes, and makes resending thread-safe. Besides packets, tasks retries are stored as well.
| typedef enum zrtp_stream_mode zrtp_stream_mode_t |
Enumeration for ZRTP stream mode definition.
| enum zrtp_mitm_mode |
Lists MitM roles on PBX call transferring Enumeration type for the ZRTP modes based on the role of the MitM.
| ZRTP_MITM_MODE_UNKN | MitM is not supported or not activated. |
| ZRTP_MITM_MODE_RECONFIRM_SERVER | Server-side mode to transfer SAS to the registrant. Libzrtp switches to this state on starting zrtp_update_remote_options(). |
| ZRTP_MITM_MODE_RECONFIRM_CLIENT | Client-side mode accepted SAS transfer from the trusted MiTM. Libzrtp activates this state on receiving an SASRELAY from a trusted MiTM endpoint. |
| ZRTP_MITM_MODE_SERVER_REG | Server-side mode to accept the user's registration requests. Libzrtp switches to this state on starting a registration stream by zrtp_start_registration_stream() or zrtp_secure_registration_stream(). |
| ZRTP_MITM_MODE_CLIENT_REG | User-side mode to confirm the registration ritual. The library enables this state when a remote party invites it to the registration ritual by a special flag in the Confirm packet. |
Definition at line 120 of file zrtp_types.h.
| enum zrtp_msg_type_t |
Enumeration for ZRTP protocol packets type definition.
Definition at line 93 of file zrtp_types.h.
| enum zrtp_state_t |
Defines ZRTP state-machine states The conditions for switching from one state to another, and libzrtp behavior in every state is described in detail in 7.2 Protocol scenarios and depicted in diagram 1.6 and 1.7. The current stream state is stored in the zrtp_stream_ctx_t::state variable and available for reading at any time.
Definition at line 42 of file zrtp_types.h.
enumeration for protocol state-machine roles Protocol role fully defines it's behavior. ZRTP peer chooses a role according to specification. For details see internal developers documentation
| ZRTP_STATEMACHINE_NONE | |
| ZRTP_STATEMACHINE_INITIATOR | Unknown type. Used as error value |
| ZRTP_STATEMACHINE_RESPONDER | Defines initiator's protocol logic |
Definition at line 153 of file zrtp_types.h.
| enum zrtp_stream_mode |
Enumeration for ZRTP stream mode definition.
Definition at line 77 of file zrtp_types.h.