Comment 2 for bug 54476

Revision history for this message
Denis Bernard (db47h) wrote :

Modified version of the previous patch. The idea is to be able to use Crypto.Util.Counter if available, and fall back to our own implementation if necessary.

The CTR counter has been moved from Transport to paramiko.util and the API is now similar to Crypto.Util.Counter (although it only takes nbits, initial_value and overflow for now).

Basically, when upgrading to a version of pycrypto that provides its own stateful counter implementation (like the current git version does), paramiko would automatically take advantage of it without requiring any code changes.

In regards to testing, this code has only been tested on Python 2.5.2.