I have seen that you implemented support for SRTP and MIKEY, thanks. Looks that you copied this bug from GStreamer which does it wrong. For SHA-1 Authentication Key Length is always 20 bytes, and Authentication Tag Length is length of truncated Auth Key appended to SRTP packet (either 10 or 4). Length of Authentication Tag in MIKEY should be sent using PayloadSPPolicyParamTypeAuthTagLen parameter instead of PayloadSPPolicyParamTypeSessionAuthKeyLen.