id-aes256-wrap-pad encrypt & decrypt online
Encrypt or decrypt text with id-aes256-wrap-pad and a secret. Nothing leaves your browser.
The bytes behind your result
Your code gives a different result? Almost always the key or the IV differ. Here you see exactly which bytes the tool used for the secret and text in the tool above: copy the key and IV in hex into your own code. Shown for the text hello world and the secret my secret until you type above.
- Key · 32 bytes 9 from your secret, 23 zero bytes added
- 6d79207365637265740000000000000000000000000000000000000000000000
6d79207365637265740000000000000000000000000000000000000000000000 - IV · 4 bytes none given, so zero bytes
- 00000000
00000000 - Text in UTF-8 11 bytes, no padding needed
- 68656c6c6f20776f726c64
- Encrypted · 24 bytes
- a6ab45344a0da4560311acfd8eb734ba8211fbe160d8b770
a6ab45344a0da4560311acfd8eb734ba8211fbe160d8b770 - As Base64 what the tool shows
pqtFNEoNpFYDEaz9jrc0uoIR++Fg2Ldw
from your inputzero bytespaddingciphertext
What is id-aes256-wrap-pad?
AES is the block cipher NIST standardised in 2001 (FIPS 197), originally called Rijndael. It is the most widely used cipher today and has no practical attack. PHP's openssl_encrypt returns nothing for key wrap modes, so the old site showed an empty field; this tool calculates the result like OpenSSL 3. AES-256 Key Wrap with Padding uses a 256-bit key (14 rounds) in AES Key Wrap with Padding (RFC 5649) mode: key wrap that also accepts input of any length.
How your secret becomes the key
AES-256 Key Wrap with Padding needs exactly 32 bytes (256 bits) of key. The tool takes your secret as UTF-8 bytes and pads it with zero bytes to 32 bytes, or cuts it after 32 bytes.
- HTTPS and TLS
- Wi-Fi (WPA2, WPA3)
- Disk encryption: BitLocker, FileVault, LUKS
- VPNs, ZIP and 7-Zip archives, password managers
Is it safe to use?
AES. No practical attack on the cipher itself is known.
The setup of this tool is made for compatibility with PHP's openssl_encrypt, not for protecting secrets: the IV is always zero, the secret is used as the key without a key derivation function, and nothing detects changes to the ciphertext.
For real secrets use an authenticated mode such as AES-256-GCM or ChaCha20-Poly1305 with a fresh random nonce for every message, and derive the key from a password with Argon2id, scrypt or PBKDF2. What is a key derivation function?
How Key wrap with padding mode works
Key wrap with padding (RFC 5649) is key wrap that accepts any length: it stores the real length in the integrity value and pads with zeros to a multiple of 8 bytes.
Decrypting checks the integrity value and the length: a wrong secret gives no result at all instead of garbage.
Why your id-aes256-wrap-pad result doesn't match
Many tutorials turn a password into a key with SHA-256 or MD5. This tool doesn't: it uses the bytes of your secret directly and pads them with zero bytes. Copy the key in hex from What the tool did and use it as the raw key.
The tool shows the raw ciphertext bytes as Base64. Many libraries return hex or raw bytes. Convert before comparing, or compare with the hex blocks in What the tool did.
Like the old site, the tool trims spaces and line breaks at the start and end of the text and the secret, and sends line breaks as CRLF (\r\n), as a browser form does. echo "text" | in a shell adds a line break at the end.
Only the first bytes up to the key length count, the rest is cut off. Two secrets that start with the same bytes give the same result. Non-ASCII characters take 2–4 bytes in UTF-8, so they fill the key faster.
Encrypted something here years ago?
Paste the Base64 result and the secret. Your browser tries all 174 ciphers of this site and shows those that give readable text. Useful if you don't remember the cipher, or to check whether your ciphertext really is id-aes256-wrap-pad.
Every AES-256 variant, same input
The text The quick brown fox jumps over the lazy dog (43 bytes) with the secret my secret in all 19 AES-256 ciphers. The last column lists names that give the same result: aliases, and modes that agree for this input. Highlighted: the same start as id-aes256-wrap-pad. Watch how CBC and ECB share the first block, and CFB, OFB and CTR the first 16 bytes. Type a text and a secret in the tool above to use yours.
| Cipher | Result (Base64) | Same as |
|---|---|---|
| aes-256-cbc | oV3RJ8KJkJ8RE7zaMmiC3IvqaRrBXzj1Yz1LI+TEjH66KfwmN6R6qHzKZHVs2zeW | aes-256-cbc-hmac-sha1, aes-256-cbc-hmac-sha256, aes256 |
| aes-256-cbc-hmac-sha1 | oV3RJ8KJkJ8RE7zaMmiC3IvqaRrBXzj1Yz1LI+TEjH66KfwmN6R6qHzKZHVs2zeW | aes-256-cbc, aes-256-cbc-hmac-sha256, aes256 |
| aes-256-cbc-hmac-sha256 | oV3RJ8KJkJ8RE7zaMmiC3IvqaRrBXzj1Yz1LI+TEjH66KfwmN6R6qHzKZHVs2zeW | aes-256-cbc, aes-256-cbc-hmac-sha1, aes256 |
| aes-256-ccm | no result | |
| aes-256-cfb | 1ktyGwyrPTtkgyEyM7E0vd7s0sNfMxpZ1+JmL66k6iOQDRetJtUIxxMdXg== | |
| aes-256-cfb1 | xnZa43U4+GFN07PHLjjTWL93kLi0GAONkmwZ2ChIWqMhmJDGKHELQvjZqQ== | |
| aes-256-cfb8 | 1k1yiacKd98o6mj9e4XQmYHTVMKzNCt+tpLZWdnYo3GXQW1R+jdFJc5/8A== | |
| aes-256-ctr | 1ktyGwyrPTtkgyEyM7E0vQLKxTEZHxPxUe5qC3Z5g5i4uVLf/iFZqWMTPA== | |
| aes-256-ecb Legacy | oV3RJ8KJkJ8RE7zaMmiC3FGyw0egBuzK22+UB+wjL1x957WvwKfkmU0DQekRltBh | |
| aes-256-gcm | no result | |
| aes-256-ocb | no result | |
| aes-256-ofb | 1ktyGwyrPTtkgyEyM7E0veMveBwf24cCnL4wm6FGkvqIJsJlhyZEOlt1Ow== | |
| aes-256-xts | f5eVcJyT+UmSHL+ofoaYWABwFrKp62H6idKb0pdKw+vAnBxMpZyHb8MbJA== | |
| aes256 | oV3RJ8KJkJ8RE7zaMmiC3IvqaRrBXzj1Yz1LI+TEjH66KfwmN6R6qHzKZHVs2zeW | aes-256-cbc, aes-256-cbc-hmac-sha1, aes-256-cbc-hmac-sha256 |
| aes256-wrap | no result | |
| id-aes256-ccm | no result | |
| id-aes256-gcm | no result | |
| id-aes256-wrap | no result | |
| id-aes256-wrap-pad | tk28ra1iLSVR4bLEB5vUiHgPkrA4Sxc4iXlhTK/5xgwnwK9SS39Ysij8omADCyGcqoxCQXdsRWQ= |
id-aes256-wrap-pad test values
Results for common test strings with the secret my secret (UTF-8, no line break, zero IV), exactly as the tool and PHP's openssl_encrypt give them. Use them to check your own implementation.
| Text | id-aes256-wrap-pad (Base64) |
|---|---|
| empty string | |
a | xO0hpfTAv+WhldOm2GgpPA== |
hello world | pqtFNEoNpFYDEaz9jrc0uoIR++Fg2Ldw |
0123456789abcdef | ZOe74/zm5N3g34dCDLRrtGu1YAgkApNz |
The quick brown fox jumps over the lazy dog | tk28ra1iLSVR4bLEB5vUiHgPkrA4Sxc4iXlhTK/5xgwnwK9SS39Ysij8omADCyGcqoxCQXdsRWQ= |
Questions about id-aes256-wrap-pad
Can id-aes256-wrap-pad be decrypted without the secret?
No. Without the secret there is no shortcut. A short or common secret can be guessed, though, because the tool uses it directly as the key.
Why does my id-aes256-wrap-pad code give a different result?
Almost always because of the key or the IV: the tool pads your secret with zero bytes instead of hashing it and uses a zero IV. Also check Base64 vs hex, padding, and spaces or line breaks the tool trims.
Is AES-256 secure?
AES-256 itself has no practical attack and has the largest security margin of the three key sizes, also against future quantum computers. What makes a setup weak is a guessable key, a reused IV or missing authentication.
How long should my secret be?
Exactly 32 bytes (256 bits) fills the key; anything after that is ignored. For real security a random key is better than a typed word.