|
bZRTP
bZRTP is an opensource implementation of ZRTP keys exchange protocol
|
Go to the source code of this file.
Data Structures | |
| struct | bzrtpEvent_struct |
| The event type, used as a parameter for the state function. More... | |
Macros | |
| #define | BZRTP_EVENT_INIT 0 |
| #define | BZRTP_EVENT_MESSAGE 1 |
| #define | BZRTP_EVENT_TIMER 2 |
| #define | BZRTP_EVENT_GOCLEAR 3 |
| #define | BZRTP_EVENT_ACCEPT_GOCLEAR 4 |
| #define | BZRTP_EVENT_BACKTOSECURE 5 |
| #define | BZRTP_ERROR_UNSUPPORTEDZRTPVERSION 0xe001 |
| #define | BZRTP_ERROR_UNMATCHINGPACKETREPETITION 0xe002 |
| #define | BZRTP_ERROR_CACHEMISMATCH 0xe004 |
Typedefs | |
| typedef struct bzrtpEvent_struct | bzrtpEvent_t |
| The event type, used as a parameter for the state function. More... | |
| typedef int(* | bzrtpStateMachine_t) (bzrtpEvent_t) |
| the state function pointer definition More... | |
Functions | |
| int | state_discovery_init (bzrtpEvent_t event) |
| This is the initial state On first call, we will create the Hello message and start sending it until we receive an helloACK or a hello message from peer. More... | |
| int | state_discovery_waitingForHello (bzrtpEvent_t event) |
| Arrives in this state coming from init upon reception on Hello ACK, we are now waiting for the Hello packet from peer. More... | |
| int | state_discovery_waitingForHelloAck (bzrtpEvent_t event) |
| We are now waiting for the HelloACK packet from peer or a Commit packet. More... | |
| int | state_keyAgreement_sendingCommit (bzrtpEvent_t event) |
| For any kind of key agreement (DHM, Mult, PreShared), we keep sending commit. More... | |
| int | state_keyAgreement_responderSendingDHPart1 (bzrtpEvent_t event) |
| For DHM mode only, responder send DHPart1 packet. More... | |
| int | state_keyAgreement_initiatorSendingDHPart2 (bzrtpEvent_t event) |
| For DHM mode only, initiator send DHPart2 packet. More... | |
| int | state_confirmation_responderSendingConfirm1 (bzrtpEvent_t event) |
| Responder send the confirm1 message. More... | |
| int | state_confirmation_initiatorSendingConfirm2 (bzrtpEvent_t event) |
| Initiator send the confirm2 message. More... | |
| int | state_secure (bzrtpEvent_t event) |
| We are in secure state. More... | |
| int | state_sending_GoClear (bzrtpEvent_t event) |
| GoClear initiator send a GoClear message. More... | |
| int | state_clear (bzrtpEvent_t event) |
| We are in clear state. More... | |
| int | bzrtp_updateCachedSecrets (bzrtpContext_t *zrtpContext, bzrtpChannelContext_t *zrtpChannelContext) |
| Compute the new rs1 and update the cached secrets according to rfc section 4.6.1. More... | |
| #define BZRTP_ERROR_CACHEMISMATCH 0xe004 |
| #define BZRTP_ERROR_UNMATCHINGPACKETREPETITION 0xe002 |
| #define BZRTP_ERROR_UNSUPPORTEDZRTPVERSION 0xe001 |
| #define BZRTP_EVENT_ACCEPT_GOCLEAR 4 |
| #define BZRTP_EVENT_BACKTOSECURE 5 |
| #define BZRTP_EVENT_GOCLEAR 3 |
| #define BZRTP_EVENT_INIT 0 |
| #define BZRTP_EVENT_MESSAGE 1 |
| #define BZRTP_EVENT_TIMER 2 |
| typedef struct bzrtpEvent_struct bzrtpEvent_t |
The event type, used as a parameter for the state function.
| typedef int(* bzrtpStateMachine_t) (bzrtpEvent_t) |
the state function pointer definition
| int bzrtp_updateCachedSecrets | ( | bzrtpContext_t * | zrtpContext, |
| bzrtpChannelContext_t * | zrtpChannelContext | ||
| ) |
Compute the new rs1 and update the cached secrets according to rfc section 4.6.1.
param[in] zrtpContext The context we are operation on param[in/out] zrtpChannelContext The channel context we are operation on(contains s0)
return 0 on success, error code otherwise
| int state_clear | ( | bzrtpEvent_t | event | ) |
We are in clear state.
Arrives from:
state_secure on GoClear reception
| int state_confirmation_initiatorSendingConfirm2 | ( | bzrtpEvent_t | event | ) |
Initiator send the confirm2 message.
Arrives from:
| int state_confirmation_responderSendingConfirm1 | ( | bzrtpEvent_t | event | ) |
Responder send the confirm1 message.
Arrives from:
| int state_discovery_init | ( | bzrtpEvent_t | event | ) |
This is the initial state On first call, we will create the Hello message and start sending it until we receive an helloACK or a hello message from peer.
Arrives from :
| int state_discovery_waitingForHello | ( | bzrtpEvent_t | event | ) |
Arrives in this state coming from init upon reception on Hello ACK, we are now waiting for the Hello packet from peer.
Arrives from :
| int state_discovery_waitingForHelloAck | ( | bzrtpEvent_t | event | ) |
We are now waiting for the HelloACK packet from peer or a Commit packet.
Arrives from :
| int state_keyAgreement_initiatorSendingDHPart2 | ( | bzrtpEvent_t | event | ) |
For DHM mode only, initiator send DHPart2 packet.
Arrives from:
| int state_keyAgreement_responderSendingDHPart1 | ( | bzrtpEvent_t | event | ) |
For DHM mode only, responder send DHPart1 packet.
Arrives from:
| int state_keyAgreement_sendingCommit | ( | bzrtpEvent_t | event | ) |
For any kind of key agreement (DHM, Mult, PreShared), we keep sending commit.
Arrives from :
| int state_secure | ( | bzrtpEvent_t | event | ) |
We are in secure state.
Arrives from:
ClearACK on GoClear reception (+ destroy all key materials)
| int state_sending_GoClear | ( | bzrtpEvent_t | event | ) |
GoClear initiator send a GoClear message.
Arrives from:
1.8.11