Crypto tools

AES key unwrap (RFC 3394)

Unwrap a key that was wrapped with AES-KW, on your device.

Runs on your device. The file is never uploaded.

AES key unwrap (RFC 3394) reads wrapped key bytes as hex text from a file and unwraps them under the same key-encrypting key of 16, 24 or 32 bytes. The original key prints as hex, 8 bytes shorter. No label, algorithm or purpose comes back beside it, so track that yourself.

Input

Options

Questions

What do I paste in?

The wrapped key as hex, in a file. The tool reads your file as text, trims whitespace, and expects hex digits with an even count. Anything else is refused with "must be a hex string with an even number of digits". This is exactly the form AES key wrap outputs, so saving that hex into a text file and dropping it here works directly.

What KEK sizes are allowed?

16, 24 or 32 bytes as hex, meaning 32, 48 or 64 hex characters, the same rule as the wrap side. Anything else is refused with "kek must be 16, 24, or 32 bytes (32/48/64 hex chars)". The KEK has to be byte-identical to the one used to wrap. AES-KW has no password step, so nothing is derived for you.

Why did I get "unwrap failed"?

Because the AES-KW integrity check did not pass. The rest of the message says wrong kek, or the input is not a valid AES-KW wrapped key. AES-KW carries a check value, so a wrong KEK, a truncated blob and a single altered hex digit all fail the same way. It never returns partial or plausible-looking key bytes. Confirm the KEK, then confirm the hex was copied whole.

What comes out?

The unwrapped key as hex text on the page, 8 bytes shorter than the wrapped input. It is exactly the bytes that were wrapped, with no formatting, no PEM and no algorithm label, because AES-KW carries none of that. What the key is for, and which algorithm it belongs to, is something you have to track yourself.

Does the unwrapped key get saved or sent?

No. Unwrapping happens in a Web Worker in this tab through crypto.subtle, and the recovered key is shown on the page only. Nothing is uploaded and nothing is written to storage. Copy it out before you close the tab, because the tool keeps no history of what it produced.

Can it unwrap keys of any size?

Any size RFC 3394 allows: at least 16 bytes and a multiple of 8 after unwrapping. The tool imports the result as an HMAC key rather than an AES key so that lengths beyond 16, 24 and 32 come back intact. A 40-byte key wrapped by AES key wrap on this site unwraps here without complaint.

Related Crypto tools