Ascon 加密

使用 Ascon 算法加密输入数据。

输入: 文本结果: 文本

文本输入

运行后查看结果

案例

Example keys and passwords are public test material.

basic encryption

输入

Hello

Expected answer

af14bce6b9b6588c3aa63f9ddc5a0cf5f565f358b0
密钥
{"option":"Hex","string":"000102030405060708090a0b0c0d0e0f"}
随机数
{"option":"Hex","string":"000102030405060708090a0b0c0d0e0f"}
关联数据
{"option":"Hex","string":""}
输入
Raw
输出
Hex
invalid key length

输入

test message

Expected rejection

Message contains
Invalid key length: 8 bytes.

Ascon-AEAD128 requires a key of exactly 16 bytes (128 bits).
密钥
{"option":"Hex","string":"0001020304050607"}
随机数
{"option":"Hex","string":"000102030405060708090a0b0c0d0e0f"}
关联数据
{"option":"Hex","string":""}
输入
Raw
输出
Hex
invalid nonce length

输入

test message

Expected rejection

Message contains
Invalid nonce length: 12 bytes.

Ascon-AEAD128 requires a nonce of exactly 16 bytes (128 bits).
密钥
{"option":"Hex","string":"000102030405060708090a0b0c0d0e0f"}
随机数
{"option":"Hex","string":"000102030405060708090a0b"}
关联数据
{"option":"Hex","string":""}
输入
Raw
输出
Hex
longer message

输入

test message

Expected answer

9314a3fef6cc299a07b8c9e0f9e479ca0d1187e87345cf590adc572b
密钥
{"option":"Hex","string":"000102030405060708090a0b0c0d0e0f"}
随机数
{"option":"Hex","string":"000102030405060708090a0b0c0d0e0f"}
关联数据
{"option":"Hex","string":""}
输入
Raw
输出
Hex
NIST KAT (PT=16 bytes, AD=16 bytes)

输入

 !"#$%&'()*+,-./

Expected answer

6373ebb28be97c9bac090cf399c13ef13abfc0d209e8f4844c90814d13f32c59
密钥
{"option":"Hex","string":"000102030405060708090a0b0c0d0e0f"}
随机数
{"option":"Hex","string":"101112131415161718191a1b1c1d1e1f"}
关联数据
{"option":"Hex","string":"303132333435363738393a3b3c3d3e3f"}
输入
Raw
输出
Hex
NIST KAT Count=34 (PT=0x20, empty AD)

输入

 

Expected answer

e8dd576aba1cd3e6fc704de02aedb79588
密钥
{"option":"Hex","string":"000102030405060708090a0b0c0d0e0f"}
随机数
{"option":"Hex","string":"101112131415161718191a1b1c1d1e1f"}
关联数据
{"option":"Hex","string":""}
输入
Raw
输出
Hex
NIST KAT Count=341 (PT=10 bytes, AD=10 bytes)

输入

 !"#$%&'()

Expected answer

12042996da42b4536e5a0e64692cf6041ff8c367e1423253c84c
密钥
{"option":"Hex","string":"000102030405060708090a0b0c0d0e0f"}
随机数
{"option":"Hex","string":"101112131415161718191a1b1c1d1e1f"}
关联数据
{"option":"Hex","string":"30313233343536373839"}
输入
Raw
输出
Hex
no key

输入

test message

Expected rejection

Message contains
Invalid key length: 0 bytes.

Ascon-AEAD128 requires a key of exactly 16 bytes (128 bits).
密钥
{"option":"Hex","string":""}
随机数
{"option":"Hex","string":"000102030405060708090a0b0c0d0e0f"}
关联数据
{"option":"Hex","string":""}
输入
Raw
输出
Hex
no nonce

输入

test message

Expected rejection

Message contains
Invalid nonce length: 0 bytes.

Ascon-AEAD128 requires a nonce of exactly 16 bytes (128 bits).
密钥
{"option":"Hex","string":"000102030405060708090a0b0c0d0e0f"}
随机数
{"option":"Hex","string":""}
关联数据
{"option":"Hex","string":""}
输入
Raw
输出
Hex
with associated data

输入

Hello

Expected answer

351880c09f9dee12c20c4ba973066bc10dd26000b6
密钥
{"option":"Hex","string":"000102030405060708090a0b0c0d0e0f"}
随机数
{"option":"Hex","string":"000102030405060708090a0b0c0d0e0f"}
关联数据
{"option":"UTF8","string":"metadata"}
输入
Raw
输出
Hex

相关工具

加密 / 编码

操作参考

查看原始技术文档 (English)