diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2016-09-21 16:47:13 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2016-09-21 16:47:13 -0700 |
commit | 4687fcf4c0469ed0e3840a6715cb9c766c18628a (patch) | |
tree | e9b0f036a9dd32aa8f4e9bf10809eff12c5cc9a1 /sites | |
parent | 00f109bb8c2836b83fbba3f828988c91c54f0b4f (diff) |
Port #819 doc update to 2.0+'s 1.x install doc
Wheeee versions
Diffstat (limited to 'sites')
-rw-r--r-- | sites/www/installing-1.x.rst | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sites/www/installing-1.x.rst b/sites/www/installing-1.x.rst index 0c2424bb..356fac49 100644 --- a/sites/www/installing-1.x.rst +++ b/sites/www/installing-1.x.rst @@ -48,6 +48,32 @@ Tools on the Mac, or the ``build-essential`` package on Ubuntu or Debian Linux -- basically, anything with ``gcc``, ``make`` and so forth) as well as the Python development libraries, often named ``python-dev`` or similar. +Slow vs fast crypto math +~~~~~~~~~~~~~~~~~~~~~~~~ + +PyCrypto attempts to use the ``gmp`` C math library if it is present on your +system, which enables what it internally calls "fastmath" (``_fastmath.so``). +When those headers are not available, it falls back to "slowmath" +(``_slowmath.py``) which is a pure-Python implementation. + +Real-world tests have shown significant benefits to using the C version of this +code; thus we strongly recommend you install the ``gmp`` development headers +**before** installing Paramiko/PyCrypto. E.g.:: + + $ apt-get install libgmp-dev # or just apt + $ yum install gmp-devel # or dnf + $ brew install gmp + +If you're unsure which version of math you've ended up with, a quick way to +check is to examine whether ``_fastmath.so`` or ``_slowmath.py`` appears in the +output of:: + + from Crypto.PublicKey import RSA + print(RSA._impl._math) + +Windows +~~~~~~~ + For **Windows** users we recommend using :ref:`pypm`, installing a C development environment such as `Cygwin <http://cygwin.com>`_ or obtaining a precompiled Win32 PyCrypto package from `voidspace's Python modules page |