From 5e60e0e3af85f22aa0afe8bf0ecf85619afacfeb Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Thu, 22 Aug 2013 16:39:52 -0400 Subject: Imported Upstream version 0.6.0.12 --- src/pycryptopp/test/test_ed25519.py | 148 ++++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 src/pycryptopp/test/test_ed25519.py (limited to 'src/pycryptopp/test/test_ed25519.py') diff --git a/src/pycryptopp/test/test_ed25519.py b/src/pycryptopp/test/test_ed25519.py new file mode 100644 index 0000000..6e530ab --- /dev/null +++ b/src/pycryptopp/test/test_ed25519.py @@ -0,0 +1,148 @@ + +import unittest +import time +from binascii import hexlify, unhexlify +from pycryptopp.publickey import ed25519 +from pycryptopp.publickey.ed25519 import _ed25519 as raw + +def flip_bit(s, bit=0, in_byte=-1): + as_bytes = [ord(b) for b in s] + as_bytes[in_byte] = as_bytes[in_byte] ^ (0x01<