rustls::crypto::aws_lc_rs::hpke

Function generate_p_curve_key_pair

Source
fn generate_p_curve_key_pair(
    alg: &'static Algorithm,
) -> Result<(HpkePublicKey, HpkePrivateKey), Error>
Expand description

Generate a NIST P-256, P-384 or P-512 key pair expressed as a raw big-endian fixed-length integer.

We must disambiguate the AsBigEndian trait in-use and this function uses AsBigEndian<EcPrivateKeyBin>, which does not support agreement::X25519. For generating X25519 keys see generate_x25519_key_pair.