Function devolutions_crypto_wayk::bastion::key_exchange::decrypt_key [−][src]
pub fn decrypt_key(
shared_key: &SharedSecret,
encrypted_symmetric_key: &str
) -> Result<(Uuid, Vec<u8>), Error>
Decrypts symmetric key using shared secret.
- Input is the encrypted key encoded in base64.
- Output is a tuple composed of CSC UUID and decrypted symmetric key.
Internals
- Decryption is done using XChaCha2020-Poly1035.
- Data layout is assumed to be the same as described in
encrypt_key
.