Lines Matching refs:encrypt
136 struct cipher_pkt encrypt = { in ecb_mode() local
143 .in_buf = encrypt.out_buf, in ecb_mode()
155 if (cipher_block_op(&ini, &encrypt)) { in ecb_mode()
160 LOG_INF("Output length (encryption): %d", encrypt.out_len); in ecb_mode()
162 if (memcmp(encrypt.out_buf, ecb_ciphertext, sizeof(ecb_ciphertext))) { in ecb_mode()
165 print_buffer_comparison(ecb_ciphertext, encrypt.out_buf, in ecb_mode()
218 struct cipher_pkt encrypt = { in cbc_mode() local
225 .in_buf = encrypt.out_buf, in cbc_mode()
242 if (cipher_cbc_op(&ini, &encrypt, iv)) { in cbc_mode()
247 LOG_INF("Output length (encryption): %d", encrypt.out_len); in cbc_mode()
249 if (memcmp(encrypt.out_buf, cbc_ciphertext, sizeof(cbc_ciphertext))) { in cbc_mode()
252 print_buffer_comparison(cbc_ciphertext, encrypt.out_buf, in cbc_mode()
309 struct cipher_pkt encrypt = { in ctr_mode() local
332 if (cipher_ctr_op(&ini, &encrypt, iv)) { in ctr_mode()
337 LOG_INF("Output length (encryption): %d", encrypt.out_len); in ctr_mode()
339 if (memcmp(encrypt.out_buf, ctr_ciphertext, sizeof(ctr_ciphertext))) { in ctr_mode()
342 print_buffer_comparison(ctr_ciphertext, encrypt.out_buf, in ctr_mode()
409 struct cipher_pkt encrypt = { in ccm_mode() local
418 .pkt = &encrypt, in ccm_mode()
440 ccm_op.pkt = &encrypt; in ccm_mode()
446 LOG_INF("Output length (encryption): %d", encrypt.out_len); in ccm_mode()
448 if (memcmp(encrypt.out_buf, ccm_expected, sizeof(ccm_expected))) { in ccm_mode()
452 encrypt.out_buf, sizeof(ccm_expected)); in ccm_mode()
521 struct cipher_pkt encrypt = { in gcm_mode() local
530 .pkt = &encrypt, in gcm_mode()
552 gcm_op.pkt = &encrypt; in gcm_mode()
558 LOG_INF("Output length (encryption): %d", encrypt.out_len); in gcm_mode()
560 if (memcmp(encrypt.out_buf, gcm_expected, sizeof(gcm_expected))) { in gcm_mode()
564 encrypt.out_buf, sizeof(gcm_expected)); in gcm_mode()