Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for cryptex #511

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions include/srtp.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ typedef enum {
srtp_err_status_pkt_idx_adv = 27, /**< packet index advanced, reset */
/**< needed */
srtp_err_status_buffer_small = 28, /**< out buffer is too small */
srtp_err_status_cryptex_err = 29, /**< unsupported cryptex operation */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than adding this error, why not just disable extension encryption of extensions are not present?

} srtp_err_status_t;

typedef struct srtp_ctx_t_ srtp_ctx_t;
Expand Down Expand Up @@ -351,6 +352,8 @@ typedef struct srtp_policy_t {
uint8_t *enc_xtn_hdr; /**< List of header ids to encrypt. */
size_t enc_xtn_hdr_count; /**< Number of entries in list of header */
/**< ids. */
bool use_cryptex; /**< Encrypt header block and CSRCS with */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the last S lowercase yielding CSRCs.

/**< cryptex. */
struct srtp_policy_t *next; /**< Pointer to next stream policy. */
} srtp_policy_t;

Expand Down
1 change: 1 addition & 0 deletions include/srtp_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ typedef struct srtp_stream_ctx_t_ {
uint8_t *enc_xtn_hdr;
size_t enc_xtn_hdr_count;
uint32_t pending_roc;
bool use_cryptex;
} strp_stream_ctx_t_;

/*
Expand Down
Loading
Loading