Skip to content
Advertisement

Tag: pycryptodome

Why PyCryptoDome’s 3DES algorithm uses 128-bits or 192-bits key instead of 56-bits?

According to Wikipedia, 3DES’s cipher uses a 56-bits encryption key to encrypt data; but Pycryptodome’s 3DES class uses either 128-bits or 192-bits encryption key. Also both Pycryptodome’s AES’s and 3DES’s encryption speed are same, output is similar. Am I doing something wrong or is this 3DES a bit different? Here’s my code to encrypt data with 3DES algorithm in Python:

Python import of ECC private key in PEM encoding fails

I’m running Python version 3.8.2 and using pycryptodome version 3.9.9 to import an ECC private key in PEM encoding for later signing some data. The following EC private key is a sample key, and I’m using it for several cross-platform projects [e.g. Java, PHP, NodeJs] and it works without any problem (it’s a NIST P-256 / secp256r1-key) key: ecprivatekey.pem: Using

trying to convert Java RSA-PSS signature verification code (with SHA256 hash, SHA1 MGF hash) to Python

Here’s my Java code, which successfully verifies the signature, as expected. The full code (with the imports, keys, message and signature) can be seen at https://pastebin.com/PmhGDaPv in case you want to try to reproduce the issue. My Python code, which does not verify the signature, as expected: The full code (with the imports, keys, message and signature) can be seen

Advertisement