Commit Graph

27 Commits

Author SHA1 Message Date
Alex Gaynor 191fd465f1 Merge branch 'master' into use-urandom
Conflicts:
	paramiko/dsskey.py
	paramiko/ecdsakey.py
	paramiko/hostkeys.py
	paramiko/kex_gex.py
	paramiko/kex_group1.py
	paramiko/pkey.py
	paramiko/primes.py
	paramiko/rsakey.py
	tests/test_pkey.py
2014-04-14 10:56:05 -04:00
Alex Gaynor 6f211115f4 Switch from using PyCrypto's Random to using os.urandom.
There's several reasons for this change:

1) It's faster for reads up to 1024 bytes (nearly 10x faster for 16 byte reads)
2) It receives considerably more security review since it's in the kernel.
3) It's yet another step towards running on PyPy.
4) Using userspace CSPRNGs is considered something of an anti-pattern. See:
   http://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers/
   http://webcache.googleusercontent.com/search?q=cache:2nTvpCgKZXIJ:www.2uo.de/myths-about-urandom/+&cd=3&hl=en&ct=clnk&gl=us
2014-03-29 19:22:36 -07:00
Alex Gaynor 4d3e0b711a Switched hash functions from PyCrypto to hashlib.
There's a few advantages to this:

1) It's probably fast, OpenSSL, which typically backs hashlib, receives far
   more attention for optimizaitons than PyCrypto.
2) It's the first step to supporting PyPy, where PyCrypto doesn't run.
2014-03-29 16:55:01 -07:00
Scott Maxwell f0017b8330 Fix import * and a bunch of PEP8 formatting 2014-03-07 20:45:26 -08:00
Scott Maxwell 6d75c75e64 Remove byte conversions and unhexlify calls that we only needed for Py2.5 support and use the `b` byte string marker instead 2013-11-19 10:09:08 -08:00
Scott Maxwell 3ce336c88b Change conditional from PY3 to PY2 to be better prepared for a possible Py4. 2013-11-19 07:30:45 -08:00
Scott Maxwell 7444a99993 Fix some deprecation and resource warnings 2013-11-02 20:19:04 -07:00
Scott Maxwell fee18142a5 Fixes for Python 2.5 and Python 3.2 support 2013-11-01 00:51:00 -07:00
Scott Maxwell 8a7267beeb Eliminate all uses of b'' syntax to allow for Python 2.5 support 2013-11-01 00:37:11 -07:00
Scott Maxwell fcf56ff9f8 Fix bytes/str type in more places 2013-10-31 10:01:21 -07:00
Scott Maxwell 0b7d0cf0a2 Convert and detect types properly, use helper constants, use StringIO and range 2013-10-30 17:14:52 -07:00
Scott Maxwell 0e4ce3762a Fix message sending
Create constants for byte messages, implement asbytes so many methods can take Message and key objects directly and split get_string into get_text and get_binary. Also, change int handling to use mpint with a flag whenever the int is greater than 32 bits.
2013-10-30 17:09:34 -07:00
Scott Maxwell 66cfa97cce Fix imports 2013-10-30 16:19:30 -07:00
Jeff Forcier 28d78e4e6a Merge branch '1.11' 2013-09-27 21:29:59 -07:00
Jeff Forcier 83f44878ea Fixed a typo in the license header of most files
Conflicts:
	paramiko/proxy.py
2013-09-27 21:29:18 -07:00
Ethan Glasser-Camp 632129c427 Introduce ECDSA
This just adds tests; hooking this up with paramiko comes in the next
commit.
2013-03-25 12:19:21 -04:00
Gary van der Merwe 044e702998 Use Crypto.Random rather than Crypto.Util.RandomPool. 2010-08-03 00:13:08 +02:00
Robey Pointer 60c6e94e7d fix my email address to be the current one. 2009-07-19 19:45:02 -07:00
Robey Pointer 83b335e10f [project @ robey@lag.net-20070213191706-v8djxd4jiunb3his]
bump copyright year to 2007
2007-02-13 11:17:06 -08:00
Robey Pointer 074dc36e6b [project @ robey@lag.net-20060801182143-088ff687e0945937]
use hexlify in tests
2006-08-01 11:21:43 -07:00
Robey Pointer 4fa4fdee4b [project @ robey@lag.net-20060627064106-71a2bfb5a39a2913]
add PKey.from_private_key to read from a file object
2006-06-26 23:41:06 -07:00
Robey Pointer 79d239693a [project @ robey@lag.net-20060627060600-07d5b7e2fc57202d]
add PKey.write_private_key to write a private key into a file object, and add tests for it
2006-06-26 23:06:00 -07:00
Robey Pointer e3ed1616d1 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-25]
cool optimization from john rochester: use cStringIO in Message (and also fix some unit test bugs revealed by the change)
2005-07-07 01:10:57 +00:00
Robey Pointer 727cab9672 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-17]
more unit tests
2005-06-28 06:02:44 +00:00
Robey Pointer 44239ae077 [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-10]
fix stupid bug in kex_group1 which luckily only affected unit tests
2005-05-21 20:35:29 +00:00
Robey Pointer fead211c5c [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-154]
even better 1.2 lapras
re-bump the version # to 1.2 (with a new date since i added more stuff).
add 2005 to the copyright date in a bunch of files.
2005-02-28 08:06:08 +00:00
Robey Pointer e1639180f9 [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-92]
add rsa/dss key object unit tests
add tests for rsa/dss key objects -- yay!
2004-09-25 22:07:59 +00:00