Skip to main content

p256_point_to_spki

Function p256_point_to_spki 

Source
pub fn p256_point_to_spki(point: &[u8]) -> Result<Vec<u8>, IdentityError>
Expand description

Wraps a raw uncompressed P-256 point as SubjectPublicKeyInfo DER.

ยงErrors

IdentityError::BadKey unless point is exactly the 65 bytes of an uncompressed point beginning with 0x04. Compressed points are refused rather than expanded: an authenticator that sends one is doing something this path has never seen, and guessing is the wrong response.