Skip to content

Commit d000810

Browse files
committed
Two examples for Ascon-AEAD128 and Ascon-Hash256
Fix typos No need to input key size as the size for ascon AEAD algorithm is fixed Add an example for algorithm Ascon-Hash256
1 parent bfdda56 commit d000810

6 files changed

Lines changed: 564 additions & 0 deletions

File tree

crypto/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ For further usage and details:
66

77
Please see the [3des/README.md](3des/README.md) for 3des.
88

9+
Please see the [ascon/README.md](ascon/README.md) for ascon.
10+
911
Please see the [aes/README.md](aes/README.md) for aes.
1012

1113
Please see the [camellia/README.md](camellia/README.md) for camellia.

crypto/ascon/Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CC=gcc
2+
CFLAGS=-Wall -g
3+
WOLFSSL_INSTALL_DIR=/usr/local
4+
LIBS=-L$(WOLFSSL_INSTALL_DIR)/lib -lwolfssl
5+
6+
ascon-file-encrypt: ascon-file-encrypt.o
7+
$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
8+
9+
.PHONY: clean
10+
11+
clean:
12+
rm -f *.o ascon-file-encrypt

crypto/ascon/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
How to use ascon-file-encrypt.c
2+
3+
1) a. Compile wolfSSL with ./configure --enable-pwdbased --enable-ascon --enable-experimental, run
4+
'make', and then install by typing 'sudo make install'.
5+
b. In the crypto/ascon directory run the Makefile by typing 'make'.
6+
2) Make a file to encode. Can be any file (ex. .txt .in .out .file etc.)
7+
3) run the executable, for help run with -h flag. Basic command is as follows:
8+
./ascon-file-encrypt <-option> -i <input.file> -o <output.file>
9+
10+
typing -e for option will encrypt the input.file onto the output.file.
11+
typing -d for option will decrypt the input.file onto the output.file.
12+
NOTE: When decrypting make sure the key is the same used for the
13+
encryption, otherwise it won't decode correctly. Which is the idea.
14+
Only those with the key will be able to decode the message. If no
15+
key is entered into the command line, it will use "0123456789abcdef"
16+
by default.
17+
18+
4) Running 'make clean' will delete the executable as well as any created
19+
files. Making sure that the only files left are 'ascon-file-encrypt.c',
20+
'Makefile', and 'README'.

0 commit comments

Comments
 (0)