Lines Matching refs:assoclen
490 static int gcm_encrypt(struct aead_request *req, const u8 *iv, u32 assoclen) in gcm_encrypt() argument
510 if (assoclen) in gcm_encrypt()
511 gcm_calculate_auth_mac(req, dg, assoclen); in gcm_encrypt()
543 lengths.a = cpu_to_be64(assoclen * 8); in gcm_encrypt()
574 scatterwalk_map_and_copy(tag, req->dst, req->assoclen + req->cryptlen, in gcm_encrypt()
580 static int gcm_decrypt(struct aead_request *req, const u8 *iv, u32 assoclen) in gcm_decrypt() argument
599 req->assoclen + req->cryptlen - authsize, in gcm_decrypt()
606 if (assoclen) in gcm_decrypt()
607 gcm_calculate_auth_mac(req, dg, assoclen); in gcm_decrypt()
638 lengths.a = cpu_to_be64(assoclen * 8); in gcm_decrypt()
665 return gcm_encrypt(req, req->iv, req->assoclen); in gcm_aes_encrypt()
670 return gcm_decrypt(req, req->iv, req->assoclen); in gcm_aes_decrypt()
702 return crypto_ipsec_check_assoclen(req->assoclen) ?: in rfc4106_encrypt()
703 gcm_encrypt(req, iv, req->assoclen - GCM_RFC4106_IV_SIZE); in rfc4106_encrypt()
715 return crypto_ipsec_check_assoclen(req->assoclen) ?: in rfc4106_decrypt()
716 gcm_decrypt(req, iv, req->assoclen - GCM_RFC4106_IV_SIZE); in rfc4106_decrypt()