Tongsuo-Project / tongsuo-mini

Apache License 2.0
8 stars 6 forks source link

Add ASCON command line tool #43

Closed InfoHunter closed 1 year ago

InfoHunter commented 1 year ago

This commit includes minisuo command ascon-aead and ascon-hash.

Currently, ascon-hash only supports one-shot mode, meanwhile ascon-aead can be used as a stream encrption/decryption tool.

Usage:

ASCON AEAD ENC:

$ ./minisuo ascon-aead -scheme 128 -in ./CMakeCache.txt -out /tmp/xxxxxx -key 000102030405060708090A0B0C0D0E0F -nonce 000102030405060708090A0B0C0D0E0F
-enc
TAG IS:
A4FC828FB7132F4B3D281A5DDB07A69F

ASCON AEAD DEC:

$ ./minisuo ascon-aead -scheme 128 -out /tmp/aaaaa -in /tmp/xxxxxx -key 000102030405060708090A0B0C0D0E0F -nonce 000102030405060708090A0B0C0D0E0F -dec -tag A4FC828FB7132F4B3D281A5DDB07A69F

ASCON HASH:

$ ./minisuo ascon-hash -scheme hash -in 123
ASCON Hash: 7894BEF31970DEEFFB3A99EC1402BE201DCFBD7D6DF14FCA15E19E830FAF492C