From b7341b658d6d2285676ce0b3c287383ad69a293e Mon Sep 17 00:00:00 2001 From: Yesudeep Mangalapilly Date: Fri, 12 Aug 2011 13:06:51 +0530 Subject: Adds verification tests for int2bytes and bytes2int * There is a bug in the older int2bytes implementation. I've raised an issue on bitbucket for that already. #11 The pkcs1 file verification test fails if the behavior for int2bytes is corrected. --- speed.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'speed.sh') diff --git a/speed.sh b/speed.sh index 17f1ea4..a9a1431 100755 --- a/speed.sh +++ b/speed.sh @@ -3,13 +3,14 @@ echo "int2bytes speed test" echo "python2.5" python2.5 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n)' -python2.5 -mtimeit -s'from rsa.transform import old_int2bytes; n = 1<<4096' 'old_int2bytes(n)' +python2.5 -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n)' echo "python2.6" -python2.6 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n)' -python2.6 -mtimeit -s'from rsa.transform import old_int2bytes; n = 1<<4096' 'old_int2bytes(n)' +python2.6 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n, 516)' +python2.6 -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n, 516)' echo "python2.7" python2.7 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n)' -python2.7 -mtimeit -s'from rsa.transform import old_int2bytes; n = 1<<4096' 'old_int2bytes(n)' +python2.7 -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n)' echo "python3.2" python3 -mtimeit -s'from rsa.transform import int2bytes; n = 1<<4096' 'int2bytes(n)' -python3 -mtimeit -s'from rsa.transform import old_int2bytes; n = 1<<4096' 'old_int2bytes(n)' +python3 -mtimeit -s'from rsa.transform import _int2bytes; n = 1<<4096' '_int2bytes(n)' + -- cgit v1.2.1