mirror of
https://github.com/brmlab/timingattack.git
synced 2025-06-08 17:14:10 +02:00
Initial import.
This commit is contained in:
commit
2034d263bd
165 changed files with 21641 additions and 0 deletions
15
bin/createKey.sh
Executable file
15
bin/createKey.sh
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
. libs.sh
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo 1>&2 Usage: $0 location
|
||||
exit -1
|
||||
fi
|
||||
|
||||
# This will create a new key store in the given location and generate a new
|
||||
# symmetric signing key. This expects Keyczar and GSON to be on the classpath
|
||||
if [ ! -f $1/meta ]; then
|
||||
java -Dfile.encoding=UTF-8 -classpath $CP cz.cvut.keyczar.KeyczarTool create --location=$1 --purpose=sign
|
||||
fi
|
||||
|
||||
java -Dfile.encoding=UTF-8 -classpath $CP cz.cvut.keyczar.KeyczarTool addkey --location=$1 --status=primary
|
1
bin/libs.sh
Normal file
1
bin/libs.sh
Normal file
|
@ -0,0 +1 @@
|
|||
CP="keyczar-0.6b-jar-with-dependencies.jar"
|
4
bin/signMessage.sh
Executable file
4
bin/signMessage.sh
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
. libs.sh
|
||||
|
||||
java -Dfile.encoding=UTF-8 -classpath $CP cz.cvut.keyczar.homework.CreateSignedFile $@
|
31
bin/startServer.sh
Executable file
31
bin/startServer.sh
Executable file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
. libs.sh
|
||||
|
||||
if [ $# -lt 4 ]; then
|
||||
echo "Usage:"
|
||||
echo "$0 <level> <port> <kudofileprefix> <keydirprefix>"
|
||||
echo "<kudofile> = <kudofileprefix><level>"
|
||||
echo "<keydir> = <keydirprefix><level>"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
milis=0
|
||||
if [ $1 -eq 0 ]; then
|
||||
nanos=1000000
|
||||
elif [ $1 -eq 1 ]; then
|
||||
nanos=10000
|
||||
elif [ $1 -eq 2 ]; then
|
||||
nanos=100
|
||||
elif [ $1 -eq 3 ]; then
|
||||
nanos=0
|
||||
else
|
||||
echo "U TROLL? IDK LEVEL > 4!!"
|
||||
echo "Usage:"
|
||||
echo "$0 <level> <port> <kudofileprefix> <keydirprefix>"
|
||||
echo "<kudofile> = <kudofileprefix><level>"
|
||||
echo "<keydir> = <keydirprefix><level>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
java -Dmilis=$milis -Dnanos=$nanos -Dfile.encoding=UTF-8 -classpath $CP cz.cvut.keyczar.homework.VerificationServer $2 $3$1 $4$1
|
Loading…
Add table
Add a link
Reference in a new issue