diff options
Diffstat (limited to 'thirdparties/mac/include/srtp/ekt.h')
-rwxr-xr-x | thirdparties/mac/include/srtp/ekt.h | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/thirdparties/mac/include/srtp/ekt.h b/thirdparties/mac/include/srtp/ekt.h index b0d888b..d7f9854 100755 --- a/thirdparties/mac/include/srtp/ekt.h +++ b/thirdparties/mac/include/srtp/ekt.h @@ -7,26 +7,26 @@ * Cisco Systems, Inc. */ /* - * + * * Copyright (c) 2001-2005 Cisco Systems, Inc. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: - * + * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. - * + * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. - * + * * Neither the name of the Cisco Systems, Inc. nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS @@ -45,12 +45,12 @@ /* - * EKT implementation strategy - * + * EKT implementation strategy + * * use stream_template approach * * in srtp_unprotect, when a new stream appears, check if template has - * EKT defined, and if it does, then apply EKT processing + * EKT defined, and if it does, then apply EKT processing * * question: will we want to allow key-sharing templates in addition * to EKT templates? could define a new ssrc_type_t that's associated @@ -88,10 +88,10 @@ ekt_octets_after_base_tag(ekt_stream_t ekt); */ typedef struct ekt_policy_ctx_t { - ekt_spi_t spi; /* security parameter index */ - uint8_t ekt_cipher_type; - uint8_t *ekt_key; - struct ekt_policy_ctx_t *next_ekt_policy; + ekt_spi_t spi; /* security parameter index */ + uint8_t ekt_cipher_type; + uint8_t *ekt_key; + struct ekt_policy_ctx_t *next_ekt_policy; } ekt_policy_ctx_t; @@ -101,11 +101,11 @@ typedef struct ekt_policy_ctx_t { */ typedef struct ekt_data_t { - ekt_spi_t spi; - uint8_t ekt_cipher_type; - aes_expanded_key_t ekt_enc_key; - aes_expanded_key_t ekt_dec_key; - struct ekt_data_t *next_ekt_data; + ekt_spi_t spi; + uint8_t ekt_cipher_type; + aes_expanded_key_t ekt_enc_key; + aes_expanded_key_t ekt_dec_key; + struct ekt_data_t *next_ekt_data; } ekt_data_t; /* @@ -116,39 +116,39 @@ typedef struct ekt_data_t { */ typedef struct ekt_stream_ctx_t { - ekt_data_t *data; - uint16_t isn; /* initial sequence number */ - uint8_t encrypted_master_key[SRTP_MAX_KEY_LEN]; + ekt_data_t *data; + uint16_t isn; /* initial sequence number */ + uint8_t encrypted_master_key[SRTP_MAX_KEY_LEN]; } ekt_stream_ctx_t; -err_status_t +err_status_t ekt_alloc(ekt_stream_t *stream_data, ekt_policy_t policy); err_status_t -ekt_stream_init(ekt_stream_t e, - ekt_spi_t spi, - void *ekt_key, - unsigned ekt_cipher_type); +ekt_stream_init(ekt_stream_t e, + ekt_spi_t spi, + void *ekt_key, + unsigned ekt_cipher_type); err_status_t ekt_stream_init_from_policy(ekt_stream_t e, ekt_policy_t p); - + err_status_t -srtp_stream_init_from_ekt(srtp_stream_t stream, - const void *srtcp_hdr, - unsigned pkt_octet_len); - +srtp_stream_init_from_ekt(srtp_stream_t stream, + const void *srtcp_hdr, + unsigned pkt_octet_len); + void ekt_write_data(ekt_stream_t ekt, - uint8_t *base_tag, - unsigned base_tag_len, - int *packet_len, - xtd_seq_num_t pkt_index); + uint8_t *base_tag, + unsigned base_tag_len, + int *packet_len, + xtd_seq_num_t pkt_index); /* * We handle EKT by performing some additional steps before @@ -160,14 +160,14 @@ ekt_write_data(ekt_stream_t ekt, */ err_status_t -ekt_tag_verification_preproces(uint8_t *pkt_tag, - uint8_t *pkt_tag_copy, - unsigned tag_len); +ekt_tag_verification_preproces(uint8_t *pkt_tag, + uint8_t *pkt_tag_copy, + unsigned tag_len); err_status_t ekt_tag_verification_postproces(uint8_t *pkt_tag, - uint8_t *pkt_tag_copy, - unsigned tag_len); + uint8_t *pkt_tag_copy, + unsigned tag_len); /* @@ -178,15 +178,15 @@ ekt_tag_verification_postproces(uint8_t *pkt_tag, * Master Key, the SRTP ROC, the Initial Sequence Number, and SPI * fields. The Base Authentication Tag field is set to the all-zero * value - * + * * When EKT is not used, this function is a no-op. - * + * */ err_status_t srtp_stream_srtcp_auth_tag_generation_preprocess(const srtp_stream_t *s, - uint8_t *pkt_tag, - unsigned pkt_octet_len); + uint8_t *pkt_tag, + unsigned pkt_octet_len); /* it's not clear that a tag_generation_postprocess function is needed */ |