Expand description

Serde implementation for the KeyPair type.

Only the secret key part of the KeyPair is serialized using the SecretKey serde implementation, meaning the public key has to be regenerated on deserialization.

Attention: The deserialization algorithm uses the global context to generate the public key belonging to the secret key to form a KeyPair. The typical caveats regarding use of the global context with secret data apply.

Functions