id-aes128-wrap-pad encrypt & decrypt online

Encrypt or decrypt text with id-aes128-wrap-pad and a secret. Nothing leaves your browser.

Padded with zero bytes or cut to 16 bytes.
Runs in your browser

PHP's openssl_encrypt gives no result for key wrap modes, so the old site showed an empty field. This tool calculates the result like OpenSSL 3 does.

What the tool did

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 · 16 bytes 9 from your secret, 7 zero bytes added
6d792073656372657400000000000000
6d792073656372657400000000000000
IV · 4 bytes none given, so zero bytes
00000000
00000000
Text in UTF-8 11 bytes, no padding needed
68656c6c6f20776f726c64
Encrypted · 24 bytes
38b7ae778cdbae0930e5d5f3a4a094f4
9e5d93cbde3c54a9
38b7ae778cdbae0930e5d5f3a4a094f49e5d93cbde3c54a9
As Base64 what the tool shows
OLeud4zbrgkw5dXzpKCU9J5dk8vePFSp

from your inputzero bytespaddingciphertext

In short

What is id-aes128-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-128 Key Wrap with Padding uses a 128-bit key (10 rounds) in AES Key Wrap with Padding (RFC 5649) mode: key wrap that also accepts input of any length.

Strong cipherAES (Rijndael): No practical attack on the cipher itself is known.

How your secret becomes the key

AES-128 Key Wrap with Padding needs exactly 16 bytes (128 bits) of key. The tool takes your secret as UTF-8 bytes and pads it with zero bytes to 16 bytes, or cuts it after 16 bytes.

Where you meet AES
  • HTTPS and TLS
  • Wi-Fi (WPA2, WPA3)
  • Disk encryption: BitLocker, FileVault, LUKS
  • VPNs, ZIP and 7-Zip archives, password managers
Honest answer

Is it safe to use?

The cipher: strong cipher

AES. No practical attack on the cipher itself is known.

This setup: for compatibility

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?

AES Key Wrap with Padding (RFC 5649)

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.

Common mistakes

Why your id-aes128-wrap-pad result doesn't match

You hashed the secret first

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.

Hex instead of Base64

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.

Spaces and line breaks

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.

Your secret is longer than the key

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.

Which cipher was it?

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-aes128-wrap-pad.

Nothing is sent anywhere. Wrong secrets give no readable text.
Compare

Every AES-128 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-128 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-aes128-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.

CipherResult (Base64)Same as
aes-128-cbc i7vfHATmvCrxYy9qiHaxyt3wvORh88GUuzSzf9bw5++CM0S6QDK4fE1yrHZ4FB16aes-128-cbc-hmac-sha1, aes-128-cbc-hmac-sha256, aes128
aes-128-cbc-hmac-sha1 i7vfHATmvCrxYy9qiHaxyt3wvORh88GUuzSzf9bw5++CM0S6QDK4fE1yrHZ4FB16aes-128-cbc, aes-128-cbc-hmac-sha256, aes128
aes-128-cbc-hmac-sha256 i7vfHATmvCrxYy9qiHaxyt3wvORh88GUuzSzf9bw5++CM0S6QDK4fE1yrHZ4FB16aes-128-cbc, aes-128-cbc-hmac-sha1, aes128
aes-128-ccm no result
aes-128-cfb SsMSzl/rFRhPJZExIDz+sUlfFDd/sM9mIwgYoe/OcKBoUd6F+Dn7koQ31w==
aes-128-cfb1 fF3w2g9a5AiBbI20o5ld5b0YUXRTx8a/xaZZESb8yORNHjq+jR5ZTOZj1Q==
aes-128-cfb8 ShS+jZYSdD3MJfBmnfEz+jKM7H9b57w11NF6NerxqRHJn7LTBwGSt6Cxjw==
aes-128-ctr SsMSzl/rFRhPJZExIDz+sfw/dZn9RqQLXEVED9wGFizt5fBWSuFBVf80sQ==
aes-128-ecb Legacyi7vfHATmvCrxYy9qiHaxytv2lacGBXo0DF+/4sBumgW7VIfdLGIsL9BqLKy3VkYU
aes-128-gcm no result
aes-128-ocb no result
aes-128-ofb SsMSzl/rFRhPJZExIDz+sQwGyExofWfDoTQanZtW4UmP030OhqzkHKJNzA==
aes-128-xts WTrZgUQlmoZxcG/d9PFwRD4r+M544ix/5U1usg5acNgHqnX6l7EW353Dxw==
aes128 i7vfHATmvCrxYy9qiHaxyt3wvORh88GUuzSzf9bw5++CM0S6QDK4fE1yrHZ4FB16aes-128-cbc, aes-128-cbc-hmac-sha1, aes-128-cbc-hmac-sha256
aes128-wrap no result
id-aes128-ccm no result
id-aes128-gcm no result
id-aes128-wrap no result
id-aes128-wrap-pad FNGT9AP/e0vOHlZxK9DxyRbU/psJmNNitheSgx9xaLyO9+uPJbw9DTr7yfX3Id+AtnjPISM2+Pw=
Test values

id-aes128-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.

Textid-aes128-wrap-pad (Base64)
empty string
aizYmTKJB/loxtHFVYl+mIw==
hello worldOLeud4zbrgkw5dXzpKCU9J5dk8vePFSp
0123456789abcdefknsT5547xHByEyaydnIUfKAAGvagQaVb
The quick brown fox jumps over the lazy dogFNGT9AP/e0vOHlZxK9DxyRbU/psJmNNitheSgx9xaLyO9+uPJbw9DTr7yfX3Id+AtnjPISM2+Pw=
FAQ

Questions about id-aes128-wrap-pad

Can id-aes128-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-aes128-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-128 secure?

AES-128 itself has no practical attack. AES-256 has a larger margin, but AES-128 is still considered secure. What makes a setup weak is a guessable key, a reused IV or missing authentication.

How long should my secret be?

Exactly 16 bytes (128 bits) fills the key; anything after that is ignored. For real security a random key is better than a typed word.

Good to know

Before you rely on it

Searches the list of pages on this site. What you type stays in your browser.