summaryrefslogtreecommitdiff
path: root/paramiko/primes.py
Commit message (Collapse)AuthorAgeFilesLines
* No more (object)ionsJeff Forcier2023-01-161-1/+1
|
* Remove or transmute all use of long()Jeff Forcier2023-01-091-2/+1
| | | | | | | - When wrapping literals: just go away - When wrapping variables whose values are already definitely integers (eg output of 'id()'): ditto - When wrapping variables of unknown provenance or which are definitely NOT integers: replaced with int()
* Migrate some byte related helpers aroundJeff Forcier2023-01-091-1/+2
| | | | | I feel like we should be able to just nuke byte_chr and friends at this point, but it's not entirely obvious, so let's rock that boat later.
* Fix Free Software Foundation addressPaul Howarth2022-03-151-1/+1
| | | | They moved from Temple Place to Franklin Street in 2005.
* Blacken under black 18.5b0Jeff Forcier2018-05-291-1/+7
|
* Blacken Paramiko on 2.4Chris Rose2018-05-171-11/+14
|
* String format modernization, part 11070-remove-python26-and-33Jeff Forcier2017-10-101-1/+1
| | | | | | | Choosing to skip it in some edge/corner cases where it's more harmful than helpful. Also choosing to replace many non-%s specifiers with regular old {} since I don't see why one would normally care. Again, eschewing that in spots where it seems like it might matter.
* cleanup unused and star importsPierce Lopez2017-06-011-1/+0
| | | | found and checked with pyflakes for python2.7 and python3.5
* Even moar parentheses over backslashesJeff Forcier2017-05-311-2/+5
|
* Additional PEP8 fixes.Dorian Pula2017-05-311-5/+9
|
* primes: min and max should be inclusive.Damien Tournoud2015-12-231-2/+2
| | | | | | | | | | | | | As seen in the [OpenSSH source code][1], the min and max values of the 'diffie-hellman-group-exchange-*' key exchange types are supposed to be inclusive. In the current state of the code and a standard /etc/ssh/moduli file, OpenSSH client sends min=1024, max=8192, prefer=8192, but paramiko returns one of the 7680 bits prime instead of one of the 8192 bits ones. [1]: https://github.com/openssh/openssh-portable/blob/master/kexgexc.c#L111
* Merge branch 'paramiko:master' into gssapi-py3-supportSebastian Deiss2014-04-231-24/+5
|\ | | | | | | | | | | Conflicts: sites/www/changelog.rst test.py
| * Merge branch 'master' into use-urandomAlex Gaynor2014-04-141-20/+0
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Remove unused functionAlex Gaynor2014-03-291-20/+0
| | |
| * | Switch from using PyCrypto's Random to using os.urandom.Alex Gaynor2014-03-291-7/+8
| |/ | | | | | | | | | | | | | | | | | | | | 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
* | Merge branch 'master' into gssapi-py3-supportSebastian Deiss2014-03-261-6/+8
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .gitignore README demos/demo_simple.py dev-requirements.txt paramiko/__init__.py paramiko/_winapi.py paramiko/agent.py paramiko/auth_handler.py paramiko/ber.py paramiko/buffered_pipe.py paramiko/channel.py paramiko/client.py paramiko/common.py paramiko/dsskey.py paramiko/ecdsakey.py paramiko/file.py paramiko/hostkeys.py paramiko/kex_gex.py paramiko/kex_group1.py paramiko/message.py paramiko/packet.py paramiko/pkey.py paramiko/primes.py paramiko/proxy.py paramiko/py3compat.py paramiko/server.py paramiko/sftp_client.py paramiko/transport.py paramiko/util.py paramiko/win_pageant.py setup.py sites/shared_conf.py sites/www/changelog.rst sites/www/conf.py sites/www/index.rst sites/www/installing.rst test.py tests/loop.py tests/stub_sftp.py tests/test_auth.py tests/test_client.py tests/test_file.py tests/test_hostkeys.py tests/test_kex.py tests/test_message.py tests/test_packetizer.py tests/test_pkey.py tests/test_sftp.py tests/test_sftp_big.py tests/test_transport.py tests/test_util.py
| * Fix import * and a bunch of PEP8 formattingScott Maxwell2014-03-071-6/+7
| |
| * Fix a bunch of indentation errors.Jeff Forcier2014-03-051-8/+8
| | | | | | | | Maybe that whitespace merge flag was not so great an idea.
| * Merge remote-tracking branch 'scottkmaxwell/py3-support-without-py25' into ↵Jeff Forcier2014-03-051-8/+7
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | python3 Conflicts: dev-requirements.txt paramiko/__init__.py paramiko/file.py paramiko/hostkeys.py paramiko/message.py paramiko/proxy.py paramiko/server.py paramiko/transport.py paramiko/util.py paramiko/win_pageant.py setup.py
| | * Use 'with' for opening most file and SFTPFIle objectsScott Maxwell2013-11-191-4/+1
| | |
| | * Fix some deprecation and resource warningsScott Maxwell2013-11-021-9/+11
| | |
| | * Changes inspired by the nischu7 branchScott Maxwell2013-11-011-1/+1
| | |
| | * Convert and detect types properly, use helper constants, use StringIO and rangeScott Maxwell2013-10-301-2/+2
| | |
| | * Fix dict iters, sorts, exceptions, bytes renames and tuple argsScott Maxwell2013-10-301-4/+3
| | |
| | * Fix importsScott Maxwell2013-10-301-0/+1
| | |
| * | Epydoc -> Sphinx.Olle Lundberg2014-01-231-1/+1
| |/
* | Merge branch scottkmaxwell:py3-support-without-py25 intoSebastian Deiss2014-02-111-16/+15
|/ | | SebastianDeiss:gssapi-py3-support
* Fixed a typo in the license header of most filesJeff Forcier2013-09-271-1/+1
| | | | | Conflicts: paramiko/proxy.py
* Use Crypto.Random rather than Crypto.Util.RandomPool.Gary van der Merwe2010-08-031-6/+6
|
* fix my email address to be the current one.Robey Pointer2009-07-191-1/+1
|
* [project @ robey@lag.net-20070213191706-v8djxd4jiunb3his]Robey Pointer2007-02-131-1/+1
| | | | bump copyright year to 2007
* [project @ robey@lag.net-20060829181836-1cd17df7729c4db8]Robey Pointer2006-08-291-1/+1
| | | | remove usage of has_key, which is dangerous and deprecated
* [project @ robey@lag.net-20060220005934-58d0df2920e799b5]Robey Pointer2006-02-191-1/+1
| | | | update copyright year
* [project @ robey@master-shake.local-20060115063008-4f68552398868788]Robey Pointer2006-01-141-5/+8
| | | | fix a bunch of pychecker warnings, some of which were actual (but unlikely) bugs
* [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-65]Robey Pointer2005-10-131-2/+2
| | | | remove unnecessary shebangs, fix import lines to be explicit about imports from within paramiko, and a bit of whitespace cleanup
* [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-31]Robey Pointer2005-07-131-1/+1
| | | | fix whitespace on a line that bugged me
* [project @ Arch-1:robey@lag.net--2005-master-shake%paramiko--dev--1--patch-29]Robey Pointer2005-07-101-6/+4
| | | | a bunch of silly changes where i was trying to fix pychecker warnings before i decided it wasnt worth the effort
* [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-154]Robey Pointer2005-02-281-1/+1
| | | | | | | 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.
* [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-111]Robey Pointer2004-11-221-2/+2
| | | | | | | | fix extremely unlikely channel counter wrapping Transport's channel counter can overflow after 4 billion some channels are created. make it wrap back around after 16 million instead. also allow the logging channel to be set manually. fix some comments elsewhere.
* [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-61]Robey Pointer2004-06-101-1/+1
| | | | | | no more Foobar fix "Foobar" to be "Paramiko" in the one place i missed it in all the gpl headers. sigh. :)
* [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-22]Robey Pointer2004-01-041-0/+18
| | | | | | | | | fix MANIFEST.in, change version numbers to 0.9-doduo, fix LPGL notices fixed MANIFEST.in to include the demo scripts, LICENSE, and ChangeLog. upped everything to version 0.9-doduo. fixed the copyright notice, and added the LGPL banner to the top of every python file.
* [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-20]Robey Pointer2004-01-041-10/+14
| | | | | | | | | | | | | | | | | | | more docs, and password-protected key files can now be read lots more documentation, some of it moved out of the README file, which is now much smaller and less rambling. repr(Transport) now reports the number of bits used in the cipher. cleaned up BER to use util functions, and throw a proper exception (the new BERException) on error. it doesn't ever have to be a full BER decoder, but it can at least comb its hair and tuck in its shirt. lots of stuff added to PKey.read_private_key_file so it can try to decode password-protected key files. right now it only understands "DES-EDE3-CBC" format, but this is the only format i've seen openssh make so far. if the key is password-protected, but no password was given, a new exception (PasswordRequiredException) is raised so an outer layer can ask for a password and try again.
* [project @ Arch-1:robey@lag.net--2003-public%secsh--dev--1.0--patch-16]Robey Pointer2003-12-281-0/+128
hook up server-side kex-gex; add more documentation group-exchange kex should work now on the server side. it will only be advertised if a "moduli" file has been loaded (see the -gasp- docs) so we don't spend hours (literally. hours.) computing primes. some of the logic was previously wrong, too, since it had never been tested. fixed repr() string for Transport/BaseTransport. moved is_authenticated to Transport where it belongs. added lots of documentation (but still only about 10% documented). lots of methods were made private finally.