Skip to content

Instantly share code, notes, and snippets.

@codedot
Last active January 2, 2016 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codedot/8317164 to your computer and use it in GitHub Desktop.
Save codedot/8317164 to your computer and use it in GitHub Desktop.
One-way trapdoor permutation for 840 bits based on RSA
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