Lines Matching defs:key
466 unsigned char *key;
499 /* Nb of iterations to do per algorithm and key-size */
677 const unsigned char *key,
701 if (!EVP_CipherInit_ex(ctx, NULL, NULL, key, iv, 1)) {
757 * each message is encrypted using the same (key,iv)-pair. Do not use this
1270 EVP_PKEY *key = NULL;
1307 "Unhandled error in the error queue during EC key setup.\n");
1325 /* Create the context for the key generation */
1331 || EVP_PKEY_keygen(kctx, &key) <= 0) {
1332 BIO_printf(bio_err, "EC key generation failure.\n");
1334 key = NULL;
1337 return key;
1984 static const char hmac_key[] = "This is a key...";
2242 loopargs[k].key = app_malloc(keylen, "evp_cipher key");
2243 EVP_CIPHER_CTX_rand_key(loopargs[k].ctx, loopargs[k].key);
2245 loopargs[k].key, NULL, -1)) {
2250 OPENSSL_clear_free(loopargs[k].key, keylen);
2294 BIO_printf(bio_err, "\nRequested CMAC cipher with unsupported key length.\n");
2605 if ((key_A = get_ecdsa(&ec_curves[testnum])) == NULL /* generate secret key A */
2606 || (key_B = get_ecdsa(&ec_curves[testnum])) == NULL /* generate secret key B */
2614 BIO_printf(bio_err, "ECDH key generation failure.\n");
2986 BIO_printf(bio_err, "Error setting DH key size for keygen.\n");
2995 BIO_printf(bio_err, "FFDH key generation failure.\n");
3025 BIO_printf(bio_err, "Assigning peer key for derivation failed.\n");
3613 unsigned char *inp = NULL, *out = NULL, *key, no_key[32], no_iv[16];
3630 BIO_printf(bio_err, "Impossible negative key length: %d\n", keylen);
3633 key = app_malloc(keylen, "evp_cipher key");
3634 if (EVP_CIPHER_CTX_rand_key(ctx, key) <= 0)
3635 app_bail_out("failed to generate random cipher key\n");
3636 if (!EVP_EncryptInit_ex(ctx, NULL, NULL, key, NULL))
3637 app_bail_out("failed to set cipher key\n");
3638 OPENSSL_clear_free(key, keylen);
3642 app_bail_out("failed to set AEAD key\n");