Created
August 9, 2020 06:17
-
-
Save 152334H/efa4dcbe0b39c59f876050cd5d1ce2e9 to your computer and use it in GitHub Desktop.
Using RsaCtfTool for Håstad's Broadcast Attack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
script=/path/to/RsaCtfTool/RsaCtfTool.py | |
n=() | |
c=() | |
echo 'paste all n:' | |
for i in `seq 0 2` | |
do read | |
n[$i]=$REPLY | |
done | |
echo 'paste all c:' | |
for i in `seq 0 2` | |
do read | |
c[$i]=$REPLY | |
done | |
read -p 'give e: ' e | |
RND=$RANDOM | |
echo "generating pubkeys at $RND/..." | |
mkdir $RND | |
for i in `seq 0 2` | |
do python3.8 $script --createpub -e $e -n ${n[$i]} > "$RND/$i" | |
done | |
echo 'attacking...' | |
python3.8 $script --attack hastads --uncipher ${c[0]},${c[1]},${c[2]} --publickey "$RND/*" | |
[ -d "$RND" ] && rm -r "$RND" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment