23 #define ZRTP_MAX_CHANNEL_NUMBER 2 25 #define MAX_AUX_SECRET_LENGTH 64 27 #define PACKET_STORAGE_CAPACITY 4 29 #define HELLO_MESSAGE_STORE_ID 0 30 #define COMMIT_MESSAGE_STORE_ID 1 31 #define DHPART_MESSAGE_STORE_ID 2 32 #define CONFIRM_MESSAGE_STORE_ID 3 41 #ifdef ZIDCACHE_ENABLED 47 #include <bctoolbox/crypto.h> 48 #include <bctoolbox/port.h> 54 #include "bctoolbox/logging.h" 57 #define snprintf _snprintf 61 #define BZRTP_TIMER_ON 1 62 #define BZRTP_TIMER_OFF 2 65 #define HELLO_BASE_RETRANSMISSION_STEP 50 66 #define HELLO_CAP_RETRANSMISSION_STEP 200 67 #define HELLO_MAX_RETRANSMISSION_NUMBER 20 69 #define NON_HELLO_BASE_RETRANSMISSION_STEP 150 70 #define NON_HELLO_CAP_RETRANSMISSION_STEP 1200 71 #define NON_HELLO_MAX_RETRANSMISSION_NUMBER 10 78 #define ZRTP_CLIENT_IDENTIFIERv1_0a "LINPHONE-ZRTPCPP" 79 #define ZRTP_CLIENT_IDENTIFIERv1_0b "BZRTP" 81 #define ZRTP_CLIENT_IDENTIFIERv1_1 "BZRTPv1.1" 83 #define ZRTP_CLIENT_IDENTIFIER ZRTP_CLIENT_IDENTIFIERv1_1 101 #define RETAINED_SECRET_LENGTH 32 177 void (*sasFunction)(
uint32_t sas,
char * output,
int outputSize);
234 #ifdef ZIDCACHE_ENABLED uint8_t * peerHelloHash
Definition: typedef.h:155
uint8_t * mackeyi
Definition: typedef.h:183
bctbx_rng_context_t * RNGContext
Definition: typedef.h:204
struct cachedSecrets_struct cachedSecrets_t
A set of cached secrets retrieved from the cache as defined.
bzrtpTimer_t timer
Definition: typedef.h:138
uint8_t hc
Definition: typedef.h:222
bzrtpStateMachine_t stateMachine
Definition: typedef.h:137
#define PACKET_STORAGE_CAPACITY
Definition: typedef.h:27
bctbx_mutex_t * zidCacheMutex
Definition: typedef.h:239
uint8_t cacheMismatchFlag
Definition: typedef.h:249
const char * pgpWordsOdd[]
Definition: pgpwords.c:284
uint8_t isInitialised
Definition: typedef.h:209
All the callback functions provided by the client needed by the ZRTP engine.
Definition: bzrtp.h:150
cachedSecretsHash_t initiatorCachedSecretHash
Definition: typedef.h:247
uint8_t sc
Definition: typedef.h:230
uint8_t hashLength
Definition: typedef.h:163
Timer structure : The timer mechanism receives a tick giving a current time in ms a timer object will...
Definition: typedef.h:93
uint8_t * KDFContext
Definition: typedef.h:181
A set of cached secrets retrieved from the cache as defined.
Definition: typedef.h:105
unsigned short uint16_t
Definition: stdint.h:79
uint8_t * pbxsecret
Definition: typedef.h:112
uint8_t sasAlgo
Definition: typedef.h:169
Store all zrtpPacket informations according to type a specific structure type is mapped to the void *...
Definition: packetParser.h:75
unsigned char uint8_t
Definition: stdint.h:78
bzrtpCallbacks_t zrtpCallbacks
Definition: typedef.h:216
uint8_t * auxsecret
Definition: typedef.h:110
uint8_t * rs2
Definition: typedef.h:108
bzrtpSrtpSecrets_t srtpSecrets
Definition: typedef.h:187
uint8_t * s0
Definition: typedef.h:180
#define ZRTP_MAX_CHANNEL_NUMBER
Definition: typedef.h:23
char * selfURI
Definition: typedef.h:241
uint8_t keyAgreementAlgo
Definition: typedef.h:206
uint8_t * rs1
Definition: typedef.h:106
uint8_t peerPVS
Definition: typedef.h:250
uint8_t cc
Definition: typedef.h:224
uint8_t rs1Length
Definition: typedef.h:107
void * zidCache
Definition: typedef.h:237
uint8_t keyAgreementAlgo
Definition: typedef.h:167
uint8_t * ZRTPSess
Definition: typedef.h:258
uint8_t status
Definition: typedef.h:94
cachedSecrets_t cachedSecret
Definition: typedef.h:246
uint8_t * transientAuxSecret
Definition: typedef.h:254
struct cachedSecretsHash_struct cachedSecretsHash_t
The hash of cached secret truncated to the 64 leftmost bits aux secret ID is not part of it because c...
structure of the ZRTP engine context Store current state, timers, HMAC and encryption keys ...
Definition: typedef.h:202
unsigned int uint32_t
Definition: stdint.h:80
uint8_t * zrtpkeyi
Definition: typedef.h:185
uint8_t auxsecretLength
Definition: typedef.h:111
uint8_t ZRTPSessLength
Definition: typedef.h:259
uint8_t cipherAlgo
Definition: typedef.h:164
int timerStep
Definition: typedef.h:97
const char * pgpWordsEven[]
Definition: pgpwords.c:24
unsigned __int64 uint64_t
Definition: stdint.h:90
uint8_t pbxsecretLength
Definition: typedef.h:113
uint8_t previouslyVerifiedSas
Definition: typedef.h:114
char * peerURI
Definition: typedef.h:243
uint8_t isSecure
Definition: typedef.h:143
uint8_t kc
Definition: typedef.h:228
uint16_t KDFContextLength
Definition: typedef.h:182
uint8_t cipherKeyLength
Definition: typedef.h:165
uint8_t role
Definition: typedef.h:136
struct bzrtpTimer_struct bzrtpTimer_t
Timer structure : The timer mechanism receives a tick giving a current time in ms a timer object will...
size_t transientAuxSecretLength
Definition: typedef.h:255
uint8_t authTagAlgo
Definition: typedef.h:166
uint8_t sasLength
Definition: typedef.h:170
uint8_t isMainChannel
Definition: typedef.h:144
uint8_t hashAlgo
Definition: typedef.h:162
int zuid
Definition: typedef.h:240
The zrtp context of a channel.
Definition: typedef.h:132
uint8_t * zrtpkeyr
Definition: typedef.h:186
uint8_t rs2Length
Definition: typedef.h:109
uint8_t isSecure
Definition: typedef.h:210
uint32_t selfSSRC
Definition: typedef.h:140
uint8_t * mackeyr
Definition: typedef.h:184
uint8_t * exportedKey
Definition: typedef.h:260
int(* bzrtpStateMachine_t)(bzrtpEvent_t)
the state function pointer definition
Definition: stateMachine.h:49
bzrtpPacket_t * pingPacket
Definition: typedef.h:194
uint64_t timeReference
Definition: typedef.h:213
uint8_t peerSupportMultiChannel
Definition: typedef.h:211
uint8_t firingCount
Definition: typedef.h:96
uint8_t exportedKeyLength
Definition: typedef.h:261
uint64_t firingTime
Definition: typedef.h:95
void * keyAgreementContext
Definition: typedef.h:205
void * clientData
Definition: typedef.h:134
uint16_t selfSequenceNumber
Definition: typedef.h:158
uint16_t peerSequenceNumber
Definition: typedef.h:159
uint32_t peerBzrtpVersion
Definition: typedef.h:245
uint16_t keyAgreementLength
Definition: typedef.h:168
The hash of cached secret truncated to the 64 leftmost bits aux secret ID is not part of it because c...
Definition: typedef.h:121
uint8_t ac
Definition: typedef.h:226
cachedSecretsHash_t responderCachedSecretHash
Definition: typedef.h:248