admin管理员组文章数量:1310532
- in srtp.c we have a method:
static srtp_err_status_t srtp_kdf_generate(srtp_kdf_t *kdf, srtp_prf_label label, uint8_t *key, unsigned int length)
{
srtp_err_status_t status;
v128_t nonce;
/* set eigth octet of nonce to <label>, set the rest of it to zero */
v128_set_to_zero(&nonce);
nonce.v8[7] = label;
...
In RFC 3711 () section 4.3.1 it says the packet index is 48-bits ROC, i.e. 6 bytes. So for SRTP the method works fine by putting the label at position 7 (the salt is 14 bytes; the nonce has 16 byte positions; indexed from 0):
| salt |
|00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|
| index DIV kdr |
For SRTCP section 4.3.2 says: Replace the SRTP index by the 32-bit quantity: 0 || SRTCP index (=4 bytes) index DIV kdr for rtcp is 4 bytes. Therefore the label must be put at position 9 in the nonce value.
| salt |
|00|01|02|03|04|05|06|07|08|09|10|11|12|13|14|15|
|indexDIVkdr|
Does this now imply that the libsrtp from Cisco contains a bug or is not fully RFC3711 compliant? Does nobody run into problem with this issue in more as 20 years time?
本文标签: rfcRFC3711libsrtp and srtpkdfgenerateStack Overflow
版权声明:本文标题:rfc - RFC3711, libsrtp and srtp_kdf_generate - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741825605a2399623.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论