Method Nettle.BlockCipher16()->State()->unwrap_key()


Method unwrap_key

string(8bit) unwrap_key(string(8bit) wrap, bool|void method)

Description

The AES Key Unwrapping algorithms from RFC 3394 and RFC 5649.

Parameter wrap

Wrapped key to unwrap.

Parameter method

Method that was used to wrap wrap. See wrap_key() for details.

0

RFC 3394

1

RFC 5649

This function is intended to be used to decode encryption keys that have been wrapped by wrap_key().

Returns

Returns the unwrapped key.

Throws

Throws an error on failure to unwrap the key.

Note

Assumes that the State object has been initialized to decryption mode (ie that set_decrypt_key() has been called).

Note

RFC 6931 section 2.6.3 indicates that the RFC 3394 algorithm is also appropriate for Camellia.

See also

wrap_key()