Lines Matching refs:session_keys
157 srtp_session_keys_t *session_keys = NULL; in srtp_stream_dealloc() local
165 if (stream->session_keys) { in srtp_stream_dealloc()
167 session_keys = &stream->session_keys[i]; in srtp_stream_dealloc()
171 template_session_keys = &stream_template->session_keys[i]; in srtp_stream_dealloc()
180 session_keys->rtp_cipher == template_session_keys->rtp_cipher) { in srtp_stream_dealloc()
182 } else if (session_keys->rtp_cipher) { in srtp_stream_dealloc()
183 status = srtp_cipher_dealloc(session_keys->rtp_cipher); in srtp_stream_dealloc()
193 session_keys->rtp_auth == template_session_keys->rtp_auth) { in srtp_stream_dealloc()
195 } else if (session_keys->rtp_auth) { in srtp_stream_dealloc()
196 status = srtp_auth_dealloc(session_keys->rtp_auth); in srtp_stream_dealloc()
202 session_keys->rtp_xtn_hdr_cipher == in srtp_stream_dealloc()
205 } else if (session_keys->rtp_xtn_hdr_cipher) { in srtp_stream_dealloc()
206 status = srtp_cipher_dealloc(session_keys->rtp_xtn_hdr_cipher); in srtp_stream_dealloc()
216 session_keys->rtcp_cipher == in srtp_stream_dealloc()
219 } else if (session_keys->rtcp_cipher) { in srtp_stream_dealloc()
220 status = srtp_cipher_dealloc(session_keys->rtcp_cipher); in srtp_stream_dealloc()
230 session_keys->rtcp_auth == template_session_keys->rtcp_auth) { in srtp_stream_dealloc()
232 } else if (session_keys->rtcp_auth) { in srtp_stream_dealloc()
233 status = srtp_auth_dealloc(session_keys->rtcp_auth); in srtp_stream_dealloc()
241 octet_string_set_to_zero(session_keys->salt, SRTP_AEAD_SALT_LEN); in srtp_stream_dealloc()
242 octet_string_set_to_zero(session_keys->c_salt, SRTP_AEAD_SALT_LEN); in srtp_stream_dealloc()
244 if (session_keys->mki_id) { in srtp_stream_dealloc()
245 octet_string_set_to_zero(session_keys->mki_id, in srtp_stream_dealloc()
246 session_keys->mki_size); in srtp_stream_dealloc()
247 srtp_crypto_free(session_keys->mki_id); in srtp_stream_dealloc()
248 session_keys->mki_id = NULL; in srtp_stream_dealloc()
256 session_keys->limit == template_session_keys->limit) { in srtp_stream_dealloc()
258 } else if (session_keys->limit) { in srtp_stream_dealloc()
259 srtp_crypto_free(session_keys->limit); in srtp_stream_dealloc()
262 srtp_crypto_free(stream->session_keys); in srtp_stream_dealloc()
290 srtp_session_keys_t *session_keys = NULL; in srtp_stream_alloc() local
317 str->session_keys = (srtp_session_keys_t *)srtp_crypto_alloc( in srtp_stream_alloc()
320 if (str->session_keys == NULL) { in srtp_stream_alloc()
326 session_keys = &str->session_keys[i]; in srtp_stream_alloc()
330 p->rtp.cipher_type, &session_keys->rtp_cipher, in srtp_stream_alloc()
339 p->rtp.auth_type, &session_keys->rtp_auth, p->rtp.auth_key_len, in srtp_stream_alloc()
351 p->rtcp.cipher_type, &session_keys->rtcp_cipher, in srtp_stream_alloc()
360 p->rtcp.auth_type, &session_keys->rtcp_auth, p->rtcp.auth_key_len, in srtp_stream_alloc()
367 session_keys->mki_id = NULL; in srtp_stream_alloc()
370 session_keys->limit = (srtp_key_limit_ctx_t *)srtp_crypto_alloc( in srtp_stream_alloc()
372 if (session_keys->limit == NULL) { in srtp_stream_alloc()
419 session_keys = &str->session_keys[i]; in srtp_stream_alloc()
423 enc_xtn_hdr_cipher_type, &session_keys->rtp_xtn_hdr_cipher, in srtp_stream_alloc()
432 session_keys = &str->session_keys[i]; in srtp_stream_alloc()
433 session_keys->rtp_xtn_hdr_cipher = NULL; in srtp_stream_alloc()
458 srtp_session_keys_t *session_keys = NULL; in srtp_stream_clone() local
470 str->session_keys = (srtp_session_keys_t *)srtp_crypto_alloc( in srtp_stream_clone()
473 if (str->session_keys == NULL) { in srtp_stream_clone()
480 session_keys = &str->session_keys[i]; in srtp_stream_clone()
481 template_session_keys = &stream_template->session_keys[i]; in srtp_stream_clone()
484 session_keys->rtp_cipher = template_session_keys->rtp_cipher; in srtp_stream_clone()
485 session_keys->rtp_auth = template_session_keys->rtp_auth; in srtp_stream_clone()
486 session_keys->rtp_xtn_hdr_cipher = in srtp_stream_clone()
488 session_keys->rtcp_cipher = template_session_keys->rtcp_cipher; in srtp_stream_clone()
489 session_keys->rtcp_auth = template_session_keys->rtcp_auth; in srtp_stream_clone()
490 session_keys->mki_size = template_session_keys->mki_size; in srtp_stream_clone()
493 session_keys->mki_id = NULL; in srtp_stream_clone()
495 session_keys->mki_id = in srtp_stream_clone()
498 if (session_keys->mki_id == NULL) { in srtp_stream_clone()
503 memcpy(session_keys->mki_id, template_session_keys->mki_id, in srtp_stream_clone()
504 session_keys->mki_size); in srtp_stream_clone()
507 memcpy(session_keys->salt, template_session_keys->salt, in srtp_stream_clone()
509 memcpy(session_keys->c_salt, template_session_keys->c_salt, in srtp_stream_clone()
514 &session_keys->limit); in srtp_stream_clone()
809 return &stream->session_keys[mki_index]; in srtp_get_session_keys_with_mki_index()
812 return &stream->session_keys[0]; in srtp_get_session_keys_with_mki_index()
816 srtp_session_keys_t *session_keys, in srtp_inject_mki() argument
822 mki_size = session_keys->mki_size; in srtp_inject_mki()
826 memcpy(mki_tag_location, session_keys->mki_id, mki_size); in srtp_inject_mki()
875 srtp_session_keys_t *session_keys = NULL; in srtp_stream_init_keys() local
882 session_keys = &srtp->session_keys[current_mki_index]; in srtp_stream_init_keys()
889 srtp_key_limit_set(session_keys->limit, temp); in srtp_stream_init_keys()
892 srtp_key_limit_set(session_keys->limit, 0xffffffffffffLL); in srtp_stream_init_keys()
896 session_keys->mki_id = srtp_crypto_alloc(master_key->mki_size); in srtp_stream_init_keys()
898 if (session_keys->mki_id == NULL) { in srtp_stream_init_keys()
901 memcpy(session_keys->mki_id, master_key->mki_id, master_key->mki_size); in srtp_stream_init_keys()
903 session_keys->mki_id = NULL; in srtp_stream_init_keys()
906 session_keys->mki_size = master_key->mki_size; in srtp_stream_init_keys()
908 rtp_keylen = srtp_cipher_get_key_length(session_keys->rtp_cipher); in srtp_stream_init_keys()
909 rtcp_keylen = srtp_cipher_get_key_length(session_keys->rtcp_cipher); in srtp_stream_init_keys()
911 base_key_length(session_keys->rtp_cipher->type, rtp_keylen); in srtp_stream_init_keys()
975 memcpy(session_keys->salt, tmp_key + rtp_base_key_len, in srtp_stream_init_keys()
985 stat = srtp_cipher_init(session_keys->rtp_cipher, tmp_key); in srtp_stream_init_keys()
992 if (session_keys->rtp_xtn_hdr_cipher) { in srtp_stream_init_keys()
1000 if (session_keys->rtp_xtn_hdr_cipher->type != in srtp_stream_init_keys()
1001 session_keys->rtp_cipher->type) { in srtp_stream_init_keys()
1009 srtp_cipher_get_key_length(session_keys->rtp_xtn_hdr_cipher); in srtp_stream_init_keys()
1011 session_keys->rtp_xtn_hdr_cipher->type, rtp_xtn_hdr_keylen); in srtp_stream_init_keys()
1015 switch (session_keys->rtp_cipher->type->id) { in srtp_stream_init_keys()
1096 stat = srtp_cipher_init(session_keys->rtp_xtn_hdr_cipher, tmp_key); in srtp_stream_init_keys()
1116 srtp_auth_get_key_length(session_keys->rtp_auth)); in srtp_stream_init_keys()
1124 tmp_key, srtp_auth_get_key_length(session_keys->rtp_auth))); in srtp_stream_init_keys()
1127 stat = srtp_auth_init(session_keys->rtp_auth, tmp_key); in srtp_stream_init_keys()
1139 base_key_length(session_keys->rtcp_cipher->type, rtcp_keylen); in srtp_stream_init_keys()
1168 memcpy(session_keys->c_salt, tmp_key + rtcp_base_key_len, in srtp_stream_init_keys()
1180 stat = srtp_cipher_init(session_keys->rtcp_cipher, tmp_key); in srtp_stream_init_keys()
1189 srtp_auth_get_key_length(session_keys->rtcp_auth)); in srtp_stream_init_keys()
1199 tmp_key, srtp_auth_get_key_length(session_keys->rtcp_auth))); in srtp_stream_init_keys()
1202 stat = srtp_auth_init(session_keys->rtcp_auth, tmp_key); in srtp_stream_init_keys()
1382 srtp_session_keys_t *session_keys) in srtp_process_header_encryption() argument
1407 status = srtp_cipher_output(session_keys->rtp_xtn_hdr_cipher, in srtp_process_header_encryption()
1439 status = srtp_cipher_output(session_keys->rtp_xtn_hdr_cipher, in srtp_process_header_encryption()
1497 static void srtp_calc_aead_iv(srtp_session_keys_t *session_keys, in srtp_calc_aead_iv() argument
1529 memcpy(salt.v8, session_keys->salt, SRTP_AEAD_SALT_LEN); in srtp_calc_aead_iv()
1549 if (stream->session_keys[0].rtp_cipher->algorithm == SRTP_AES_GCM_128 || in srtp_get_session_keys()
1550 stream->session_keys[0].rtp_cipher->algorithm == SRTP_AES_GCM_256) { in srtp_get_session_keys()
1553 tag_len = srtp_auth_get_tag_length(stream->session_keys[0].rtp_auth); in srtp_get_session_keys()
1564 if (stream->session_keys[i].mki_size != 0 && in srtp_get_session_keys()
1565 stream->session_keys[i].mki_size <= base_mki_start_location) { in srtp_get_session_keys()
1566 *mki_size = stream->session_keys[i].mki_size; in srtp_get_session_keys()
1569 if (memcmp(hdr + mki_start_location, stream->session_keys[i].mki_id, in srtp_get_session_keys()
1571 return &stream->session_keys[i]; in srtp_get_session_keys()
1688 srtp_session_keys_t *session_keys, in srtp_protect_aead() argument
1711 switch (srtp_key_limit_update(session_keys->limit)) { in srtp_protect_aead()
1724 tag_len = srtp_auth_get_tag_length(session_keys->rtp_auth); in srtp_protect_aead()
1769 srtp_calc_aead_iv(session_keys, &iv, &est, hdr); in srtp_protect_aead()
1778 status = srtp_cipher_set_iv(session_keys->rtp_cipher, (uint8_t *)&iv, in srtp_protect_aead()
1780 if (!status && session_keys->rtp_xtn_hdr_cipher) { in srtp_protect_aead()
1784 status = srtp_cipher_set_iv(session_keys->rtp_xtn_hdr_cipher, in srtp_protect_aead()
1791 if (xtn_hdr && session_keys->rtp_xtn_hdr_cipher) { in srtp_protect_aead()
1795 status = srtp_process_header_encryption(stream, xtn_hdr, session_keys); in srtp_protect_aead()
1806 srtp_cipher_set_aad(session_keys->rtp_cipher, (uint8_t *)hdr, aad_len); in srtp_protect_aead()
1812 status = srtp_cipher_encrypt(session_keys->rtp_cipher, (uint8_t *)enc_start, in srtp_protect_aead()
1822 srtp_cipher_get_tag(session_keys->rtp_cipher, in srtp_protect_aead()
1829 mki_size = srtp_inject_mki(mki_location, session_keys, use_mki); in srtp_protect_aead()
1853 srtp_session_keys_t *session_keys, in srtp_unprotect_aead() argument
1875 tag_len = srtp_auth_get_tag_length(session_keys->rtp_auth); in srtp_unprotect_aead()
1880 srtp_calc_aead_iv(session_keys, &iv, &est, hdr); in srtp_unprotect_aead()
1881 status = srtp_cipher_set_iv(session_keys->rtp_cipher, (uint8_t *)&iv, in srtp_unprotect_aead()
1883 if (!status && session_keys->rtp_xtn_hdr_cipher) { in srtp_unprotect_aead()
1892 status = srtp_cipher_set_iv(session_keys->rtp_xtn_hdr_cipher, in srtp_unprotect_aead()
1933 switch (srtp_key_limit_update(session_keys->limit)) { in srtp_unprotect_aead()
1951 srtp_cipher_set_aad(session_keys->rtp_cipher, (uint8_t *)hdr, aad_len); in srtp_unprotect_aead()
1958 status = srtp_cipher_decrypt(session_keys->rtp_cipher, (uint8_t *)enc_start, in srtp_unprotect_aead()
1964 if (xtn_hdr && session_keys->rtp_xtn_hdr_cipher) { in srtp_unprotect_aead()
1968 status = srtp_process_header_encryption(stream, xtn_hdr, session_keys); in srtp_unprotect_aead()
2062 srtp_session_keys_t *session_keys = NULL; in srtp_protect_mki() local
2127 session_keys = in srtp_protect_mki()
2130 if (session_keys == NULL) in srtp_protect_mki()
2137 if (session_keys->rtp_cipher->algorithm == SRTP_AES_GCM_128 || in srtp_protect_mki()
2138 session_keys->rtp_cipher->algorithm == SRTP_AES_GCM_256) { in srtp_protect_mki()
2140 (unsigned int *)pkt_octet_len, session_keys, in srtp_protect_mki()
2149 switch (srtp_key_limit_update(session_keys->limit)) { in srtp_protect_mki()
2163 tag_len = srtp_auth_get_tag_length(session_keys->rtp_auth); in srtp_protect_mki()
2191 mki_size = srtp_inject_mki(mki_location, session_keys, use_mki); in srtp_protect_mki()
2243 if (session_keys->rtp_cipher->type->id == SRTP_AES_ICM_128 || in srtp_protect_mki()
2244 session_keys->rtp_cipher->type->id == SRTP_AES_ICM_192 || in srtp_protect_mki()
2245 session_keys->rtp_cipher->type->id == SRTP_AES_ICM_256) { in srtp_protect_mki()
2256 status = srtp_cipher_set_iv(session_keys->rtp_cipher, (uint8_t *)&iv, in srtp_protect_mki()
2258 if (!status && session_keys->rtp_xtn_hdr_cipher) { in srtp_protect_mki()
2259 status = srtp_cipher_set_iv(session_keys->rtp_xtn_hdr_cipher, in srtp_protect_mki()
2273 status = srtp_cipher_set_iv(session_keys->rtp_cipher, (uint8_t *)&iv, in srtp_protect_mki()
2275 if (!status && session_keys->rtp_xtn_hdr_cipher) { in srtp_protect_mki()
2276 status = srtp_cipher_set_iv(session_keys->rtp_xtn_hdr_cipher, in srtp_protect_mki()
2296 prefix_len = srtp_auth_get_prefix_length(session_keys->rtp_auth); in srtp_protect_mki()
2298 status = srtp_cipher_output(session_keys->rtp_cipher, auth_tag, in srtp_protect_mki()
2307 if (xtn_hdr && session_keys->rtp_xtn_hdr_cipher) { in srtp_protect_mki()
2311 status = srtp_process_header_encryption(stream, xtn_hdr, session_keys); in srtp_protect_mki()
2320 srtp_cipher_encrypt(session_keys->rtp_cipher, (uint8_t *)enc_start, in srtp_protect_mki()
2332 status = srtp_auth_start(session_keys->rtp_auth); in srtp_protect_mki()
2337 status = srtp_auth_update(session_keys->rtp_auth, (uint8_t *)auth_start, in srtp_protect_mki()
2344 status = srtp_auth_compute(session_keys->rtp_auth, (uint8_t *)&est, 4, in srtp_protect_mki()
2391 srtp_session_keys_t *session_keys = NULL; in srtp_unprotect_mki() local
2470 session_keys = srtp_get_session_keys( in srtp_unprotect_mki()
2474 if (session_keys == NULL) in srtp_unprotect_mki()
2477 session_keys = &stream->session_keys[0]; in srtp_unprotect_mki()
2484 if (session_keys->rtp_cipher->algorithm == SRTP_AES_GCM_128 || in srtp_unprotect_mki()
2485 session_keys->rtp_cipher->algorithm == SRTP_AES_GCM_256) { in srtp_unprotect_mki()
2487 (unsigned int *)pkt_octet_len, session_keys, in srtp_unprotect_mki()
2492 tag_len = srtp_auth_get_tag_length(session_keys->rtp_auth); in srtp_unprotect_mki()
2498 if (session_keys->rtp_cipher->type->id == SRTP_AES_ICM_128 || in srtp_unprotect_mki()
2499 session_keys->rtp_cipher->type->id == SRTP_AES_ICM_192 || in srtp_unprotect_mki()
2500 session_keys->rtp_cipher->type->id == SRTP_AES_ICM_256) { in srtp_unprotect_mki()
2510 status = srtp_cipher_set_iv(session_keys->rtp_cipher, (uint8_t *)&iv, in srtp_unprotect_mki()
2512 if (!status && session_keys->rtp_xtn_hdr_cipher) { in srtp_unprotect_mki()
2513 status = srtp_cipher_set_iv(session_keys->rtp_xtn_hdr_cipher, in srtp_unprotect_mki()
2525 status = srtp_cipher_set_iv(session_keys->rtp_cipher, (uint8_t *)&iv, in srtp_unprotect_mki()
2527 if (!status && session_keys->rtp_xtn_hdr_cipher) { in srtp_unprotect_mki()
2528 status = srtp_cipher_set_iv(session_keys->rtp_xtn_hdr_cipher, in srtp_unprotect_mki()
2591 if (session_keys->rtp_auth->prefix_len != 0) { in srtp_unprotect_mki()
2592 prefix_len = srtp_auth_get_prefix_length(session_keys->rtp_auth); in srtp_unprotect_mki()
2593 status = srtp_cipher_output(session_keys->rtp_cipher, tmp_tag, in srtp_unprotect_mki()
2602 status = srtp_auth_start(session_keys->rtp_auth); in srtp_unprotect_mki()
2607 status = srtp_auth_update(session_keys->rtp_auth, (uint8_t *)auth_start, in srtp_unprotect_mki()
2611 status = srtp_auth_compute(session_keys->rtp_auth, (uint8_t *)&est, 4, in srtp_unprotect_mki()
2630 switch (srtp_key_limit_update(session_keys->limit)) { in srtp_unprotect_mki()
2643 if (xtn_hdr && session_keys->rtp_xtn_hdr_cipher) { in srtp_unprotect_mki()
2645 status = srtp_process_header_encryption(stream, xtn_hdr, session_keys); in srtp_unprotect_mki()
2653 status = srtp_cipher_decrypt(session_keys->rtp_cipher, in srtp_unprotect_mki()
3021 (stream->session_keys[0].rtp_auth != in update_template_streams()
3022 session->stream_template->session_keys[0].rtp_auth)) { in update_template_streams()
3446 srtp_session_keys_t *session_keys, in srtp_calc_aead_iv_srtcp() argument
3475 memcpy(salt.v8, session_keys->c_salt, 12); in srtp_calc_aead_iv_srtcp()
3495 srtp_session_keys_t *session_keys, in srtp_protect_rtcp_aead() argument
3512 tag_len = srtp_auth_get_tag_length(session_keys->rtcp_auth); in srtp_protect_rtcp_aead()
3537 session_keys, use_mki); in srtp_protect_rtcp_aead()
3564 status = srtp_calc_aead_iv_srtcp(session_keys, &iv, seq_num, hdr); in srtp_protect_rtcp_aead()
3568 status = srtp_cipher_set_iv(session_keys->rtcp_cipher, (uint8_t *)&iv, in srtp_protect_rtcp_aead()
3582 status = srtp_cipher_set_aad(session_keys->rtcp_cipher, (uint8_t *)hdr, in srtp_protect_rtcp_aead()
3593 status = srtp_cipher_set_aad(session_keys->rtcp_cipher, (uint8_t *)hdr, in srtp_protect_rtcp_aead()
3603 status = srtp_cipher_set_aad(session_keys->rtcp_cipher, (uint8_t *)&tseq, in srtp_protect_rtcp_aead()
3611 status = srtp_cipher_encrypt(session_keys->rtcp_cipher, in srtp_protect_rtcp_aead()
3619 status = srtp_cipher_get_tag(session_keys->rtcp_cipher, in srtp_protect_rtcp_aead()
3631 status = srtp_cipher_encrypt(session_keys->rtcp_cipher, NULL, &nolen); in srtp_protect_rtcp_aead()
3638 status = srtp_cipher_get_tag(session_keys->rtcp_cipher, in srtp_protect_rtcp_aead()
3666 srtp_session_keys_t *session_keys, in srtp_unprotect_rtcp_aead() argument
3684 tag_len = srtp_auth_get_tag_length(session_keys->rtcp_auth); in srtp_unprotect_rtcp_aead()
3687 mki_size = session_keys->mki_size; in srtp_unprotect_rtcp_aead()
3731 status = srtp_calc_aead_iv_srtcp(session_keys, &iv, seq_num, hdr); in srtp_unprotect_rtcp_aead()
3735 status = srtp_cipher_set_iv(session_keys->rtcp_cipher, (uint8_t *)&iv, in srtp_unprotect_rtcp_aead()
3749 status = srtp_cipher_set_aad(session_keys->rtcp_cipher, (uint8_t *)hdr, in srtp_unprotect_rtcp_aead()
3761 session_keys->rtcp_cipher, (uint8_t *)hdr, in srtp_unprotect_rtcp_aead()
3772 status = srtp_cipher_set_aad(session_keys->rtcp_cipher, (uint8_t *)&tseq, in srtp_unprotect_rtcp_aead()
3780 status = srtp_cipher_decrypt(session_keys->rtcp_cipher, in srtp_unprotect_rtcp_aead()
3790 status = srtp_cipher_decrypt(session_keys->rtcp_cipher, in srtp_unprotect_rtcp_aead()
3879 srtp_session_keys_t *session_keys = NULL; in srtp_protect_rtcp_mki() local
3931 session_keys = in srtp_protect_rtcp_mki()
3934 if (session_keys == NULL) in srtp_protect_rtcp_mki()
3941 if (session_keys->rtp_cipher->algorithm == SRTP_AES_GCM_128 || in srtp_protect_rtcp_mki()
3942 session_keys->rtp_cipher->algorithm == SRTP_AES_GCM_256) { in srtp_protect_rtcp_mki()
3945 session_keys, use_mki); in srtp_protect_rtcp_mki()
3949 tag_len = srtp_auth_get_tag_length(session_keys->rtcp_auth); in srtp_protect_rtcp_mki()
3976 session_keys, use_mki); in srtp_protect_rtcp_mki()
4007 if (session_keys->rtcp_cipher->type->id == SRTP_AES_ICM_128 || in srtp_protect_rtcp_mki()
4008 session_keys->rtcp_cipher->type->id == SRTP_AES_ICM_192 || in srtp_protect_rtcp_mki()
4009 session_keys->rtcp_cipher->type->id == SRTP_AES_ICM_256) { in srtp_protect_rtcp_mki()
4016 status = srtp_cipher_set_iv(session_keys->rtcp_cipher, (uint8_t *)&iv, in srtp_protect_rtcp_mki()
4027 status = srtp_cipher_set_iv(session_keys->rtcp_cipher, (uint8_t *)&iv, in srtp_protect_rtcp_mki()
4041 prefix_len = srtp_auth_get_prefix_length(session_keys->rtcp_auth); in srtp_protect_rtcp_mki()
4042 status = srtp_cipher_output(session_keys->rtcp_cipher, auth_tag, in srtp_protect_rtcp_mki()
4054 status = srtp_cipher_encrypt(session_keys->rtcp_cipher, in srtp_protect_rtcp_mki()
4061 srtp_auth_start(session_keys->rtcp_auth); in srtp_protect_rtcp_mki()
4068 srtp_auth_compute(session_keys->rtcp_auth, (uint8_t *)auth_start, in srtp_protect_rtcp_mki()
4114 srtp_session_keys_t *session_keys = NULL; in srtp_unprotect_rtcp_mki() local
4172 session_keys = srtp_get_session_keys( in srtp_unprotect_rtcp_mki()
4176 if (session_keys == NULL) in srtp_unprotect_rtcp_mki()
4179 session_keys = &stream->session_keys[0]; in srtp_unprotect_rtcp_mki()
4183 tag_len = srtp_auth_get_tag_length(session_keys->rtcp_auth); in srtp_unprotect_rtcp_mki()
4197 if (session_keys->rtp_cipher->algorithm == SRTP_AES_GCM_128 || in srtp_unprotect_rtcp_mki()
4198 session_keys->rtp_cipher->algorithm == SRTP_AES_GCM_256) { in srtp_unprotect_rtcp_mki()
4201 session_keys, mki_size); in srtp_unprotect_rtcp_mki()
4276 if (session_keys->rtcp_cipher->type->id == SRTP_AES_ICM_128 || in srtp_unprotect_rtcp_mki()
4277 session_keys->rtcp_cipher->type->id == SRTP_AES_ICM_192 || in srtp_unprotect_rtcp_mki()
4278 session_keys->rtcp_cipher->type->id == SRTP_AES_ICM_256) { in srtp_unprotect_rtcp_mki()
4285 status = srtp_cipher_set_iv(session_keys->rtcp_cipher, (uint8_t *)&iv, in srtp_unprotect_rtcp_mki()
4296 status = srtp_cipher_set_iv(session_keys->rtcp_cipher, (uint8_t *)&iv, in srtp_unprotect_rtcp_mki()
4303 srtp_auth_start(session_keys->rtcp_auth); in srtp_unprotect_rtcp_mki()
4306 status = srtp_auth_compute(session_keys->rtcp_auth, (uint8_t *)auth_start, in srtp_unprotect_rtcp_mki()
4323 prefix_len = srtp_auth_get_prefix_length(session_keys->rtcp_auth); in srtp_unprotect_rtcp_mki()
4325 status = srtp_cipher_output(session_keys->rtcp_cipher, auth_tag, in srtp_unprotect_rtcp_mki()
4335 status = srtp_cipher_decrypt(session_keys->rtcp_cipher, in srtp_unprotect_rtcp_mki()
4561 session_key = &stream->session_keys[mki_index]; in stream_get_protect_trailer_length()
4566 session_key = &stream->session_keys[0]; in stream_get_protect_trailer_length()