範例
Example keys and passwords are public test material.
basic encryption
輸入
HelloExpected answer
af14bce6b9b6588c3aa63f9ddc5a0cf5f565f358b0af14bce6b9b6588c3aa63f9ddc5a0cf5f565f358b0
- 金鑰
{"option":"Hex","string":"000102030405060708090a0b0c0d0e0f"}- 隨機數
{"option":"Hex","string":"000102030405060708090a0b0c0d0e0f"}- 关联資料
{"option":"Hex","string":""}- 輸入
Raw- 輸出
Hex
invalid key length
輸入
test messageExpected rejection
Message containsInvalid 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 messageExpected rejection
Message containsInvalid 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 messageExpected answer
9314a3fef6cc299a07b8c9e0f9e479ca0d1187e87345cf590adc572b9314a3fef6cc299a07b8c9e0f9e479ca0d1187e87345cf590adc572b
- 金鑰
{"option":"Hex","string":"000102030405060708090a0b0c0d0e0f"}- 隨機數
{"option":"Hex","string":"000102030405060708090a0b0c0d0e0f"}- 关联資料
{"option":"Hex","string":""}- 輸入
Raw- 輸出
Hex
NIST KAT (PT=16 bytes, AD=16 bytes)
輸入
!"#$%&'()*+,-./Expected answer
6373ebb28be97c9bac090cf399c13ef13abfc0d209e8f4844c90814d13f32c596373ebb28be97c9bac090cf399c13ef13abfc0d209e8f4844c90814d13f32c59
- 金鑰
{"option":"Hex","string":"000102030405060708090a0b0c0d0e0f"}- 隨機數
{"option":"Hex","string":"101112131415161718191a1b1c1d1e1f"}- 关联資料
{"option":"Hex","string":"303132333435363738393a3b3c3d3e3f"}- 輸入
Raw- 輸出
Hex
NIST KAT Count=34 (PT=0x20, empty AD)
輸入
Expected answer
e8dd576aba1cd3e6fc704de02aedb79588e8dd576aba1cd3e6fc704de02aedb79588
- 金鑰
{"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
12042996da42b4536e5a0e64692cf6041ff8c367e1423253c84c12042996da42b4536e5a0e64692cf6041ff8c367e1423253c84c
- 金鑰
{"option":"Hex","string":"000102030405060708090a0b0c0d0e0f"}- 隨機數
{"option":"Hex","string":"101112131415161718191a1b1c1d1e1f"}- 关联資料
{"option":"Hex","string":"30313233343536373839"}- 輸入
Raw- 輸出
Hex
no key
輸入
test messageExpected rejection
Message containsInvalid 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 messageExpected rejection
Message containsInvalid 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
輸入
HelloExpected answer
351880c09f9dee12c20c4ba973066bc10dd26000b6351880c09f9dee12c20c4ba973066bc10dd26000b6
- 金鑰
{"option":"Hex","string":"000102030405060708090a0b0c0d0e0f"}- 隨機數
{"option":"Hex","string":"000102030405060708090a0b0c0d0e0f"}- 关联資料
{"option":"UTF8","string":"metadata"}- 輸入
Raw- 輸出
Hex