Library interfaces overview
[ZRTP API REFERENCE]

Collaboration diagram for Library interfaces overview:

Data Structures

struct  zrtp_callback_cache
 Data types and functions related to shared secrets. More...
struct  zrtp_retry_task
 Structure for call delay mechanism Contains all the information necessary to perform and synchronize scheduled tasks. The call delay algorithm is explained in detail in section 4.4 Packet retries;. More...
struct  zrtp_callback_scheduler
 Timed-send functions. More...
struct  zrtp_callback_event
 Callbacks definitions This section lists callback functions informing the user about the protocol status. These callbacks must be defined in the user application. More...
struct  zrtp_callback_misc
struct  zrtp_callback

Typedefs

typedef zrtp_callback_cache zrtp_callback_cache_t
 Data types and functions related to shared secrets.
typedef void(*) zrtp_call_callback_t (zrtp_stream_ctx_t *, zrtp_retry_task_t *)
typedef zrtp_callback_scheduler zrtp_callback_scheduler_t
 Timed-send functions.
typedef enum zrtp_protocol_event zrtp_protocol_event_t
 Defines zrtp_event_callback() event type For additional information see 2.3 Callback conventions 8 Stream usage and options.
typedef enum zrtp_security_event zrtp_security_event_t
typedef zrtp_callback_event zrtp_callback_event_t
 Callbacks definitions This section lists callback functions informing the user about the protocol status. These callbacks must be defined in the user application.
typedef zrtp_callback_misc zrtp_callback_misc_t
typedef zrtp_callback zrtp_callback_t

Enumerations

enum  zrtp_protocol_event {
  ZRTP_EVENT_UNSUPPORTED = 0, ZRTP_EVENT_IS_CLEAR, ZRTP_EVENT_IS_INITIATINGSECURE, ZRTP_EVENT_IS_PENDINGSECURE,
  ZRTP_EVENT_IS_PENDINGCLEAR, ZRTP_EVENT_NO_ZRTP, ZRTP_EVENT_NO_ZRTP_QUICK, ZRTP_EVENT_IS_CLIENT_ENROLLMENT,
  ZRTP_EVENT_NEW_USER_ENROLLED, ZRTP_EVENT_USER_ALREADY_ENROLLED, ZRTP_EVENT_USER_UNENROLLED, ZRTP_EVENT_LOCAL_SAS_UPDATED,
  ZRTP_EVENT_REMOTE_SAS_UPDATED, ZRTP_EVENT_IS_SECURE, ZRTP_EVENT_IS_SECURE_DONE
}
 Defines zrtp_event_callback() event type For additional information see 2.3 Callback conventions 8 Stream usage and options. More...
enum  zrtp_security_event { ZRTP_EVENT_ERROR = ZRTP_EVENT_IS_SECURE_DONE + 1, ZRTP_EVENT_WRONG_SIGNALING_HASH, ZRTP_EVENT_WRONG_MESSAGE_HMAC }
enum  zrtp_alert_t { ZRTP_ALERT_PLAY_NO = 0, ZRTP_ALERT_PLAY_SECURE, ZRTP_ALERT_PLAY_CLEAR, ZRTP_ALERT_PLAY_ERROR }
 Alert sound types definition. More...


Detailed Description

This section describes the requirements for the implementation of each interface function. Descriptions are divided into groups by function.

Typedef Documentation

typedef void(*) zrtp_call_callback_t(zrtp_stream_ctx_t *, zrtp_retry_task_t *)

Definition at line 122 of file zrtp_iface.h.

typedef struct zrtp_callback_cache zrtp_callback_cache_t

Data types and functions related to shared secrets.

The secret cache implementation should have a two-layer structure: each pair of ZIDs should have a relevant pair of secrets (current and previous). Other implementations can use any other information for cache indexing. In addition to the value of the secret, the cache should contain a marker of this value's verification, a time-stamp for creation and an expiration flag. The simplest secret cache scheme implementation is:
[local_ZID][remote_ZID][curr_cache][curr_verified][prev_cache][prev_verified] [created at][last used at][cache ttl] For more information see corresponding section 4.2 Shared Secrets' Cache

typedef struct zrtp_callback_event zrtp_callback_event_t

Callbacks definitions This section lists callback functions informing the user about the protocol status. These callbacks must be defined in the user application.

typedef struct zrtp_callback_misc zrtp_callback_misc_t

typedef struct zrtp_callback_scheduler zrtp_callback_scheduler_t

Timed-send functions.

Algorithm used in the scheduled call module is described in detail in section 4.4 Packet retries of the developer's guide documentation. Technical details of this function's implementation follows.

typedef struct zrtp_callback zrtp_callback_t

typedef enum zrtp_protocol_event zrtp_protocol_event_t

Defines zrtp_event_callback() event type For additional information see 2.3 Callback conventions 8 Stream usage and options.

typedef enum zrtp_security_event zrtp_security_event_t


Enumeration Type Documentation

enum zrtp_alert_t

Alert sound types definition.

Enumerator:
ZRTP_ALERT_PLAY_NO 
ZRTP_ALERT_PLAY_SECURE  Don't play any alert sound
ZRTP_ALERT_PLAY_CLEAR  Sound played on secure connection establishment
ZRTP_ALERT_PLAY_ERROR  Sound played on errors

Definition at line 370 of file zrtp_iface.h.

enum zrtp_protocol_event

Defines zrtp_event_callback() event type For additional information see 2.3 Callback conventions 8 Stream usage and options.

Enumerator:
ZRTP_EVENT_UNSUPPORTED  Just a stub for error detection.
ZRTP_EVENT_IS_CLEAR  Switching to Clear state.
ZRTP_EVENT_IS_INITIATINGSECURE  Switching to InitiatingSecure state.
ZRTP_EVENT_IS_PENDINGSECURE  Switching to PendingSecure state.
ZRTP_EVENT_IS_PENDINGCLEAR  Switching to PendingClear state.
ZRTP_EVENT_NO_ZRTP  Hello packet undelivered - no ZRTP endpoint and other end.
ZRTP_EVENT_NO_ZRTP_QUICK  Libzrtp raises this event after few Hello have been send without receiving response from the remote endpoint. User application may use this event to stop Securing ritual if connection lag is important. User should take into account that delays in Hello receiving may be conditioned by interruptions in media channel
Warning:
Don't handle this event unless necessary
ZRTP_EVENT_IS_CLIENT_ENROLLMENT  Informs the Client-side endpoint of receiving a registration invitation from the MiTM. Libzrtp raises this event after switching to the Secure state (ZRTP_EVENT_IS_SECURE). The user may accept the invitation using a zrtp_register_with_trusted_mitm() call.
ZRTP_EVENT_NEW_USER_ENROLLED  New user has registered to the MitM Informs MitM of the registration of a new user. Libzrtp raises this event when a user calls the special registration number and has switched to the secure state.
ZRTP_EVENT_USER_ALREADY_ENROLLED  New user has already registered with the MiTM Notifies the MiTM of an attempt to register from a user that is already registered. In this case a new MiTM secret will not be generated and the user may be informed by voice prompt. Libzrtp raises this event from the SECURE state.
ZRTP_EVENT_USER_UNENROLLED  User has cancelled registration Libzrtp may raise this event during regular calls when it discovers that the user has removed its MiTM secret. This event informs the MiTM that the SAS can no longer be transferred to this user.
ZRTP_EVENT_LOCAL_SAS_UPDATED  SAS value and/or rendering scheme was updated LibZRTP raises this event when the SAS value is transferred from the trusted MiTM. The value is rendered automatically according to the rendering scheme specified by the trusted MiTM. (it may be different than that of the previous one). On receiving this event, the Client application should replace the old SAS with the new one and ask the user to verify it. This event is called from the Secure state only.
ZRTP_EVENT_REMOTE_SAS_UPDATED  SAS transfer was accepted by the remote side Libzrtp raises this event to inform the Server-side about accepting the change of SAS value and/or rendering scheme by the remote client. This event is called from the Secure state only.
ZRTP_EVENT_IS_SECURE  Duplicates on_zrtp_secure() for more thin adjustments
ZRTP_EVENT_IS_SECURE_DONE 

Definition at line 217 of file zrtp_iface.h.

enum zrtp_security_event

Enumerator:
ZRTP_EVENT_ERROR  Switching to ERROR state.
ZRTP_EVENT_WRONG_SIGNALING_HASH  Hello Hash is different from that received in signaling. In accordance with sec. 10 of the ZRTP ID, libzrtp provides the ability to prevent DOS attacks. libzrtp can detect an attack in which the hash of the remote Hello was received through signaling and added to the ZRTP context (zrtp_set_signaling_hash). When the hash of the incoming Hello doesn't match the hash from signaling, the ZRTP_EVENT_WRONG_SIGNALING_HASH event is raised and the connection MAY be terminated manually.
ZRTP_EVENT_WRONG_MESSAGE_HMAC  Hmac of the received packet is different from the hmac value earlier received. If the Hello hash is sent through protected signaling, libzrtp provides the ability to prevent protocol packets from modification and even eliminates comparing the SAS. To do this, libzrtp compares the message Hmac with the Hmac received in the previous message. If the Hmacs don't match, the ZRTP_EVENT_WRONG_MESSAGE_HMAC event is raised and the connection MAY be terminated manually.

Definition at line 299 of file zrtp_iface.h.


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