Lines Matching defs:ciphertext
520 char *buffer, *cleartext, *ciphertext;
541 ciphertext = malloc(size);
544 openssl_cipher(alg, cipher, key, iv, cleartext, ciphertext, size, 1);
545 if (size > 0 && memcmp(cleartext, ciphertext, size) == 0)
548 openssl_cipher(alg, cipher, key, iv, ciphertext, buffer, size, 0);
562 if (memcmp(ciphertext, buffer, size) != 0) {
565 hexdump(ciphertext, size, NULL, 0);
572 if (!ocf_cipher(alg, key, key_len, iv, ciphertext, buffer, size, 0,
589 free(ciphertext);
677 char *aad, *buffer, *cleartext, *ciphertext;
706 ciphertext = malloc(aad_len + size);
710 memcpy(ciphertext, cleartext, aad_len);
712 ciphertext + aad_len, size, 1);
713 if (size > 0 && memcmp(cleartext + aad_len, ciphertext + aad_len,
718 if (HMAC(md, auth_key, auth_key_len, (u_char *)ciphertext,
728 if (memcmp(ciphertext + aad_len, buffer + aad_len, size) != 0) {
731 hexdump(ciphertext + aad_len, size, NULL, 0);
753 auth_key_len, aad_len != 0 ? ciphertext : NULL, aad_len,
754 ciphertext + aad_len, buffer + aad_len, size, test_digest, 0,
784 free(ciphertext);
936 char *aad, *buffer, *cleartext, *ciphertext;
961 ciphertext = malloc(size);
969 ciphertext, size, control_tag);
975 if (memcmp(ciphertext, buffer, size) != 0) {
978 hexdump(ciphertext, size, NULL, 0);
993 if (!ocf_gcm(alg, key, key_len, iv, iv_len, aad, aad_len, ciphertext,
1011 free(ciphertext);