more modifications

This commit is contained in:
git@daemon.de
2015-10-02 17:52:29 +02:00
parent 761544a28d
commit 47f0ff9e9c
3 changed files with 132 additions and 62 deletions

View File

@@ -1,7 +1,8 @@
LDFLAGS = -g
CFLAGS = -g -Wall -Wextra -Werror
LDFLAGS = -g -O3
CFLAGS = -g -O3 -Wall -Wextra -Werror
DST = twenty4
OBJS = twenty4.o
K = 123456trewqasdfgbvcx
all: $(DST)
cd analyze && make
@@ -14,6 +15,30 @@ $(DST): $(OBJS)
gcc -c $(CFLAGS) $*.c -o $*.o
clean:
rm -f *.o $(DST)
rm -f *.o $(DST) *.core
cd analyze && make clean
cd sbox && make clean
test:
sha256 LICENSE | cut -f 4 -d ' ' > .xsum
cat LICENSE | ./$(DST) $(K) X > .xenc
cat .xenc | ./$(DST) $(K) X > .xdec
sha256 .xdec | cut -f 4 -d ' ' > .xnsum
if test "x`cat .xsum`" = "x`cat .xnsum`"; then echo OK; else echo FAIL; fi
rm -f .x*
./divtest.sh
rngtest:
@dd if=/dev/zero of=zero bs=1024 count=10000
@cat zero | ./twenty4 00000000000000000001 1 > x
# my own
analyze/analyze x
@echo
# ent from: http://www.fourmilab.ch/random/
ent x
@echo
# dieharder from: https://www.phy.duke.edu/~rgb/General/dieharder.php
dd if=/dev/zero of=/dev/stdout | ./twenty4 00000000000000000001 1 | dieharder -g 200 -a