PyCryptodome exposes almost the same API as the old PyCrypto
so that most applications will run unmodified.
However, a very few breaks in compatibility had to be introduced
for those parts of the API that represented a security hazard or that
were too hard to maintain.

Specifically, for public key cryptography:

The following methods from public key objects (RSA, DSA, ElGamal) have been
removed:

Method: generate() for public key modules does not accept the progress_func parameter anymore.

Ambiguous method size from RSA, DSA and ElGamal key objects have been removed.
Instead, use methods size_in_bytes() and size_in_bits() and check the documentation.

The 3 public key object types (RSA, DSA, ElGamal) are now unpickable.
You must use the export_key() method of each key object and select a good output format: for private
keys that means a good password-based encryption scheme.

Removed attribute Crypto.PublicKey.RSA.algorithmIdentifier.

Removed Crypto.PublicKey.RSA.RSAImplementation (which should have been private in the first place).
Same for Crypto.PublicKey.DSA.DSAImplementation.

For symmetric key cryptography:

Symmetric ciphers do not have ECB as default mode anymore. ECB is not semantically secure
and it exposes correlation across blocks.
An expression like AES.new(key) will now fail. If ECB is the desired mode,
one has to explicitly use AES.new(key,AES.MODE_ECB).