Lines Matching refs:iv
159 uint8_t iv[16]; in osdp_decrypt_data() local
165 memcpy(iv, is_cmd ? pd->sc.r_mac : pd->sc.c_mac, 16); in osdp_decrypt_data()
167 iv[i] = ~iv[i]; in osdp_decrypt_data()
170 osdp_decrypt(pd->sc.s_enc, iv, data, length); in osdp_decrypt_data()
187 uint8_t iv[16]; in osdp_encrypt_data() local
194 memcpy(iv, is_cmd ? pd->sc.r_mac : pd->sc.c_mac, 16); in osdp_encrypt_data()
196 iv[i] = ~iv[i]; in osdp_encrypt_data()
199 osdp_encrypt(pd->sc.s_enc, iv, data, pad_len); in osdp_encrypt_data()
209 uint8_t iv[16]; in osdp_compute_mac() local
223 memcpy(iv, is_cmd ? pd->sc.r_mac : pd->sc.c_mac, 16); in osdp_compute_mac()
226 osdp_encrypt(pd->sc.s_mac1, iv, buf, pad_len - 16); in osdp_compute_mac()
228 memcpy(iv, buf + pad_len - 32, 16); in osdp_compute_mac()
232 osdp_encrypt(pd->sc.s_mac2, iv, buf + pad_len - 16, 16); in osdp_compute_mac()