[PYTHON-CRYPTO] RSA/DSA in C

Paul Swartz z3p at TWISTEDMATRIX.COM
Tue Nov 19 03:35:20 CET 2002


Over the weekend, I wrote up modules using gmp to
implement RSA and DSA in C.  These work with the
current Crypto.PublicKey.pubkey interface, and
pass the tests.  I'm submitting them to you all to
look at, and if no one has any complaints, I'll
commit them to the repository.

The benchmarks I wrote (5000 encrypts/decrypts for
RSA, 500 signs/verifys for DSA) show a significant
speedup, especially for DSA.  RSA went from 10.7s
to 2.1s, and DSA went from 76.7s to 2.6s.

(attached: Crypto/setup.py.diff,
Crypto/PublicKey/RSA.py.diff,
Crypto/PublicKey/DSA.py.diff, , Crypto/src/_rsa.c,
Crypto/src/_dsa.c)

-p
--
     Paul Swartz
(o_  http://twistedmatrix.com/users/z3p.twistd/
//\  z3p at twistedmatrix.com
V_/_ AIM: Z3Penguin

-------------- next part --------------
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  _dsa.c
     Date:  17 Nov 2002, 23:57
     Size:  7026 bytes.
     Type:  Text
-------------- next part --------------
A non-text attachment was scrubbed...
Name: _dsa.c
Type: application/octet-stream
Size: 7018 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-crypto/attachments/20021118/f8593242/attachment.obj>
-------------- next part --------------
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  _rsa.c
     Date:  17 Nov 2002, 21:39
     Size:  7124 bytes.
     Type:  Text
-------------- next part --------------
A non-text attachment was scrubbed...
Name: _rsa.c
Type: application/octet-stream
Size: 7118 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-crypto/attachments/20021118/f8593242/attachment-0001.obj>
-------------- next part --------------
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  setup.py.diff
     Date:  18 Nov 2002, 18:20
     Size:  1007 bytes.
     Type:  Text
-------------- next part --------------
A non-text attachment was scrubbed...
Name: setup.py.diff
Type: application/octet-stream
Size: 975 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-crypto/attachments/20021118/f8593242/attachment-0002.obj>
-------------- next part --------------
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  DSA.py.diff
     Date:  18 Nov 2002, 21:30
     Size:  1900 bytes.
     Type:  Text
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DSA.py.diff
Type: application/octet-stream
Size: 1909 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-crypto/attachments/20021118/f8593242/attachment-0003.obj>
-------------- next part --------------
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  RSA.py.diff
     Date:  18 Nov 2002, 21:34
     Size:  2791 bytes.
     Type:  Text
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RSA.py.diff
Type: application/octet-stream
Size: 2788 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-crypto/attachments/20021118/f8593242/attachment-0004.obj>


More information about the python-crypto mailing list