aria192 encrypt & decrypt online

Encrypt or decrypt text with aria192 and a secret. Same result as PHP's openssl_encrypt, and nothing leaves your browser.

Padded with zero bytes or cut to 24 bytes. No IV, PHP uses zero bytes.
Runs in your browser
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 · 24 bytes 9 from your secret, 15 zero bytes added
6d7920736563726574000000000000000000000000000000
6d7920736563726574000000000000000000000000000000
IV · 16 bytes none given, so zero bytes
00000000000000000000000000000000
00000000000000000000000000000000
Text in UTF-8 11 bytes of text + 5 bytes PKCS#7 padding (value 05) = 16 bytes, 1 block of 16
68656c6c6f20776f726c640505050505
Encrypted · 16 bytes
2922dcacafd54cbeb104fe524a065bdf
2922dcacafd54cbeb104fe524a065bdf
As Base64 what the tool shows
KSLcrK/VTL6xBP5SSgZb3w==

from your inputzero bytespaddingciphertext

In short

What is aria192?

aria192 is another name for aria-192-cbc in OpenSSL and PHP: same key, same mode, same result. ARIA is a block cipher from South Korea (2003), the national standard KS X 1213 and RFC 5794. It has the same interface as AES: 16-byte blocks and 128, 192 or 256-bit keys. It uses a 192-bit key (14 rounds) in Cipher Block Chaining mode: each 16-byte block is mixed with the previous encrypted block before it is encrypted.

Strong cipherARIA: No practical attack on the cipher itself is known.

How your secret becomes the key

ARIA-192-CBC needs exactly 24 bytes (192 bits) of key. The tool takes your secret as UTF-8 bytes and pads it with zero bytes to 24 bytes, or cuts it after 24 bytes.

Where you meet ARIA
  • South Korean government and banking systems
  • TLS cipher suites (RFC 6209)
Honest answer

Is it safe to use?

The cipher: strong cipher

ARIA. 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?

Cipher Block Chaining

How CBC mode works

CBC splits the text into 16-byte blocks. Before a block is encrypted, it is XORed with the previous encrypted block; the first block is XORed with the IV. So every block depends on all blocks before it.

The last block is filled up with PKCS#7 padding: if 5 bytes are missing, five bytes 05 are added. A text that fills its last block exactly gets a whole extra block of padding. That is why the output is always a multiple of 16 bytes and at least one byte longer than the input.

With a random IV, the same text gives a different result each time. This tool uses no IV (zero bytes), so the same text and secret always give the same result, and the first block is identical to ECB.

Original: 144 blocks of 16 bytes
aria-192-ecb
aria-192-cbc

Really calculated: each square is one 16-byte block, coloured by the first byte of its ciphertext. With ECB, equal blocks stay equal and the heart shows through. With CBC, every block depends on the one before.

Use it in code

The same result in your code

Every snippet prints KSLcrK/VTL6xBP5SSgZb3w== for the text hello world and the secret my secret, the same as the tool. The key and IV are written out in hex, so you can see what the tool does with the secret. Your own key and IV are in What the tool did. All snippets are run against PHP before each release.

PHP
$key = hex2bin("6d7920736563726574000000000000000000000000000000"); // "my secret" padded with zero bytes to 24 bytes
$iv  = hex2bin("00000000000000000000000000000000"); // no IV given: 16 zero bytes
echo openssl_encrypt("hello world", "aria192", $key, 0, $iv);

Shortest form, same result: openssl_encrypt("hello world", "aria192", "my secret"). PHP pads the secret itself but warns about the empty IV.

Node.js
import { createCipheriv } from 'node:crypto';

const key = Buffer.from("6d7920736563726574000000000000000000000000000000", 'hex'); // "my secret" padded with zero bytes to 24 bytes
const iv = Buffer.alloc(16); // no IV given: 16 zero bytes
const c = createCipheriv("aria-192-cbc", key, iv);
console.log(Buffer.concat([c.update("hello world", 'utf8'), c.final()]).toString('base64'));
Command line
printf '%s' 'hello world' | openssl enc -aria-192-cbc -K 6d7920736563726574000000000000000000000000000000 -iv 00000000000000000000000000000000 -a -A

printf instead of echo: echo adds a line break, which changes the result. -K and -iv take hex; with -k or -pass, openssl derives a different key from a password.

Common mistakes

Why your aria192 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.

Your code uses a random IV

With a random IV the result changes every time. The tool uses no IV, which in PHP means zero bytes. Use a zero IV of the right length to get the same result, and keep the random IV for real data.

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.

Zero padding instead of PKCS#7

The tool pads with PKCS#7 (OpenSSL's default). Some libraries pad with zeros or not at all. A text of exactly one block still gets a full block of padding (10 10 … 10 for 16-byte blocks).

Same result as ECB for short texts

With a zero IV, the first CBC block is exactly the ECB block, because XOR with zeros changes nothing. Texts up to one block long (15 bytes plus padding) give the same result in CBC and ECB. From the second block on they differ, see the family comparison.

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.

openssl enc with -k or -pass

Given a password, the openssl command line derives key and IV from it with a random salt (EVP_BytesToKey or PBKDF2), and the output starts with U2FsdGVkX1 ("Salted__"). That is a different format. Pass the key and IV in hex with -K and -iv instead, as in the code example.

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 aria192.

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

Every ARIA-192 variant, same input

The text The quick brown fox jumps over the lazy dog (43 bytes) with the secret my secret in all 10 ARIA-192 ciphers. The last column lists names that give the same result: aliases, and modes that agree for this input. Highlighted: the same start as aria192. 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
aria-192-cbc Eauk5NDmbZh+klDkywRmTB6XDWqdgQOEpODgV21l+e0qjHbhUC9HEy3GlFPYye8Daria192
aria-192-ccm no result
aria-192-cfb M2ohSOnfNYvu6TIunwk9DUG+905OvU6RcSXiyibDRCIM5cabe5U0dk6w7g==
aria-192-cfb1 ZlRZcv7YFHedyFuUYlj9J5hDRCTyea1qIRQQLWVXQ8n4aw7U8vI1m3Tw1Q==
aria-192-cfb8 M3H0P+T6BFWYASwuHl9g6JuOX7tqvDQzNoyhoH9p7R+15/2030BC8VeMPg==
aria-192-ctr M2ohSOnfNYvu6TIunwk9Db42Z21dbWoVSNLq/5+8LVtJfJttNpoWpU9moQ==
aria-192-ecb LegacyEauk5NDmbZh+klDkywRmTJRUhJzqc7xVS4ZljTov8CwFm7HACbvOi4/W62Aqbwpo
aria-192-gcm no result
aria-192-ofb M2ohSOnfNYvu6TIunwk9DXEIvOnXeY8rOPNi8Zn2wMY+yu8VU5akEGKLUQ==
aria192 Eauk5NDmbZh+klDkywRmTB6XDWqdgQOEpODgV21l+e0qjHbhUC9HEy3GlFPYye8Daria-192-cbc
Test values

aria192 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.

Textaria192 (Base64)
empty stringmIYgsefUN+5WIs/cTOMZ6w==
aSNNWpNkQOxxM6c3NcdubGQ==
hello worldKSLcrK/VTL6xBP5SSgZb3w==
0123456789abcdefZn9idUjHUd9ctR7gIfPNSuW4sXJ9JAPn6yJkio4ufu8=
The quick brown fox jumps over the lazy dogEauk5NDmbZh+klDkywRmTB6XDWqdgQOEpODgV21l+e0qjHbhUC9HEy3GlFPYye8D
FAQ

Questions about aria192

Is aria192 the same as aria-192-cbc?

Yes, in this tool and in PHP on OpenSSL 1.1.1 they give exactly the same result. aria192 is just another name, so you can decrypt with either.

Can aria192 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 aria192 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.

Why do aria-192-cbc and aria-192-ecb give the same result?

Only for short texts. With a zero IV, the first CBC block equals the ECB block. From the second block on, CBC mixes in the previous block and the results differ.

Is ARIA secure?

ARIA has no practical attack. The weak points of this tool are the setup (zero IV, secret as key, no authentication), not the cipher.

How long should my secret be?

Exactly 24 bytes (192 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.