pycryptodome
pycryptodome copied to clipboard
A self-contained cryptographic library for Python
The examples leave dangling file descriptors for `file_in`. This PR updates them to close them correctly, as is done for `file_out`. Alternatively, consider using a context manager. ``` with open("encrypted.bin",...
Currently, the ARC4 cipher will [enforce a minimum key length of 5 bytes](https://github.com/Legrandin/pycryptodome/blob/99273ea596aa6fb4ae9f18f7efa17d6bb359f35b/lib/Crypto/Cipher/ARC4.py#L137). This is better security, but there exist some scenarios where non-cryptographically-secure output is acceptable. Would pycryptodome be...
I am trying to follow the installation guide for [PyCryptodome](https://www.pycryptodome.org/en/latest/src/installation.html). But when I try to run Cryptodome / Crypto modules in my code it is giving me the following error....
```python3 >>> from Crypto.PublicKey import ECC, RSA >>> ECC.generate(curve='p384') == RSA.generate(bits=4096) Traceback (most recent call last): File "", line 1, in File "/home/a/foo/env/lib/python3.10/site-packages/Crypto/PublicKey/ECC.py", line 807, in __eq__ return other.pointQ ==...
``` from Crypto.PublicKey import ECC key = ECC.generate(curve='p384') print(key) print(key.curve) print(key.public_key().curve) ``` pycryptodome 3.14.1 uses `NIST P-384` consistently: ``` EccKey(curve='NIST P-384', ...) NIST P-384 NIST P-384 ``` pycryptodome 3.15.0 sometimes...
Short tag is widely used and defined in `Appendix C: Requirements and Guidelines for Using Short Tags` in `NIST 800-38D`. Currently short tag verify returns mismatch as computed MAC is...
I also can't find aes-gcm-siv implementations in other popular python projects like [tink](https://github.com/google/tink) and [cryptography](https://github.com/pyca/cryptography), only a sample [script](https://github.com/bjornedstrom/aes-gcm-siv-py) which was written 3 years ago and clearly states that `Do...
Hello, I recently came upon these two ciphers which I find quite interesting. Kalyna is basically the encryption standard used in Ukraine and Kuznyechik is used in Russia. Can you...