webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Macros | Functions | Variables
srtp_driver.c File Reference
#include <string.h>
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
#include "getopt_s.h"
#include "util.h"
#include "srtp_priv.h"
#include "ekt.h"

Macros

#define PRINT_REFERENCE_PACKET   1
 
#define MAX_MSG_LEN   1024
 
#define MTU   2048
 

Functions

srtp_err_status_t srtp_validate (void)
 
srtp_err_status_t srtp_validate_encrypted_extensions_headers (void)
 
srtp_err_status_t srtp_validate_aes_256 (void)
 
srtp_err_status_t srtp_create_big_policy (srtp_policy_t **list)
 
srtp_err_status_t srtp_dealloc_big_policy (srtp_policy_t *list)
 
srtp_err_status_t srtp_test_empty_payload (void)
 
srtp_err_status_t srtp_test_remove_stream (void)
 
srtp_err_status_t srtp_test_update (void)
 
double srtp_bits_per_second (int msg_len_octets, const srtp_policy_t *policy)
 
double srtp_rejections_per_second (int msg_len_octets, const srtp_policy_t *policy)
 
void srtp_do_timing (const srtp_policy_t *policy)
 
void srtp_do_rejection_timing (const srtp_policy_t *policy)
 
srtp_err_status_t srtp_test (const srtp_policy_t *policy, int extension_header)
 
srtp_err_status_t srtcp_test (const srtp_policy_t *policy)
 
srtp_err_status_t srtp_session_print_policy (srtp_t srtp)
 
srtp_err_status_t srtp_print_policy (const srtp_policy_t *policy)
 
char * srtp_packet_to_string (srtp_hdr_t *hdr, int packet_len)
 
double mips_estimate (int num_trials, int *ignore)
 
void usage (char *prog_name)
 
int main (int argc, char *argv[])
 
srtp_hdr_tsrtp_create_test_packet (int pkt_octet_len, uint32_t ssrc)
 
srtp_hdr_tsrtp_create_test_packet_ext_hdr (int pkt_octet_len, uint32_t ssrc)
 
void err_check (srtp_err_status_t s)
 

Variables

uint8_t test_key [46]
 
const srtp_policy_tpolicy_array []
 
const srtp_policy_t wildcard_policy
 
srtp_debug_module_t mod_driver
 
char packet_string [MTU]
 
unsigned char test_alt_key [46]
 
const srtp_policy_t default_policy
 
const srtp_policy_t aes_only_policy
 
const srtp_policy_t hmac_only_policy
 
const srtp_policy_t null_policy
 
unsigned char test_256_key [46]
 
const srtp_policy_t aes_256_hmac_policy
 
uint8_t ekt_test_key [16]
 
srtp_ekt_policy_ctx_t ekt_test_policy
 
const srtp_policy_t hmac_only_with_ekt_policy
 

Macro Definition Documentation

◆ MAX_MSG_LEN

#define MAX_MSG_LEN   1024

◆ MTU

#define MTU   2048

◆ PRINT_REFERENCE_PACKET

#define PRINT_REFERENCE_PACKET   1

Function Documentation

◆ err_check()

void err_check ( srtp_err_status_t  s)

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ mips_estimate()

double mips_estimate ( int  num_trials,
int *  ignore 
)

◆ srtcp_test()

srtp_err_status_t srtcp_test ( const srtp_policy_t policy)

◆ srtp_bits_per_second()

double srtp_bits_per_second ( int  msg_len_octets,
const srtp_policy_t policy 
)

◆ srtp_create_big_policy()

srtp_err_status_t srtp_create_big_policy ( srtp_policy_t **  list)

◆ srtp_create_test_packet()

srtp_hdr_t* srtp_create_test_packet ( int  pkt_octet_len,
uint32_t  ssrc 
)

◆ srtp_create_test_packet_ext_hdr()

srtp_hdr_t* srtp_create_test_packet_ext_hdr ( int  pkt_octet_len,
uint32_t  ssrc 
)

◆ srtp_dealloc_big_policy()

srtp_err_status_t srtp_dealloc_big_policy ( srtp_policy_t list)

◆ srtp_do_rejection_timing()

void srtp_do_rejection_timing ( const srtp_policy_t policy)

◆ srtp_do_timing()

void srtp_do_timing ( const srtp_policy_t policy)

◆ srtp_packet_to_string()

char * srtp_packet_to_string ( srtp_hdr_t hdr,
int  packet_len 
)

◆ srtp_print_policy()

srtp_err_status_t srtp_print_policy ( const srtp_policy_t policy)

◆ srtp_rejections_per_second()

double srtp_rejections_per_second ( int  msg_len_octets,
const srtp_policy_t policy 
)

◆ srtp_session_print_policy()

srtp_err_status_t srtp_session_print_policy ( srtp_t  srtp)

◆ srtp_test()

srtp_err_status_t srtp_test ( const srtp_policy_t policy,
int  extension_header 
)

◆ srtp_test_empty_payload()

srtp_err_status_t srtp_test_empty_payload ( void  )

◆ srtp_test_remove_stream()

srtp_err_status_t srtp_test_remove_stream ( void  )

◆ srtp_test_update()

srtp_err_status_t srtp_test_update ( void  )

◆ srtp_validate()

srtp_err_status_t srtp_validate ( void  )

◆ srtp_validate_aes_256()

srtp_err_status_t srtp_validate_aes_256 ( void  )

◆ srtp_validate_encrypted_extensions_headers()

srtp_err_status_t srtp_validate_encrypted_extensions_headers ( void  )

◆ usage()

void usage ( char *  prog_name)

Variable Documentation

◆ aes_256_hmac_policy

const srtp_policy_t aes_256_hmac_policy
Initial value:
= {
{
46,
20,
10,
},
{
46,
20,
10,
sec_serv_conf_and_auth
},
NULL,
128,
0,
NULL,
0,
NULL
}
unsigned char test_256_key[46]
Definition: srtp_driver.c:2854
#define SRTP_HMAC_SHA1
Definition: crypto_types.h:114
Definition: srtp.h:293
#define SRTP_AES_ICM
Definition: crypto_types.h:64
Definition: srtp.h:335
#define NULL
Definition: common_types.h:41

◆ aes_only_policy

const srtp_policy_t aes_only_policy
Initial value:
= {
{
30,
0,
0,
},
{
30,
0,
0,
sec_serv_conf
},
NULL,
128,
0,
NULL,
0,
NULL
}
uint8_t test_key[46]
Definition: srtp_driver.c:2626
#define SRTP_AES_128_ICM
Definition: crypto_types.h:70
#define SRTP_NULL_AUTH
Definition: crypto_types.h:106
Definition: srtp.h:335
#define NULL
Definition: common_types.h:41
Definition: srtp.h:291

◆ default_policy

const srtp_policy_t default_policy
Initial value:
= {
{
30,
16,
10,
},
{
30,
16,
10,
sec_serv_conf_and_auth
},
NULL,
128,
0,
NULL,
0,
NULL
}
uint8_t test_key[46]
Definition: srtp_driver.c:2626
#define SRTP_HMAC_SHA1
Definition: crypto_types.h:114
#define SRTP_AES_128_ICM
Definition: crypto_types.h:70
Definition: srtp.h:293
Definition: srtp.h:335
#define NULL
Definition: common_types.h:41

◆ ekt_test_key

uint8_t ekt_test_key[16]
Initial value:
= {
0x77, 0x26, 0x9d, 0xac, 0x16, 0xa3, 0x28, 0xca,
0x8e, 0xc9, 0x68, 0x4b, 0xcc, 0xc4, 0xd2, 0x1b
}

◆ ekt_test_policy

srtp_ekt_policy_ctx_t ekt_test_policy
Initial value:
= {
0xa5a5,
}
uint8_t ekt_test_key[16]
Definition: srtp_driver.c:2891
#define NULL
Definition: common_types.h:41
#define SRTP_EKT_CIPHER_AES_128_ECB
Definition: ekt.h:72

◆ hmac_only_policy

const srtp_policy_t hmac_only_policy
Initial value:
= {
{
0,
20,
4,
},
{
0,
20,
4,
sec_serv_auth
},
NULL,
128,
0,
NULL,
0,
NULL
}
#define SRTP_NULL_CIPHER
Definition: crypto_types.h:55
uint8_t test_key[46]
Definition: srtp_driver.c:2626
#define SRTP_HMAC_SHA1
Definition: crypto_types.h:114
Definition: srtp.h:292
Definition: srtp.h:335
#define NULL
Definition: common_types.h:41

◆ hmac_only_with_ekt_policy

const srtp_policy_t hmac_only_with_ekt_policy
Initial value:
= {
{
0,
20,
4,
},
{
0,
20,
4,
sec_serv_auth
},
128,
0,
NULL,
0,
NULL
}
#define SRTP_NULL_CIPHER
Definition: crypto_types.h:55
uint8_t test_key[46]
Definition: srtp_driver.c:2626
srtp_ekt_policy_ctx_t ekt_test_policy
Definition: srtp_driver.c:2898
#define SRTP_HMAC_SHA1
Definition: crypto_types.h:114
Definition: srtp.h:292
Definition: srtp.h:335
#define NULL
Definition: common_types.h:41

◆ mod_driver

srtp_debug_module_t mod_driver
Initial value:
= {
0,
"driver"
}

◆ null_policy

const srtp_policy_t null_policy
Initial value:
= {
{
0,
0,
0,
},
{
0,
0,
0,
sec_serv_none
},
NULL,
128,
0,
NULL,
0,
NULL
}
#define SRTP_NULL_CIPHER
Definition: crypto_types.h:55
uint8_t test_key[46]
Definition: srtp_driver.c:2626
#define SRTP_NULL_AUTH
Definition: crypto_types.h:106
Definition: srtp.h:335
#define NULL
Definition: common_types.h:41
Definition: srtp.h:290

◆ packet_string

char packet_string[MTU]

◆ policy_array

const srtp_policy_t * policy_array
Initial value:
= {
}
const srtp_policy_t default_policy
Definition: srtp_driver.c:2636
const srtp_policy_t null_policy
Definition: srtp_driver.c:2827
const srtp_policy_t hmac_only_with_ekt_policy
Definition: srtp_driver.c:2905
const srtp_policy_t hmac_only_policy
Definition: srtp_driver.c:2690
const srtp_policy_t aes_only_policy
Definition: srtp_driver.c:2663
#define NULL
Definition: common_types.h:41
const srtp_policy_t aes_256_hmac_policy
Definition: srtp_driver.c:2864

◆ test_256_key

unsigned char test_256_key[46]
Initial value:
= {
0xf0, 0xf0, 0x49, 0x14, 0xb5, 0x13, 0xf2, 0x76,
0x3a, 0x1b, 0x1f, 0xa1, 0x30, 0xf1, 0x0e, 0x29,
0x98, 0xf6, 0xf6, 0xe4, 0x3e, 0x43, 0x09, 0xd1,
0xe6, 0x22, 0xa0, 0xe3, 0x32, 0xb9, 0xf1, 0xb6,
0x3b, 0x04, 0x80, 0x3d, 0xe5, 0x1e, 0xe7, 0xc9,
0x64, 0x23, 0xab, 0x5b, 0x78, 0xd2
}

◆ test_alt_key

unsigned char test_alt_key[46]
Initial value:
= {
0xe5, 0x19, 0x6f, 0x01, 0x5e, 0xf1, 0x9b, 0xe1,
0xd7, 0x47, 0xa7, 0x27, 0x07, 0xd7, 0x47, 0x33,
0x01, 0xc2, 0x35, 0x4d, 0x59, 0x6a, 0xf7, 0x84,
0x96, 0x98, 0xeb, 0xaa, 0xac, 0xf6, 0xa1, 0x45,
0xc7, 0x15, 0xe2, 0xea, 0xfe, 0x55, 0x67, 0x96,
0xb6, 0x96, 0x0b, 0x3a, 0xab, 0xe6
}

◆ test_key

unsigned char test_key
Initial value:
= {
0xe1, 0xf9, 0x7a, 0x0d, 0x3e, 0x01, 0x8b, 0xe0,
0xd6, 0x4f, 0xa3, 0x2c, 0x06, 0xde, 0x41, 0x39,
0x0e, 0xc6, 0x75, 0xad, 0x49, 0x8a, 0xfe, 0xeb,
0xb6, 0x96, 0x0b, 0x3a, 0xab, 0xe6, 0xc1, 0x73,
0xc3, 0x17, 0xf2, 0xda, 0xbe, 0x35, 0x77, 0x93,
0xb6, 0x96, 0x0b, 0x3a, 0xab, 0xe6
}

◆ wildcard_policy

const srtp_policy_t wildcard_policy
Initial value:
= {
{
30,
16,
10,
},
{
30,
16,
10,
sec_serv_conf_and_auth
},
128,
0,
NULL,
0,
NULL
}
uint8_t test_key[46]
Definition: srtp_driver.c:2626
#define SRTP_HMAC_SHA1
Definition: crypto_types.h:114
#define SRTP_AES_128_ICM
Definition: crypto_types.h:70
Definition: srtp.h:293
Definition: srtp.h:335
#define NULL
Definition: common_types.h:41