Lines Matching refs:iv
596 static void llsec_geniv(u8 iv[16], __le64 addr, in llsec_geniv()
602 iv[0] = 1; /* L' = L - 1 = 1 */ in llsec_geniv()
603 memcpy(iv + 1, &addr_bytes, sizeof(addr_bytes)); in llsec_geniv()
604 memcpy(iv + 9, &frame_counter, sizeof(frame_counter)); in llsec_geniv()
605 iv[13] = sec->level; in llsec_geniv()
606 iv[14] = 0; in llsec_geniv()
607 iv[15] = 1; in llsec_geniv()
615 u8 iv[16]; in llsec_do_encrypt_unauth() local
621 llsec_geniv(iv, sec->params.hwaddr, &hdr->sec); in llsec_do_encrypt_unauth()
629 skcipher_request_set_crypt(req, &src, &src, datalen, iv); in llsec_do_encrypt_unauth()
652 u8 iv[16]; in llsec_do_encrypt_auth() local
659 llsec_geniv(iv, sec->params.hwaddr, &hdr->sec); in llsec_do_encrypt_auth()
680 aead_request_set_crypt(req, &sg, &sg, datalen, iv); in llsec_do_encrypt_auth()
831 u8 iv[16]; in llsec_do_decrypt_unauth() local
838 llsec_geniv(iv, dev_addr, &hdr->sec); in llsec_do_decrypt_unauth()
846 skcipher_request_set_crypt(req, &src, &src, datalen, iv); in llsec_do_decrypt_unauth()
858 u8 iv[16]; in llsec_do_decrypt_auth() local
865 llsec_geniv(iv, dev_addr, &hdr->sec); in llsec_do_decrypt_auth()
884 aead_request_set_crypt(req, &sg, &sg, datalen, iv); in llsec_do_decrypt_auth()