NAME

EVP_PKEY-EC - EVP_PKEY EC keytype and algorithm support

DESCRIPTION

The EC keytype is implemented in OpenSSL's default provider.

Common EC parameters

The following Import/Export types are available for the built-in EC algorithm:

"curve-name" (OSSL_PKEY_PARAM_EC_NAME) <utf8 string>

The EC curve name.

"use-cofactor-flag" (OSSL_PKEY_PARAM_USE_COFACTOR_ECDH) <integer>

Enable Cofactor DH (ECC CDH) if this value is 1, otherwise it uses normal EC DH if the value is zero. The cofactor variant multiplies the shared secret by the EC curve's cofactor (note for some curves the cofactor is 1).

See also "pub" (OSSL_PKEY_PARAM_PUB_KEY) <octet string>

The public key value in EC point format.

"priv" (OSSL_PKEY_PARAM_PRIV_KEY) <unsigned integer>

The private key value.

EXAMPLES

An EVP_PKEY context can be obtained by calling:

    EVP_PKEY_CTX *pctx =
        EVP_PKEY_CTX_new_from_name(NULL, "EC", NULL);

SEE ALSO

EVP_PKEY(3), EVP_SIGNATURE-ECDSA(7), COPYRIGHT

Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at https://www.openssl.org/source/license.html.