Skip to content

Commit

Permalink
docs: Improve documentation related to ZRTP negotiation
Browse files Browse the repository at this point in the history
  • Loading branch information
tampsa committed May 24, 2024
1 parent c42207a commit f75942b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ session->create_stream(..., RCE_SRTP | RCE_SRTP_KMNGMNT_ZRTP | RCE_SRTP_NULL_CIP
| RCE_SEND_ONLY | Use this to prevent binding to a local address |
| RCE_RECEIVE_ONLY | Use this to interpret any address as local address and prevent sending |
| RCE_SRTP | Enable SRTP, must be coupled with either RCE_SRTP_KMNGMNT_ZRTP or RCE_SRTP_KMNGMNT_USER |
| RCE_SRTP_KMNGMNT_ZRTP | Use ZRTP to manage keys (see section SRTP for more details) |
| RCE_SRTP_KMNGMNT_ZRTP | Use automatic ZRTP negotiation to manage keys (see section SRTP for more details) |
| RCE_SRTP_KMNGMNT_USER | Let user manage keys (see section SRTP for more details) |
| RCE_H26X_DO_NOT_PREPEND_SC | Prevent uvgRTP from prepending start code prefix to received H26x frames. Use this is your decoder doesn't expect prefixes |
| RCE_H26X_DEPENDENCY_ENFORCEMENT | In progress feature. When ready, a loss of frame means that rest of the frames that depended on that frame are also dropped |
Expand Down Expand Up @@ -154,6 +154,11 @@ uvgRTP provides two ways for an application to deal with SRTP key-management: 1)
uvgRTP supports Diffie-Hellman and Multistream modes of ZRTP. To use ZRTP, user must provide `RCE_SRTP | RCE_SRTP_KMNGMNT_ZRTP` flag combination
to `create_stream()` as well as `RCE_ZRTP_MULTISTREAM_MODE` flag for all streams which are in Multistream mode. See [ZRTP Multistream example](../examples/zrtp_multistream.cc) for more details.

If you want to manually trigger ZRTP negotiation instead of it starting automatically with media stream creation, use the following flags:
`RCE_SRTP | RCE_ZRTP_DIFFIE_HELLMAN_MODE` or `RCE_SRTP | RCE_ZRTP_MULTISTREAM_MODE`,
configure media stream values such as SSRC values using `configure_ctx()`,
and start ZRTP negotiation with `start_zrtp()`.

### User-managed SRTP

The second way of handling key-management of SRTP is to do it outside uvgRTP. To use user-managed keys, user must provide `RCE_SRTP | RCE_SRTP_KMNGMNT_USER` flag combination to `create_stream()`. uvgRTP supports 128-bit keys and and 112-bit salts which must be given to the `uvgrtp::media_stream` object using `add_srtp_ctx()` after `create_stream()` has been called. All other calls to the media_stream before `add_srtp_ctx()`-call will fail. See [this example code](../examples/srtp_user.cc) for more details.
Expand Down

0 comments on commit f75942b

Please sign in to comment.