Last active
January 2, 2016 14:29
-
-
Save codedot/8317164 to your computer and use it in GitHub Desktop.
One-way trapdoor permutation for 840 bits based on RSA
This file contains 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
NEXT = openssl rsautl -decrypt -inkey key -raw | |
all: key | |
openssl dgst -sha -out id -sign key key | |
openssl dgst -sha -signature id -prverify key key | |
while sleep 1; do \ | |
openssl base64 -in id; \ | |
$(NEXT) -in id -out next; \ | |
mv next id; \ | |
done | |
key: | |
openssl genrsa -out key 840 | |
clean: | |
-rm -f key id next |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment