/// Verifies whether the given key is a valid Ed25519 public key.
///
/// This includes checking that the key is a point on the curve and
/// in the right subgroup.
Verifies whether the given key is a valid Ed25519 public key.
This includes checking that the key is a point on the curve and
in the right subgroup.
Verifies whether the given key is a valid Ed25519 public key . This includes checking that the key is a point on the curve and in the right subgroup .
pub fn verify_public_key(pk: &types::PublicKeyBytes) -> bool {
    match curve25519_dalek::edwards::CompressedEdwardsY(pk.0).decompress() {
        None => false,
        Some(edwards_point) => edwards_point.is_torsion_free(),
    }
}
pub fn verify_public_key ( pk : & types :: PublicKeyBytes ) -> bool { match curve25519_dalek :: edwards :: CompressedEdwardsY ( pk . 0 ) . decompress ( ) { None => false , Some ( edwards_point ) => edwards_point . is_torsion_free ( ) , } }
Verifies whether the given key is a valid Ed25519 public key.
Verifies whether the given key is a valid Ed25519 public key .
pk
&types::PublicKeyBytes