Logo Search packages:      
Sourcecode: srtp version File versions  Download package

void crypto_policy_set_aes_cm_128_hmac_sha1_32 ( crypto_policy_t p  ) 

crypto_policy_set_aes_cm_128_hmac_sha1_32() sets a crypto policy structure to a short-authentication tag policy

p is a pointer to the policy structure to be set
The function call crypto_policy_set_aes_cm_128_hmac_sha1_32(&p) sets the crypto_policy_t at location p to use policy AES_CM_128_HMAC_SHA1_32 as defined in draft-ietf-mmusic-sdescriptions-12.txt. This policy uses AES-128 Counter Mode encryption and HMAC-SHA1 authentication, with an authentication tag that is only 32 bits long. This length is considered adequate only for protecting audio and video media that use a stateless playback function. See Section 7.5 of RFC 3711 (http://www.ietf.org/rfc/rfc3711.txt).

This function is a convenience that helps to avoid dealing directly with the policy data structure. You are encouraged to initialize policy elements with this function call. Doing so may allow your code to be forward compatible with later versions of libSRTP that include more elements in the crypto_policy_t datatype.

This crypto policy is intended for use in SRTP, but not in SRTCP. It is recommended that a policy that uses longer authentication tags be used for SRTCP. See Section 7.5 of RFC 3711 (http://www.ietf.org/rfc/rfc3711.txt).

Definition at line 1350 of file srtp.c.

References AES_128_ICM, crypto_policy_t::auth_key_len, crypto_policy_t::auth_tag_len, crypto_policy_t::auth_type, crypto_policy_t::cipher_key_len, crypto_policy_t::cipher_type, HMAC_SHA1, crypto_policy_t::sec_serv, and sec_serv_conf_and_auth.


   * corresponds to draft-ietf-mmusic-sdescriptions-12.txt
   * note that this crypto policy is intended for SRTP, but not SRTCP

  p->cipher_type     = AES_128_ICM;           
  p->cipher_key_len  = 30;                /* 128 bit key, 112 bit salt */
  p->auth_type       = HMAC_SHA1;             
  p->auth_key_len    = 20;                /* 160 bit key               */
  p->auth_tag_len    = 4;                 /* 32 bit tag                */
  p->sec_serv        = sec_serv_conf_and_auth;

Generated by  Doxygen 1.6.0   Back to index