Quantum Outpost

Public scan · 2026-05-01

pyca/cryptography

cryptography is a package designed to expose cryptographic primitives and recipes to Python developers.

github → homepage → Python ★ 7,569 commit 57e69d6 scanner v0.1.0

Files scanned

1,530

Shor-vulnerable

71

RSA / ECC / Ed* / X25519

Grover-weakened

399

AES-128 / SHA-1 / MD5

Total occurrences

470

Breakdown by primitive

  • SHA-1 (broken, replace with SHA-256) 312
  • MD5 (broken, replace with SHA-256) 48
  • AES-128 (double to AES-256) 39
  • RSA certificate 21
  • ECDSA/ECDH 10
  • RSA 10
  • Asymmetric 9
  • ECC certificate 7
  • Ed25519 3
  • RSA/DSA/DH 3
  • DH 2
  • DSA 2
  • X25519 2
  • ECC 1
  • EdDSA 1
docs/development/custom-vectors/rsa-oaep-sha2/generate_rsa_oaep_sha2.py open ↗
  • L10 Shor RSA py-cryptography-rsa
    from cryptography.hazmat.primitives.asymmetric import padding, rsa
  • L70 Grover SHA-1 (broken, replace with SHA-256) sha1
    mgf=padding.MGF1(algorithm=hashes.SHA1()),
  • L71 Grover SHA-1 (broken, replace with SHA-256) sha1
    algorithm=hashes.SHA1(),
  • L106 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L113 Grover SHA-1 (broken, replace with SHA-256) sha1
    if isinstance(hashtuple[0], hashes.SHA1) and isinstance(
  • L114 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashtuple[1], hashes.SHA1
docs/development/custom-vectors/secp256k1/verify_secp256k1.py open ↗
  • L4 Shor ECDSA/ECDH py-cryptography-ec
    from cryptography.hazmat.primitives.asymmetric import ec
  • L11 Grover SHA-1 (broken, replace with SHA-256) sha1
    "SHA-1": hashes.SHA1,
  • L11 Grover SHA-1 (broken, replace with SHA-256) sha1
    "SHA-1": hashes.SHA1,
src/_cffi_src/openssl/dh.py open ↗
  • L8 Shor RSA/DSA/DH c-openssl-rsa
    #include <openssl/dh.h>
src/_cffi_src/openssl/dsa.py open ↗
  • L8 Shor RSA/DSA/DH c-openssl-rsa
    #include <openssl/dsa.h>
src/_cffi_src/openssl/ec.py open ↗
  • L8 Shor ECC c-openssl-ec
    #include <openssl/ec.h>
src/_cffi_src/openssl/evp.py open ↗
  • L16 Shor Asymmetric c-openssl-evp-pkey
    static const int EVP_PKEY_RSA;
  • L17 Shor Asymmetric c-openssl-evp-pkey
    static const int EVP_PKEY_DSA;
  • L18 Shor Asymmetric c-openssl-evp-pkey
    static const int EVP_PKEY_DH;
  • L19 Shor Asymmetric c-openssl-evp-pkey
    static const int EVP_PKEY_EC;
  • L22 Shor Asymmetric c-openssl-evp-pkey
    static const int Cryptography_HAS_EVP_PKEY_DHX;
  • L45 Shor Asymmetric c-openssl-evp-pkey
    #ifdef EVP_PKEY_DHX
  • L46 Shor Asymmetric c-openssl-evp-pkey
    const long Cryptography_HAS_EVP_PKEY_DHX = 1;
  • L48 Shor Asymmetric c-openssl-evp-pkey
    const long Cryptography_HAS_EVP_PKEY_DHX = 0;
src/_cffi_src/openssl/rsa.py open ↗
  • L8 Shor RSA/DSA/DH c-openssl-rsa
    #include <openssl/rsa.h>
  • L22 Shor RSA c-rsa-generate
    int RSA_generate_key_ex(RSA *, int, BIGNUM *, BN_GENCB *);
src/cryptography/hazmat/backends/openssl/backend.py open ↗
  • L11 Shor ECDSA/ECDH py-cryptography-ec
    from cryptography.hazmat.primitives.asymmetric import ec
  • L261 Shor Asymmetric c-openssl-evp-pkey
    return self._lib.Cryptography_HAS_EVP_PKEY_DHX == 1
  • L41 Grover SHA-1 (broken, replace with SHA-256) sha1
    # Sometimes SHA1 is still permissible. That logic is contained
  • L114 Grover SHA-1 (broken, replace with SHA-256) sha1
    # signatures, e.g. RSA PKCS#1 v1.5 SHA1 (sha1WithRSAEncryption).
  • L115 Grover SHA-1 (broken, replace with SHA-256) sha1
    if self._fips_enabled and isinstance(algorithm, hashes.SHA1):
  • L132 Grover SHA-1 (broken, replace with SHA-256) sha1
    # FIPS mode still allows SHA1 for HMAC
  • L133 Grover SHA-1 (broken, replace with SHA-256) sha1
    if self._fips_enabled and isinstance(algorithm, hashes.SHA1):
  • L139 Grover MD5 (broken, replace with SHA-256) md5
    hashes.MD5,
  • L140 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1,
  • L167 Grover SHA-1 (broken, replace with SHA-256) sha1
    if self._fips_enabled and isinstance(algorithm, hashes.SHA1):
  • L173 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1,
src/cryptography/hazmat/primitives/asymmetric/padding.py open ↗
  • L13 Shor RSA py-cryptography-rsa
    from cryptography.hazmat.primitives.asymmetric import rsa
src/cryptography/hazmat/primitives/serialization/pkcs7.py open ↗
  • L19 Shor RSA py-cryptography-rsa
    from cryptography.hazmat.primitives.asymmetric import ec, padding, rsa
  • L19 Shor ECDSA/ECDH py-cryptography-ec
    from cryptography.hazmat.primitives.asymmetric import ec, padding, rsa
  • L43 Grover AES-128 (double to AES-256) aes-128-flag
    type[algorithms.AES128], type[algorithms.AES256]
  • L248 Grover AES-128 (double to AES-256) aes-128-flag
    algorithms.AES128,
  • L251 Grover AES-128 (double to AES-256) aes-128-flag
    raise TypeError("Only AES128 and AES256 are supported")
  • L269 Grover AES-128 (double to AES-256) aes-128-flag
    # The default content encryption algorithm is AES-128-CBC, which the
  • L273 Grover AES-128 (double to AES-256) aes-128-flag
    self._content_encryption_algorithm or algorithms.AES128
tests/doubles.py open ↗
  • L7 Shor Ed25519 py-cryptography-ed25519
    from cryptography.hazmat.primitives.asymmetric import ed25519, padding
tests/hazmat/primitives/fixtures_dh.py open ↗
  • L6 Shor DH py-cryptography-dh
    from cryptography.hazmat.primitives.asymmetric import dh
tests/hazmat/primitives/fixtures_ec.py open ↗
  • L6 Shor ECDSA/ECDH py-cryptography-ec
    from cryptography.hazmat.primitives.asymmetric import ec
tests/hazmat/primitives/fixtures_rsa.py open ↗
  • L713 Shor RSA certificate pem-rsa-key
    -----BEGIN RSA PRIVATE KEY-----
tests/hazmat/primitives/test_dh.py open ↗
  • L15 Shor DH py-cryptography-dh
    from cryptography.hazmat.primitives.asymmetric import dh
tests/hazmat/primitives/test_dsa.py open ↗
  • L17 Shor DSA py-cryptography-dsa
    from cryptography.hazmat.primitives.asymmetric import dsa
  • L33 Grover SHA-1 (broken, replace with SHA-256) sha1
    "SHA1": hashes.SHA1(),
  • L33 Grover SHA-1 (broken, replace with SHA-256) sha1
    "SHA1": hashes.SHA1(),
  • L498 Grover SHA-1 (broken, replace with SHA-256) sha1
    public_key.verify(b"fakesig", b"fakemsg", hashes.SHA1())
  • L502 Grover SHA-1 (broken, replace with SHA-256) sha1
    algorithm = hashes.SHA1()
  • L511 Grover SHA-1 (broken, replace with SHA-256) sha1
    h = hashes.Hash(hashes.SHA1(), backend)
  • L514 Grover SHA-1 (broken, replace with SHA-256) sha1
    prehashed_alg = Prehashed(hashes.SHA1())
  • L515 Grover SHA-1 (broken, replace with SHA-256) sha1
    signature = private_key.sign(message, hashes.SHA1())
  • L523 Grover SHA-1 (broken, replace with SHA-256) sha1
    h = hashes.Hash(hashes.SHA1(), backend)
  • L569 Grover SHA-1 (broken, replace with SHA-256) sha1
    algorithm = hashes.SHA1()
  • L577 Grover SHA-1 (broken, replace with SHA-256) sha1
    algorithm = hashes.SHA1()
  • L585 Grover SHA-1 (broken, replace with SHA-256) sha1
    h = hashes.Hash(hashes.SHA1(), backend)
  • L588 Grover SHA-1 (broken, replace with SHA-256) sha1
    prehashed_alg = Prehashed(hashes.SHA1())
  • L591 Grover SHA-1 (broken, replace with SHA-256) sha1
    public_key.verify(signature, message, hashes.SHA1())
  • L596 Grover SHA-1 (broken, replace with SHA-256) sha1
    h = hashes.Hash(hashes.SHA1(), backend)
tests/hazmat/primitives/test_ec.py open ↗
  • L17 Shor ECDSA/ECDH py-cryptography-ec
    from cryptography.hazmat.primitives.asymmetric import ec
  • L41 Grover SHA-1 (broken, replace with SHA-256) sha1
    "SHA-1": hashes.SHA1,
  • L41 Grover SHA-1 (broken, replace with SHA-256) sha1
    "SHA-1": hashes.SHA1,
  • L578 Grover SHA-1 (broken, replace with SHA-256) sha1
    "SHA1": hashes.SHA1(),
  • L578 Grover SHA-1 (broken, replace with SHA-256) sha1
    "SHA1": hashes.SHA1(),
tests/hazmat/primitives/test_hpke.py open ↗
  • L17 Shor ECDSA/ECDH py-cryptography-ec
    from cryptography.hazmat.primitives.asymmetric import ec, mlkem, x25519
  • L17 Shor X25519 py-cryptography-x25519
    from cryptography.hazmat.primitives.asymmetric import ec, mlkem, x25519
tests/hazmat/primitives/test_pkcs7.py open ↗
  • L23 Shor RSA py-cryptography-rsa
    from cryptography.hazmat.primitives.asymmetric import ed25519, padding, rsa
  • L23 Shor Ed25519 py-cryptography-ed25519
    from cryptography.hazmat.primitives.asymmetric import ed25519, padding, rsa
  • L946 Grover AES-128 (double to AES-256) aes-128-flag
    builder = builder.set_content_encryption_algorithm(algorithms.AES128)
  • L948 Grover AES-128 (double to AES-256) aes-128-flag
    builder.set_content_encryption_algorithm(algorithms.AES128)
tests/hazmat/primitives/test_rsa.py open ↗
  • L15 Shor RSA py-cryptography-rsa
    from cryptography.hazmat.primitives.asymmetric import padding, rsa
  • L99 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L108 Grover SHA-1 (broken, replace with SHA-256) sha1
    # of all the SHAs above, but SHA1/SHA1 is something we already
  • L108 Grover SHA-1 (broken, replace with SHA-256) sha1
    # of all the SHAs above, but SHA1/SHA1 is something we already
  • L416 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1()
  • L418 Grover SHA-1 (broken, replace with SHA-256) sha1
    skip_message="Does not support SHA1 signature.",
  • L443 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L504 Grover SHA-1 (broken, replace with SHA-256) sha1
    mgf=padding.MGF1(hashes.SHA1()),
  • L512 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1()
  • L514 Grover SHA-1 (broken, replace with SHA-256) sha1
    skip_message="Does not support SHA1 signature.",
  • L543 Grover SHA-1 (broken, replace with SHA-256) sha1
    mgf=padding.MGF1(algorithm=hashes.SHA1()),
  • L546 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L556 Grover SHA-1 (broken, replace with SHA-256) sha1
    mgf=padding.MGF1(algorithm=hashes.SHA1()),
  • L559 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L565 Grover SHA-1 (broken, replace with SHA-256) sha1
    mgf=padding.MGF1(hashes.SHA1()),
  • L955 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1()
  • L957 Grover SHA-1 (broken, replace with SHA-256) sha1
    skip_message="Does not support SHA1 signature.",
  • L974 Grover SHA-1 (broken, replace with SHA-256) sha1
    signature, message, padding.PKCS1v15(), hashes.SHA1()
  • L978 Grover SHA-1 (broken, replace with SHA-256) sha1
    digest = hashes.Hash(hashes.SHA1())
  • L982 Grover SHA-1 (broken, replace with SHA-256) sha1
    signature, padding.PKCS1v15(), hashes.SHA1()
  • L1088 Grover SHA-1 (broken, replace with SHA-256) sha1
    padding.PSS(mgf=padding.MGF1(hashes.SHA1()), salt_length=20)
  • L1094 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1()
  • L1096 Grover SHA-1 (broken, replace with SHA-256) sha1
    skip_message="Does not support SHA1 signature.",
  • L1115 Grover SHA-1 (broken, replace with SHA-256) sha1
    mgf=padding.MGF1(algorithm=hashes.SHA1()),
  • L1118 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L1445 Grover SHA-1 (broken, replace with SHA-256) sha1
    mgf=padding.MGF1(hashes.SHA1()),
  • L1449 Grover SHA-1 (broken, replace with SHA-256) sha1
    and backend.signature_hash_supported(hashes.SHA1())
  • L1452 Grover SHA-1 (broken, replace with SHA-256) sha1
    "Does not support PSS using MGF1 with SHA1 or SHA1 signature."
  • L1452 Grover SHA-1 (broken, replace with SHA-256) sha1
    "Does not support PSS using MGF1 with SHA1 or SHA1 signature."
  • L1463 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L1585 Grover SHA-1 (broken, replace with SHA-256) sha1
    backend.signature_hash_supported(hashes.SHA1())
  • L1588 Grover SHA-1 (broken, replace with SHA-256) sha1
    skip_message="Does not support SHA1 and PKCS1v1.5.",
  • L1598 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L1868 Grover SHA-1 (broken, replace with SHA-256) sha1
    mgf=padding.MGF1(algorithm=hashes.SHA1()),
  • L1869 Grover SHA-1 (broken, replace with SHA-256) sha1
    algorithm=hashes.SHA1(),
  • L1899 Grover SHA-1 (broken, replace with SHA-256) sha1
    mgf=padding.MGF1(algorithm=hashes.SHA1()),
  • L1900 Grover SHA-1 (broken, replace with SHA-256) sha1
    algorithm=hashes.SHA1(),
  • L1981 Grover SHA-1 (broken, replace with SHA-256) sha1
    mgf=padding.MGF1(algorithm=hashes.SHA1()),
  • L1982 Grover SHA-1 (broken, replace with SHA-256) sha1
    algorithm=hashes.SHA1(),
  • L2012 Grover SHA-1 (broken, replace with SHA-256) sha1
    algorithm=hashes.SHA1(),
  • L2013 Grover SHA-1 (broken, replace with SHA-256) sha1
    mgf=padding.MGF1(hashes.SHA1()),
  • L2104 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L2111 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
tests/hazmat/primitives/test_serialization.py open ↗
  • L1010 Shor RSA certificate pem-rsa-key
    -----BEGIN RSA PRIVATE KEY-----
  • L1033 Shor RSA certificate pem-rsa-key
    -----BEGIN RSA PRIVATE KEY-----
  • L1059 Shor RSA certificate pem-rsa-key
    -----BEGIN RSA PRIVATE KEY-----
  • L27 Grover MD5 (broken, replace with SHA-256) md5
    from cryptography.hazmat.primitives.hashes import MD5, SHA1
  • L27 Grover SHA-1 (broken, replace with SHA-256) sha1
    from cryptography.hazmat.primitives.hashes import MD5, SHA1
  • L606 Grover MD5 (broken, replace with SHA-256) md5
    backend.hash_supported(MD5())
  • L609 Grover MD5 (broken, replace with SHA-256) md5
    skip_message="Does not support DES MD5",
  • L1035 Grover AES-128 (double to AES-256) aes-128-flag
    DEK-Info: AES-128-CBC,5E22A2BD85A653FB7A3ED20DE84F54CD
  • L1863 Grover SHA-1 (broken, replace with SHA-256) sha1
    b.hmac_hash(SHA1())
  • L1866 Grover SHA-1 (broken, replace with SHA-256) sha1
    b = PrivateFormat.PKCS12.encryption_builder().hmac_hash(SHA1())
  • L1868 Grover SHA-1 (broken, replace with SHA-256) sha1
    b.hmac_hash(SHA1())
tests/hazmat/primitives/test_ssh.py open ↗
  • L555 Shor RSA certificate pem-rsa-key
    data = self.make_file(header=b"-----BEGIN RSA PRIVATE KEY-----\n")
  • L1236 Grover SHA-1 (broken, replace with SHA-256) sha1
    pytest.skip("FIPS does not support RSA SHA1")
  • L1263 Grover SHA-1 (broken, replace with SHA-256) sha1
    pytest.skip("FIPS does not support RSA SHA1")
  • L1854 Grover MD5 (broken, replace with SHA-256) md5
    only_if=lambda backend: backend.hash_supported(hashes.MD5()),
  • L1855 Grover MD5 (broken, replace with SHA-256) md5
    skip_message="Does not support MD5",
  • L1864 Grover MD5 (broken, replace with SHA-256) md5
    fingerprint = ssh_key_fingerprint(public_key, hashes.MD5())
  • L1881 Grover MD5 (broken, replace with SHA-256) md5
    only_if=lambda backend: backend.hash_supported(hashes.MD5()),
  • L1882 Grover MD5 (broken, replace with SHA-256) md5
    skip_message="Does not support MD5 or Ed25519",
  • L1891 Grover MD5 (broken, replace with SHA-256) md5
    fingerprint = ssh_key_fingerprint(public_key, hashes.MD5())
  • L1908 Grover MD5 (broken, replace with SHA-256) md5
    only_if=lambda backend: backend.hash_supported(hashes.MD5()),
  • L1909 Grover MD5 (broken, replace with SHA-256) md5
    skip_message="Does not support MD5",
  • L1918 Grover MD5 (broken, replace with SHA-256) md5
    fingerprint = ssh_key_fingerprint(public_key, hashes.MD5())
  • L1942 Grover SHA-1 (broken, replace with SHA-256) sha1
    ssh_key_fingerprint(public_key, hashes.SHA1())  # type: ignore[arg-type]
tests/hazmat/primitives/test_x25519.py open ↗
  • L15 Shor X25519 py-cryptography-x25519
    from cryptography.hazmat.primitives.asymmetric import x25519
tests/hazmat/primitives/utils.py open ↗
  • L22 Shor RSA py-cryptography-rsa
    from cryptography.hazmat.primitives.asymmetric import rsa
  • L395 Grover SHA-1 (broken, replace with SHA-256) sha1
    "hmac_sha1": hashes.SHA1,
tests/wycheproof/test_dsa.py open ↗
  • L11 Shor DSA py-cryptography-dsa
    from cryptography.hazmat.primitives.asymmetric import dsa
  • L16 Grover SHA-1 (broken, replace with SHA-256) sha1
    "SHA-1": hashes.SHA1(),
  • L16 Grover SHA-1 (broken, replace with SHA-256) sha1
    "SHA-1": hashes.SHA1(),
tests/wycheproof/test_ecdh.py open ↗
  • L12 Shor ECDSA/ECDH py-cryptography-ec
    from cryptography.hazmat.primitives.asymmetric import ec
tests/wycheproof/test_ecdsa.py open ↗
  • L11 Shor ECDSA/ECDH py-cryptography-ec
    from cryptography.hazmat.primitives.asymmetric import ec
  • L16 Grover SHA-1 (broken, replace with SHA-256) sha1
    "SHA-1": hashes.SHA1(),
  • L16 Grover SHA-1 (broken, replace with SHA-256) sha1
    "SHA-1": hashes.SHA1(),
tests/wycheproof/test_rsa.py open ↗
  • L13 Shor RSA py-cryptography-rsa
    from cryptography.hazmat.primitives.asymmetric import padding, rsa
  • L18 Grover SHA-1 (broken, replace with SHA-256) sha1
    "SHA-1": hashes.SHA1(),
  • L18 Grover SHA-1 (broken, replace with SHA-256) sha1
    "SHA-1": hashes.SHA1(),
  • L123 Grover SHA-1 (broken, replace with SHA-256) sha1
    digest, hashes.SHA1
  • L160 Grover SHA-1 (broken, replace with SHA-256) sha1
    isinstance(digest, hashes.SHA1)
  • L161 Grover SHA-1 (broken, replace with SHA-256) sha1
    or isinstance(mgf_digest, hashes.SHA1)
tests/x509/test_ocsp.py open ↗
  • L16 Shor RSA py-cryptography-rsa
    from cryptography.hazmat.primitives.asymmetric import ec, ed448, ed25519, rsa
  • L16 Shor ECDSA/ECDH py-cryptography-ec
    from cryptography.hazmat.primitives.asymmetric import ec, ed448, ed25519, rsa
  • L16 Shor Ed25519 py-cryptography-ed25519
    from cryptography.hazmat.primitives.asymmetric import ec, ed448, ed25519, rsa
  • L16 Shor EdDSA py-cryptography-ed448
    from cryptography.hazmat.primitives.asymmetric import ec, ed448, ed25519, rsa
  • L118 Grover SHA-1 (broken, replace with SHA-256) sha1
    assert isinstance(req.hash_algorithm, hashes.SHA1)
  • L208 Grover SHA-1 (broken, replace with SHA-256) sha1
    builder = builder.add_certificate(cert, issuer, hashes.SHA1())
  • L211 Grover SHA-1 (broken, replace with SHA-256) sha1
    builder.add_certificate(cert, issuer, hashes.SHA1())
  • L215 Grover SHA-1 (broken, replace with SHA-256) sha1
    b"0" * 20, b"0" * 20, 1, hashes.SHA1()
  • L222 Grover SHA-1 (broken, replace with SHA-256) sha1
    b"0" * 20, b"0" * 20, 1, hashes.SHA1()
  • L227 Grover SHA-1 (broken, replace with SHA-256) sha1
    b"0" * 20, b"0" * 20, 1, hashes.SHA1()
  • L231 Grover SHA-1 (broken, replace with SHA-256) sha1
    builder.add_certificate(cert, issuer, hashes.SHA1())
  • L244 Grover SHA-1 (broken, replace with SHA-256) sha1
    b"0" * 19, b"0" * 20, 1, hashes.SHA1()
  • L248 Grover SHA-1 (broken, replace with SHA-256) sha1
    b"0" * 20, b"0" * 21, 1, hashes.SHA1()
  • L255 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L267 Grover MD5 (broken, replace with SHA-256) md5
    builder.add_certificate(cert, issuer, hashes.MD5())
  • L300 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L307 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L313 Grover SHA-1 (broken, replace with SHA-256) sha1
    builder = builder.add_certificate(cert, issuer, hashes.SHA1())
  • L332 Grover SHA-1 (broken, replace with SHA-256) sha1
    cert, issuer, hashes.SHA1()
  • L343 Grover SHA-1 (broken, replace with SHA-256) sha1
    h = hashes.Hash(hashes.SHA1())
  • L353 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L596 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L620 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L646 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L697 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L733 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L768 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L796 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L833 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L869 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L901 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L930 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L990 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L1049 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L1062 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L1092 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L1104 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L1116 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L1146 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L1173 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L1342 Grover SHA-1 (broken, replace with SHA-256) sha1
    assert isinstance(resp.hash_algorithm, hashes.SHA1)
  • L1659 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L1687 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L1733 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
tests/x509/test_x509_ext.py open ↗
  • L18 Shor RSA py-cryptography-rsa
    from cryptography.hazmat.primitives.asymmetric import ec, rsa
  • L18 Shor ECDSA/ECDH py-cryptography-ec
    from cryptography.hazmat.primitives.asymmetric import ec, rsa
vectors/cryptography_vectors/asymmetric/EC/ec-missing-curve.pem open ↗
  • L1 Shor ECC certificate pem-ec-key
    -----BEGIN EC PRIVATE KEY-----
vectors/cryptography_vectors/asymmetric/EC/explicit_parameters_private_key.pem open ↗
  • L1 Shor ECC certificate pem-ec-key
    -----BEGIN EC PRIVATE KEY-----
vectors/cryptography_vectors/asymmetric/EC/explicit_parameters_wap_wsg_idm_ecid_wtls11_private_key.pem open ↗
  • L1 Shor ECC certificate pem-ec-key
    -----BEGIN EC PRIVATE KEY-----
vectors/cryptography_vectors/asymmetric/EC/high-bit-set.pem open ↗
  • L1 Shor ECC certificate pem-ec-key
    -----BEGIN EC PRIVATE KEY-----
vectors/cryptography_vectors/asymmetric/EC/secp128r1_private_key.pem open ↗
  • L1 Shor ECC certificate pem-ec-key
    -----BEGIN EC PRIVATE KEY-----
vectors/cryptography_vectors/asymmetric/PEM_Serialization/ec_private_key.pem open ↗
  • L1 Shor ECC certificate pem-ec-key
    -----BEGIN EC PRIVATE KEY-----
vectors/cryptography_vectors/asymmetric/PEM_Serialization/ec_private_key_encrypted.pem open ↗
  • L1 Shor ECC certificate pem-ec-key
    -----BEGIN EC PRIVATE KEY-----
vectors/cryptography_vectors/asymmetric/PEM_Serialization/ec_public_key_rsa_delimiter.pem open ↗
  • L1 Shor RSA certificate pem-rsa-key
    -----BEGIN RSA PUBLIC KEY-----
vectors/cryptography_vectors/asymmetric/PEM_Serialization/rsa-bad-1025-q-is-2.pem open ↗
  • L1 Shor RSA certificate pem-rsa-key
    -----BEGIN RSA PRIVATE KEY-----
vectors/cryptography_vectors/asymmetric/PEM_Serialization/rsa_private_key.pem open ↗
  • L1 Shor RSA certificate pem-rsa-key
    -----BEGIN RSA PRIVATE KEY-----
vectors/cryptography_vectors/asymmetric/PEM_Serialization/rsa_wrong_delimiter_public_key.pem open ↗
  • L1 Shor RSA certificate pem-rsa-key
    -----BEGIN RSA PUBLIC KEY-----
vectors/cryptography_vectors/asymmetric/PKCS8/wrong-pem-delimiter-rsa.pem open ↗
  • L1 Shor RSA certificate pem-rsa-key
    -----BEGIN RSA PRIVATE KEY-----
vectors/cryptography_vectors/asymmetric/Traditional_OpenSSL_Serialization/key1-malformed-dek-info.pem open ↗
  • L1 Shor RSA certificate pem-rsa-key
    -----BEGIN RSA PRIVATE KEY-----
vectors/cryptography_vectors/asymmetric/Traditional_OpenSSL_Serialization/key1-malformed-iv.pem open ↗
  • L1 Shor RSA certificate pem-rsa-key
    -----BEGIN RSA PRIVATE KEY-----
vectors/cryptography_vectors/asymmetric/Traditional_OpenSSL_Serialization/key1-no-dek-info.pem open ↗
  • L1 Shor RSA certificate pem-rsa-key
    -----BEGIN RSA PRIVATE KEY-----
vectors/cryptography_vectors/asymmetric/Traditional_OpenSSL_Serialization/key1-short-iv.pem open ↗
  • L1 Shor RSA certificate pem-rsa-key
    -----BEGIN RSA PRIVATE KEY-----
vectors/cryptography_vectors/asymmetric/Traditional_OpenSSL_Serialization/key1.pem open ↗
  • L1 Shor RSA certificate pem-rsa-key
    -----BEGIN RSA PRIVATE KEY-----
vectors/cryptography_vectors/asymmetric/Traditional_OpenSSL_Serialization/key2.pem open ↗
  • L1 Shor RSA certificate pem-rsa-key
    -----BEGIN RSA PRIVATE KEY-----
  • L3 Grover AES-128 (double to AES-256) aes-128-flag
    DEK-Info: AES-128-CBC,5334E33DCBCAB62637BB26E3CD983AC1
vectors/cryptography_vectors/asymmetric/Traditional_OpenSSL_Serialization/rsa-wrong-version.pem open ↗
  • L1 Shor RSA certificate pem-rsa-key
    -----BEGIN RSA PRIVATE KEY-----
vectors/cryptography_vectors/asymmetric/Traditional_OpenSSL_Serialization/testrsa-encrypted.pem open ↗
  • L1 Shor RSA certificate pem-rsa-key
    -----BEGIN RSA PRIVATE KEY-----
  • L3 Grover AES-128 (double to AES-256) aes-128-flag
    DEK-Info: AES-128-CBC,2371A6F3F6DEF67420EED171CA8434D6
vectors/cryptography_vectors/asymmetric/Traditional_OpenSSL_Serialization/testrsa.pem open ↗
  • L1 Shor RSA certificate pem-rsa-key
    -----BEGIN RSA PRIVATE KEY-----
vectors/cryptography_vectors/asymmetric/public/PKCS1/rsa.pub.pem open ↗
  • L1 Shor RSA certificate pem-rsa-key
    -----BEGIN RSA PUBLIC KEY-----
vectors/cryptography_vectors/x509/cryptography.io.with_headers.pem open ↗
  • L34 Shor RSA certificate pem-rsa-key
    -----BEGIN RSA PRIVATE KEY-----
docs/development/custom-vectors/cast5/generate_cast5.py open ↗
  • L62 Grover AES-128 (double to AES-256) aes-128-flag
    ctr_path = "tests/hazmat/primitives/vectors/ciphers/AES/CTR/aes-128-ctr.txt"
docs/development/custom-vectors/rsa-oaep-sha2/VerifyRSAOAEPSHA2.java open ↗
  • L152 Grover SHA-1 (broken, replace with SHA-256) sha1
    br.readLine(); // # # Derived from the NIST OAEP SHA1 vectors
  • L234 Grover SHA-1 (broken, replace with SHA-256) sha1
    SHA1, SHA224, SHA256, SHA384, SHA512
  • L264 Grover SHA-1 (broken, replace with SHA-256) sha1
    case SHA1:
  • L293 Grover SHA-1 (broken, replace with SHA-256) sha1
    case SHA1:
  • L294 Grover SHA-1 (broken, replace with SHA-256) sha1
    mgf1 = MGF1ParameterSpec.SHA1;
  • L322 Grover SHA-1 (broken, replace with SHA-256) sha1
    case SHA1:
  • L323 Grover SHA-1 (broken, replace with SHA-256) sha1
    oaep_spec = new OAEPParameterSpec("SHA1", "MGF1", mgf1_spec, PSource.PSpecified.DEFAULT);
docs/development/custom-vectors/secp256k1/generate_secp256k1.py open ↗
  • L13 Grover SHA-1 (broken, replace with SHA-256) sha1
    "SHA-1": hashlib.sha1,
src/cryptography/hazmat/_oid.py open ↗
  • L95 Grover SHA-1 (broken, replace with SHA-256) sha1
    # This is an alternate OID for RSA with SHA1 that is occasionally seen
  • L128 Grover MD5 (broken, replace with SHA-256) md5
    SignatureAlgorithmOID.RSA_WITH_MD5: hashes.MD5(),
  • L129 Grover SHA-1 (broken, replace with SHA-256) sha1
    SignatureAlgorithmOID.RSA_WITH_SHA1: hashes.SHA1(),
  • L130 Grover SHA-1 (broken, replace with SHA-256) sha1
    SignatureAlgorithmOID._RSA_WITH_SHA1: hashes.SHA1(),
  • L139 Grover SHA-1 (broken, replace with SHA-256) sha1
    SignatureAlgorithmOID.ECDSA_WITH_SHA1: hashes.SHA1(),
  • L148 Grover SHA-1 (broken, replace with SHA-256) sha1
    SignatureAlgorithmOID.DSA_WITH_SHA1: hashes.SHA1(),
  • L160 Grover SHA-1 (broken, replace with SHA-256) sha1
    SHA1 = ObjectIdentifier("1.3.14.3.2.26")
  • L269 Grover SHA-1 (broken, replace with SHA-256) sha1
    SignatureAlgorithmOID.ECDSA_WITH_SHA1: "ecdsa-with-SHA1",
  • L288 Grover SHA-1 (broken, replace with SHA-256) sha1
    HashAlgorithmOID.SHA1: "sha1",
src/cryptography/hazmat/primitives/_serialization.py open ↗
  • L23 Grover SHA-1 (broken, replace with SHA-256) sha1
    PBESv1SHA1And3KeyTripleDESCBC = "PBESv1 using SHA1 and 3-Key TripleDES"
src/cryptography/hazmat/primitives/ciphers/algorithms.py open ↗
  • L50 Grover AES-128 (double to AES-256) aes-128-flag
    class AES128(BlockCipherAlgorithm):
src/cryptography/hazmat/primitives/ciphers/modes.py open ↗
  • L69 Grover AES-128 (double to AES-256) aes-128-flag
    if isinstance(algorithm, (algorithms.AES128, algorithms.AES256)):
  • L71 Grover AES-128 (double to AES-256) aes-128-flag
    "The AES128 and AES256 classes do not support XTS, please use "
  • L77 Grover AES-128 (double to AES-256) aes-128-flag
    "The XTS specification requires a 256-bit key for AES-128-XTS"
src/cryptography/hazmat/primitives/hashes.py open ↗
  • L13 Grover MD5 (broken, replace with SHA-256) md5
    "MD5",
  • L14 Grover SHA-1 (broken, replace with SHA-256) sha1
    "SHA1",
  • L101 Grover SHA-1 (broken, replace with SHA-256) sha1
    class SHA1(HashAlgorithm):
  • L203 Grover MD5 (broken, replace with SHA-256) md5
    class MD5(HashAlgorithm):
src/cryptography/hazmat/primitives/serialization/ssh.py open ↗
  • L1009 Grover SHA-1 (broken, replace with SHA-256) sha1
    hash_alg = hashes.SHA1()
  • L1156 Grover MD5 (broken, replace with SHA-256) md5
    hash_algorithm: hashes.MD5 | hashes.SHA256,
  • L1158 Grover MD5 (broken, replace with SHA-256) md5
    if not isinstance(hash_algorithm, (hashes.MD5, hashes.SHA256)):
  • L1159 Grover MD5 (broken, replace with SHA-256) md5
    raise TypeError("hash_algorithm must be either MD5 or SHA256")
src/cryptography/hazmat/primitives/twofactor/hotp.py open ↗
  • L12 Grover SHA-1 (broken, replace with SHA-256) sha1
    from cryptography.hazmat.primitives.hashes import SHA1, SHA256, SHA512
  • L16 Grover SHA-1 (broken, replace with SHA-256) sha1
    HOTPHashTypes = typing.Union[SHA1, SHA256, SHA512]
  • L63 Grover SHA-1 (broken, replace with SHA-256) sha1
    if not isinstance(algorithm, (SHA1, SHA256, SHA512)):
  • L64 Grover SHA-1 (broken, replace with SHA-256) sha1
    raise TypeError("Algorithm must be SHA1, SHA256 or SHA512.")
src/cryptography/x509/ocsp.py open ↗
  • L34 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1,
  • L45 Grover SHA-1 (broken, replace with SHA-256) sha1
    "Algorithm must be SHA1, SHA224, SHA256, SHA384, or SHA512"
src/rust/cryptography-key-parsing/src/pem.rs open ↗
  • L15 Grover AES-128 (double to AES-256) aes-128-flag
    /// Supported ciphers: AES-128-CBC, AES-256-CBC, DES-EDE3-CBC
  • L39 Grover AES-128 (double to AES-256) aes-128-flag
    "AES-128-CBC" => openssl::symm::Cipher::aes_128_cbc(),
  • L39 Grover AES-128 (double to AES-256) aes-128-flag
    "AES-128-CBC" => openssl::symm::Cipher::aes_128_cbc(),
  • L94 Grover MD5 (broken, replace with SHA-256) md5
    // Derive key using MD5-based KDF (for compatibility with traditional
src/rust/cryptography-key-parsing/src/pkcs8.rs open ↗
  • L339 Grover AES-128 (double to AES-256) aes-128-flag
    (openssl::symm::Cipher::aes_128_cbc(), &iv[..])
src/rust/cryptography-x509-verification/src/policy/extension.rs open ↗
  • L552 Grover SHA-1 (broken, replace with SHA-256) sha1
    // but many root CAs still use RSA with SHA-1 (which is intentionally unsupported
src/rust/src/backend/aead.rs open ↗
  • L659 Grover AES-128 (double to AES-256) aes-128-flag
    16 => openssl::cipher::Cipher::aes_128_gcm(),
  • L869 Grover AES-128 (double to AES-256) aes-128-flag
    16 => openssl::cipher::Cipher::aes_128_ccm(),
  • L1458 Grover AES-128 (double to AES-256) aes-128-flag
    16 => "aes-128-gcm-siv",
src/rust/src/backend/cipher_registry.rs open ↗
  • L123 Grover AES-128 (double to AES-256) aes-128-flag
    let aes128 = types::AES128.get(py)?;
  • L160 Grover AES-128 (double to AES-256) aes-128-flag
    m.add(&aes, &cbc, Some(128), Cipher::aes_128_cbc())?;
  • L168 Grover AES-128 (double to AES-256) aes-128-flag
    m.add(&aes, &gcm, Some(128), Cipher::aes_128_gcm())?;
  • L172 Grover AES-128 (double to AES-256) aes-128-flag
    m.add(&aes, &ctr, Some(128), Cipher::aes_128_ctr())?;
  • L201 Grover AES-128 (double to AES-256) aes-128-flag
    m.add(&aes128, &cbc, Some(128), Cipher::aes_128_cbc())?;
  • L207 Grover AES-128 (double to AES-256) aes-128-flag
    m.add(&aes128, &gcm, Some(128), Cipher::aes_128_gcm())?;
  • L210 Grover AES-128 (double to AES-256) aes-128-flag
    m.add(&aes128, &ctr, Some(128), Cipher::aes_128_ctr())?;
src/rust/src/pkcs12.rs open ↗
  • L463 Grover SHA-1 (broken, replace with SHA-256) sha1
    key_id = Some(cert.fingerprint(py, &types::SHA1.get(py)?.call0()?)?);
src/rust/src/pkcs7.rs open ↗
  • L154 Grover AES-128 (double to AES-256) aes-128-flag
    let algorithm_parameters = if content_encryption_algorithm_type.eq(types::AES128.get(py)?)? {
  • L294 Grover AES-128 (double to AES-256) aes-128-flag
    // The function can decrypt content encrypted with AES-128-CBC, which the S/MIME v3.2
  • L303 Grover AES-128 (double to AES-256) aes-128-flag
    types::AES128.get(py)?.call1((key,))?,
src/rust/src/types.rs open ↗
  • L307 Grover SHA-1 (broken, replace with SHA-256) sha1
    pub static SHA1: LazyPyImport =
  • L308 Grover SHA-1 (broken, replace with SHA-256) sha1
    LazyPyImport::new("cryptography.hazmat.primitives.hashes", &["SHA1"]);
  • L489 Grover AES-128 (double to AES-256) aes-128-flag
    pub static AES128: LazyPyImport = LazyPyImport::new(
  • L491 Grover AES-128 (double to AES-256) aes-128-flag
    &["AES128"],
src/rust/src/x509/ocsp.rs open ↗
  • L20 Grover SHA-1 (broken, replace with SHA-256) sha1
    h.insert(common::AlgorithmParameters::Sha1(None), "SHA1");
  • L21 Grover SHA-1 (broken, replace with SHA-256) sha1
    h.insert(common::AlgorithmParameters::Sha1(Some(())), "SHA1");
src/rust/src/x509/ocsp_resp.rs open ↗
  • L785 Grover SHA-1 (broken, replace with SHA-256) sha1
    let sha1 = types::SHA1.get(py)?.call0()?;
src/rust/src/x509/sct.rs open ↗
  • L86 Grover MD5 (broken, replace with SHA-256) md5
    HashAlgorithm::Md5 => "MD5",
  • L87 Grover SHA-1 (broken, replace with SHA-256) sha1
    HashAlgorithm::Sha1 => "SHA1",
  • L287 Grover MD5 (broken, replace with SHA-256) md5
    (HashAlgorithm::Md5, "MD5"),
  • L288 Grover SHA-1 (broken, replace with SHA-256) sha1
    (HashAlgorithm::Sha1, "SHA1"),
src/rust/src/x509/sign.rs open ↗
  • L20 Grover SHA-1 (broken, replace with SHA-256) sha1
    h.insert(&oid::SHA1_OID, "SHA1");
tests/hazmat/backends/test_openssl.py open ↗
  • L33 Grover SHA-1 (broken, replace with SHA-256) sha1
    _algorithm = hashes.SHA1()
  • L154 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L162 Grover SHA-1 (broken, replace with SHA-256) sha1
    isinstance(mgf1alg, hashes.SHA1)
  • L163 Grover SHA-1 (broken, replace with SHA-256) sha1
    or isinstance(oaepalg, hashes.SHA1)
  • L183 Grover SHA-1 (broken, replace with SHA-256) sha1
    algorithm=hashes.SHA1(),
  • L202 Grover MD5 (broken, replace with SHA-256) md5
    mgf=padding.MGF1(algorithm=hashes.MD5()),
  • L203 Grover MD5 (broken, replace with SHA-256) md5
    algorithm=hashes.MD5(),
tests/hazmat/primitives/test_aes.py open ↗
  • L89 Grover AES-128 (double to AES-256) aes-128-flag
    base.Cipher(algorithms.AES128(b"0" * 16), modes.XTS(b"\x00" * 16))
  • L265 Grover AES-128 (double to AES-256) aes-128-flag
    ["aes-128-ctr.txt", "aes-192-ctr.txt", "aes-256-ctr.txt"],
  • L308 Grover AES-128 (double to AES-256) aes-128-flag
    @pytest.mark.parametrize("alg_cls", [algorithms.AES128, algorithms.AES256])
tests/hazmat/primitives/test_aes_gcm.py open ↗
  • L223 Grover AES-128 (double to AES-256) aes-128-flag
    @pytest.mark.parametrize("alg", [algorithms.AES128, algorithms.AES256])
tests/hazmat/primitives/test_hash_vectors.py open ↗
  • L18 Grover SHA-1 (broken, replace with SHA-256) sha1
    only_if=lambda backend: backend.hash_supported(hashes.SHA1()),
  • L19 Grover SHA-1 (broken, replace with SHA-256) sha1
    skip_message="Does not support SHA1",
  • L24 Grover SHA-1 (broken, replace with SHA-256) sha1
    os.path.join("hashes", "SHA1"),
  • L26 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L109 Grover MD5 (broken, replace with SHA-256) md5
    only_if=lambda backend: backend.hash_supported(hashes.MD5()),
  • L110 Grover MD5 (broken, replace with SHA-256) md5
    skip_message="Does not support MD5",
  • L115 Grover MD5 (broken, replace with SHA-256) md5
    os.path.join("hashes", "MD5"),
  • L117 Grover MD5 (broken, replace with SHA-256) md5
    hashes.MD5(),
tests/hazmat/primitives/test_hashes.py open ↗
  • L21 Grover SHA-1 (broken, replace with SHA-256) sha1
    m = hashes.Hash(hashes.SHA1(), backend=backend)
  • L27 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.Hash(hashes.SHA1, backend=backend)  # type: ignore[arg-type]
  • L30 Grover SHA-1 (broken, replace with SHA-256) sha1
    h = hashes.Hash(hashes.SHA1(), backend=backend)
  • L48 Grover SHA-1 (broken, replace with SHA-256) sha1
    only_if=lambda backend: backend.hash_supported(hashes.SHA1()),
  • L49 Grover SHA-1 (broken, replace with SHA-256) sha1
    skip_message="Does not support SHA1",
  • L53 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L103 Grover MD5 (broken, replace with SHA-256) md5
    only_if=lambda backend: backend.hash_supported(hashes.MD5()),
  • L104 Grover MD5 (broken, replace with SHA-256) md5
    skip_message="Does not support MD5",
  • L108 Grover MD5 (broken, replace with SHA-256) md5
    hashes.MD5(),
  • L184 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.Hash.hash(hashes.SHA1, b"data")  # type: ignore[arg-type]
tests/hazmat/primitives/test_hkdf_vectors.py open ↗
  • L17 Grover SHA-1 (broken, replace with SHA-256) sha1
    only_if=lambda backend: backend.hmac_supported(hashes.SHA1()),
  • L18 Grover SHA-1 (broken, replace with SHA-256) sha1
    skip_message="Does not support SHA1.",
  • L24 Grover SHA-1 (broken, replace with SHA-256) sha1
    ["rfc-5869-HKDF-SHA1.txt"],
  • L25 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
tests/hazmat/primitives/test_hmac.py open ↗
  • L23 Grover MD5 (broken, replace with SHA-256) md5
    only_if=lambda backend: backend.hmac_supported(hashes.MD5()),
  • L24 Grover MD5 (broken, replace with SHA-256) md5
    skip_message="Does not support MD5",
  • L28 Grover MD5 (broken, replace with SHA-256) md5
    hashes.MD5(),
  • L34 Grover SHA-1 (broken, replace with SHA-256) sha1
    h = hmac.HMAC(b"mykey", hashes.SHA1(), backend=backend)
  • L42 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1,  # type: ignore[arg-type]
  • L47 Grover SHA-1 (broken, replace with SHA-256) sha1
    h = hmac.HMAC(b"key", hashes.SHA1(), backend=backend)
  • L60 Grover SHA-1 (broken, replace with SHA-256) sha1
    h = hmac.HMAC(b"", hashes.SHA1(), backend=backend)
  • L63 Grover SHA-1 (broken, replace with SHA-256) sha1
    h = hmac.HMAC(b"", hashes.SHA1(), backend=backend)
  • L70 Grover SHA-1 (broken, replace with SHA-256) sha1
    h = hmac.HMAC(b"", hashes.SHA1(), backend=backend)
  • L78 Grover SHA-1 (broken, replace with SHA-256) sha1
    h = hmac.HMAC(b"", hashes.SHA1(), backend=backend)
tests/hazmat/primitives/test_hmac_vectors.py open ↗
  • L17 Grover MD5 (broken, replace with SHA-256) md5
    only_if=lambda backend: backend.hmac_supported(hashes.MD5()),
  • L18 Grover MD5 (broken, replace with SHA-256) md5
    skip_message="Does not support MD5",
  • L25 Grover MD5 (broken, replace with SHA-256) md5
    hashes.MD5(),
  • L30 Grover SHA-1 (broken, replace with SHA-256) sha1
    only_if=lambda backend: backend.hmac_supported(hashes.SHA1()),
  • L31 Grover SHA-1 (broken, replace with SHA-256) sha1
    skip_message="Does not support SHA1",
  • L38 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
tests/hazmat/primitives/test_kbkdf.py open ↗
  • L188 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L218 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L248 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L263 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
tests/hazmat/primitives/test_pbkdf2hmac.py open ↗
  • L18 Grover SHA-1 (broken, replace with SHA-256) sha1
    kdf = PBKDF2HMAC(hashes.SHA1(), 20, b"salt", 10, backend)
  • L23 Grover SHA-1 (broken, replace with SHA-256) sha1
    kdf = PBKDF2HMAC(hashes.SHA1(), 20, b"salt", 10, backend)
  • L28 Grover SHA-1 (broken, replace with SHA-256) sha1
    kdf = PBKDF2HMAC(hashes.SHA1(), 20, b"salt", 10, backend)
  • L38 Grover SHA-1 (broken, replace with SHA-256) sha1
    kdf = PBKDF2HMAC(hashes.SHA1(), 20, b"salt", 10, backend)
  • L41 Grover SHA-1 (broken, replace with SHA-256) sha1
    kdf = PBKDF2HMAC(hashes.SHA1(), 20, b"salt", 10, backend)
  • L48 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
  • L56 Grover SHA-1 (broken, replace with SHA-256) sha1
    kdf = PBKDF2HMAC(hashes.SHA1(), 20, b"salt", 10, backend)
  • L61 Grover SHA-1 (broken, replace with SHA-256) sha1
    kdf = PBKDF2HMAC(hashes.SHA1(), 10, b"salt", 10, backend)
  • L66 Grover SHA-1 (broken, replace with SHA-256) sha1
    kdf = PBKDF2HMAC(hashes.SHA1(), 20, b"salt", 10, backend)
  • L71 Grover SHA-1 (broken, replace with SHA-256) sha1
    kdf2 = PBKDF2HMAC(hashes.SHA1(), 20, b"salt", 10, backend)
  • L77 Grover SHA-1 (broken, replace with SHA-256) sha1
    kdf = PBKDF2HMAC(hashes.SHA1(), outlen, b"salt", 10, backend)
  • L83 Grover SHA-1 (broken, replace with SHA-256) sha1
    kdf = PBKDF2HMAC(hashes.SHA1(), 20, b"salt", 10, backend)
  • L91 Grover SHA-1 (broken, replace with SHA-256) sha1
    PBKDF2HMAC(hashes.SHA1(), 20, b"salt", 0, backend)
tests/hazmat/primitives/test_pbkdf2hmac_vectors.py open ↗
  • L17 Grover SHA-1 (broken, replace with SHA-256) sha1
    only_if=lambda backend: backend.pbkdf2_hmac_supported(hashes.SHA1()),
  • L18 Grover SHA-1 (broken, replace with SHA-256) sha1
    skip_message="Does not support SHA1 for PBKDF2HMAC",
  • L22 Grover SHA-1 (broken, replace with SHA-256) sha1
    os.path.join("KDF", "rfc-6070-PBKDF2-SHA1.txt"),
  • L31 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1(),
tests/hazmat/primitives/test_pkcs12.py open ↗
  • L632 Grover SHA-1 (broken, replace with SHA-256) sha1
    (hashes.SHA1(), b"\x06\x05\x2b\x0e\x03\x02\x1a"),
  • L737 Grover SHA-1 (broken, replace with SHA-256) sha1
    assert p12.count(cert.fingerprint(hashes.SHA1())) == count
  • L832 Grover SHA-1 (broken, replace with SHA-256) sha1
    (hashes.SHA1(), b"\x06\x05\x2b\x0e\x03\x02\x1a"),
tests/hazmat/primitives/test_x963_vectors.py open ↗
  • L30 Grover SHA-1 (broken, replace with SHA-256) sha1
    "SHA-1": hashes.SHA1,
  • L30 Grover SHA-1 (broken, replace with SHA-256) sha1
    "SHA-1": hashes.SHA1,
tests/hazmat/primitives/twofactor/test_hotp.py open ↗
  • L11 Grover MD5 (broken, replace with SHA-256) md5
    from cryptography.hazmat.primitives.hashes import MD5, SHA1
  • L11 Grover SHA-1 (broken, replace with SHA-256) sha1
    from cryptography.hazmat.primitives.hashes import MD5, SHA1
  • L21 Grover SHA-1 (broken, replace with SHA-256) sha1
    only_if=lambda backend: backend.hmac_supported(hashes.SHA1()),
  • L22 Grover SHA-1 (broken, replace with SHA-256) sha1
    skip_message="Does not support HMAC-SHA1.",
  • L29 Grover SHA-1 (broken, replace with SHA-256) sha1
    HOTP(secret, 6, SHA1(), backend)
  • L33 Grover SHA-1 (broken, replace with SHA-256) sha1
    HOTP(secret, 6, SHA1(), backend, enforce_key_length=False)
  • L39 Grover SHA-1 (broken, replace with SHA-256) sha1
    HOTP(secret, 4, SHA1(), backend)
  • L45 Grover MD5 (broken, replace with SHA-256) md5
    HOTP(secret, 6, MD5(), backend)  # type: ignore[arg-type]
  • L53 Grover SHA-1 (broken, replace with SHA-256) sha1
    hotp = HOTP(secret, 6, SHA1(), backend)
  • L63 Grover SHA-1 (broken, replace with SHA-256) sha1
    hotp = HOTP(secret, 6, SHA1(), backend)
  • L73 Grover SHA-1 (broken, replace with SHA-256) sha1
    hotp = HOTP(secret, 6, SHA1(), backend)
  • L80 Grover SHA-1 (broken, replace with SHA-256) sha1
    hotp = HOTP(secret, 6, SHA1(), backend)
  • L89 Grover SHA-1 (broken, replace with SHA-256) sha1
    HOTP(secret, b"foo", SHA1(), backend)  # type: ignore[arg-type]
  • L93 Grover SHA-1 (broken, replace with SHA-256) sha1
    hotp = HOTP(secret, 6, SHA1(), backend)
  • L97 Grover SHA-1 (broken, replace with SHA-256) sha1
    "GY3TQOJQGEZDGNBVGY3TQOJQ&algorithm=SHA1&counter=1"
  • L102 Grover SHA-1 (broken, replace with SHA-256) sha1
    "GNBVGY3TQOJQGEZDGNBVGY3TQOJQ&algorithm=SHA1&issuer=Foo"
  • L108 Grover SHA-1 (broken, replace with SHA-256) sha1
    hotp = HOTP(key, 6, SHA1(), backend)
  • L113 Grover SHA-1 (broken, replace with SHA-256) sha1
    hotp = HOTP(key, 6, SHA1(), backend)
tests/hazmat/primitives/twofactor/test_totp.py open ↗
  • L19 Grover SHA-1 (broken, replace with SHA-256) sha1
    only_if=lambda backend: backend.hmac_supported(hashes.SHA1()),
  • L20 Grover SHA-1 (broken, replace with SHA-256) sha1
    skip_message="Does not support HMAC-SHA1.",
  • L23 Grover SHA-1 (broken, replace with SHA-256) sha1
    "params", [i for i in vectors if i["mode"] == b"SHA1"]
  • L30 Grover SHA-1 (broken, replace with SHA-256) sha1
    totp = TOTP(secret, 8, hashes.SHA1(), 30, backend)
  • L64 Grover SHA-1 (broken, replace with SHA-256) sha1
    only_if=lambda backend: backend.hmac_supported(hashes.SHA1()),
  • L65 Grover SHA-1 (broken, replace with SHA-256) sha1
    skip_message="Does not support HMAC-SHA1.",
  • L68 Grover SHA-1 (broken, replace with SHA-256) sha1
    "params", [i for i in vectors if i["mode"] == b"SHA1"]
  • L75 Grover SHA-1 (broken, replace with SHA-256) sha1
    totp = TOTP(secret, 8, hashes.SHA1(), 30, backend)
  • L112 Grover SHA-1 (broken, replace with SHA-256) sha1
    totp = TOTP(secret, 8, hashes.SHA1(), 30, backend)
  • L121 Grover SHA-1 (broken, replace with SHA-256) sha1
    totp = TOTP(secret, 8, hashes.SHA1(), 30, backend)
  • L127 Grover SHA-1 (broken, replace with SHA-256) sha1
    totp = TOTP(secret, 6, hashes.SHA1(), 30, backend=backend)
  • L131 Grover SHA-1 (broken, replace with SHA-256) sha1
    "Y3TQOJQGEZDGNBVGY3TQOJQ&algorithm=SHA1&period=30"
  • L136 Grover SHA-1 (broken, replace with SHA-256) sha1
    "DGNBVGY3TQOJQGEZDGNBVGY3TQOJQ&algorithm=SHA1&issuer=World"
  • L148 Grover SHA-1 (broken, replace with SHA-256) sha1
    totp = TOTP(key, 8, hashes.SHA1(), 30, backend)
tests/test_utils.py open ↗
  • L1346 Grover SHA-1 (broken, replace with SHA-256) sha1
    MODE = SHA1
  • L1367 Grover SHA-1 (broken, replace with SHA-256) sha1
    "mode": b"SHA1",
  • L1391 Grover SHA-1 (broken, replace with SHA-256) sha1
    # SHA Algorithm selected:SHA1 SHA224 SHA256 SHA384 SHA512
  • L1399 Grover SHA-1 (broken, replace with SHA-256) sha1
    SHAAlg = SHA1
  • L1428 Grover SHA-1 (broken, replace with SHA-256) sha1
    "algorithm": "SHA1",
  • L1469 Grover SHA-1 (broken, replace with SHA-256) sha1
    # SHA Algorithm selected:SHA1 SHA224 SHA256 SHA384 SHA512
  • L1479 Grover SHA-1 (broken, replace with SHA-256) sha1
    SHAAlg = SHA1
  • L1487 Grover SHA-1 (broken, replace with SHA-256) sha1
    SHAAlg = SHA1
  • L1516 Grover SHA-1 (broken, replace with SHA-256) sha1
    "algorithm": "SHA1",
  • L1546 Grover SHA-1 (broken, replace with SHA-256) sha1
    "algorithm": "SHA1",
  • L1564 Grover SHA-1 (broken, replace with SHA-256) sha1
    # SHA Algorithm selected:SHA1 SHA224 SHA256 SHA384 SHA512
  • L1575 Grover SHA-1 (broken, replace with SHA-256) sha1
    SHAAlg = SHA1
  • L1600 Grover SHA-1 (broken, replace with SHA-256) sha1
    "algorithm": "SHA1",
  • L2040 Grover SHA-1 (broken, replace with SHA-256) sha1
    # Mod sizes selected: SHA-1 L=1024, N=160,SHA-384 L=2048, N=256
  • L2043 Grover SHA-1 (broken, replace with SHA-256) sha1
    [mod = L=1024, N=160, SHA-1]
  • L2156 Grover SHA-1 (broken, replace with SHA-256) sha1
    "digest_algorithm": "SHA-1",
  • L2195 Grover SHA-1 (broken, replace with SHA-256) sha1
    "digest_algorithm": "SHA-1",
  • L2366 Grover SHA-1 (broken, replace with SHA-256) sha1
    # Mod sizes selected: SHA-1 L=1024, N=160, SHA-256 L=2048, N=256
  • L2368 Grover SHA-1 (broken, replace with SHA-256) sha1
    [mod = L=1024, N=160, SHA-1]
  • L2469 Grover SHA-1 (broken, replace with SHA-256) sha1
    "digest_algorithm": "SHA-1",
  • L2506 Grover SHA-1 (broken, replace with SHA-256) sha1
    "digest_algorithm": "SHA-1",
  • L2813 Grover SHA-1 (broken, replace with SHA-256) sha1
    [P-192,SHA-1]
  • L2880 Grover SHA-1 (broken, replace with SHA-256) sha1
    "digest_algorithm": "SHA-1",
  • L2897 Grover SHA-1 (broken, replace with SHA-256) sha1
    "digest_algorithm": "SHA-1",
  • L3006 Grover SHA-1 (broken, replace with SHA-256) sha1
    [FA - SHA1]
  • L3509 Grover SHA-1 (broken, replace with SHA-256) sha1
    [SHA(s) supported (Used for hashing Z):  SHA1]
  • L3530 Grover SHA-1 (broken, replace with SHA-256) sha1
    [EA - SHA1]
  • L4026 Grover SHA-1 (broken, replace with SHA-256) sha1
    [SHA-1]
  • L4077 Grover SHA-1 (broken, replace with SHA-256) sha1
    "hash": "SHA-1",
  • L4086 Grover SHA-1 (broken, replace with SHA-256) sha1
    "hash": "SHA-1",
  • L4125 Grover AES-128 (double to AES-256) aes-128-flag
    # PRFs tested: CMAC with key sizes:	AES128  AES192  AES256  TDES2  TDES3\
  • L4126 Grover SHA-1 (broken, replace with SHA-256) sha1
    HMAC with key sizes:	SHA1  SHA224  SHA256  SHA384  SHA512
tests/wycheproof/test_hkdf.py open ↗
  • L15 Grover SHA-1 (broken, replace with SHA-256) sha1
    "HKDF-SHA-1": hashes.SHA1(),
  • L15 Grover SHA-1 (broken, replace with SHA-256) sha1
    "HKDF-SHA-1": hashes.SHA1(),
tests/wycheproof/test_hmac.py open ↗
  • L15 Grover SHA-1 (broken, replace with SHA-256) sha1
    "HMACSHA1": hashes.SHA1(),
tests/wycheproof/test_pbkdf2.py open ↗
  • L13 Grover SHA-1 (broken, replace with SHA-256) sha1
    "PBKDF2-HMACSHA1": hashes.SHA1(),
tests/x509/test_x509.py open ↗
  • L187 Grover SHA-1 (broken, replace with SHA-256) sha1
    fingerprint = binascii.hexlify(crl.fingerprint(hashes.SHA1()))
  • L202 Grover SHA-1 (broken, replace with SHA-256) sha1
    fingerprint = binascii.hexlify(crl.fingerprint(hashes.SHA1()))
  • L908 Grover SHA-1 (broken, replace with SHA-256) sha1
    assert isinstance(pss._mgf._algorithm, hashes.SHA1)
  • L910 Grover SHA-1 (broken, replace with SHA-256) sha1
    assert isinstance(cert.signature_hash_algorithm, hashes.SHA1)
  • L949 Grover SHA-1 (broken, replace with SHA-256) sha1
    fingerprint = binascii.hexlify(cert.fingerprint(hashes.SHA1()))
  • L951 Grover SHA-1 (broken, replace with SHA-256) sha1
    assert isinstance(cert.signature_hash_algorithm, hashes.SHA1)
  • L1057 Grover SHA-1 (broken, replace with SHA-256) sha1
    assert isinstance(cert.signature_hash_algorithm, hashes.SHA1)
  • L1088 Grover SHA-1 (broken, replace with SHA-256) sha1
    fingerprint = binascii.hexlify(cert.fingerprint(hashes.SHA1()))
  • L1114 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1()
  • L1116 Grover SHA-1 (broken, replace with SHA-256) sha1
    skip_message="Does not support SHA-1 signature.",
  • L1410 Grover SHA-1 (broken, replace with SHA-256) sha1
    fingerprint = binascii.hexlify(cert.fingerprint(hashes.SHA1()))
  • L1638 Grover SHA-1 (broken, replace with SHA-256) sha1
    fingerprint = binascii.hexlify(cert.fingerprint(hashes.SHA1()))
  • L1665 Grover SHA-1 (broken, replace with SHA-256) sha1
    fingerprint = binascii.hexlify(cert.fingerprint(hashes.SHA1()))
  • L2029 Grover SHA-1 (broken, replace with SHA-256) sha1
    assert isinstance(request.signature_hash_algorithm, hashes.SHA1)
  • L2187 Grover SHA-1 (broken, replace with SHA-256) sha1
    assert isinstance(request.signature_hash_algorithm, hashes.SHA1)
  • L2215 Grover SHA-1 (broken, replace with SHA-256) sha1
    assert isinstance(request.signature_hash_algorithm, hashes.SHA1)
  • L2246 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1()
  • L2248 Grover SHA-1 (broken, replace with SHA-256) sha1
    skip_message="Does not support SHA-1 signature.",
  • L3408 Grover MD5 (broken, replace with SHA-256) md5
    only_if=lambda backend: backend.hash_supported(hashes.MD5()),
  • L3409 Grover MD5 (broken, replace with SHA-256) md5
    skip_message="Requires OpenSSL with MD5 support",
  • L3418 Grover MD5 (broken, replace with SHA-256) md5
    hashes.MD5(),
  • L3444 Grover MD5 (broken, replace with SHA-256) md5
    only_if=lambda backend: backend.hash_supported(hashes.MD5()),
  • L3445 Grover MD5 (broken, replace with SHA-256) md5
    skip_message="Requires OpenSSL with MD5 support",
  • L3466 Grover MD5 (broken, replace with SHA-256) md5
    hashes.MD5(),  # type: ignore[arg-type]
  • L5491 Grover SHA-1 (broken, replace with SHA-256) sha1
    hashes.SHA1()
  • L5493 Grover SHA-1 (broken, replace with SHA-256) sha1
    skip_message="Does not support SHA-1 signature.",
  • L5500 Grover SHA-1 (broken, replace with SHA-256) sha1
    assert isinstance(cert.signature_hash_algorithm, hashes.SHA1)
  • L5655 Grover SHA-1 (broken, replace with SHA-256) sha1
    only_if=lambda backend: backend.signature_hash_supported(hashes.SHA1()),
  • L5656 Grover SHA-1 (broken, replace with SHA-256) sha1
    skip_message="Does not support SHA-1 signature.",
  • L5674 Grover SHA-1 (broken, replace with SHA-256) sha1
    assert isinstance(request.signature_hash_algorithm, hashes.SHA1)
tests/x509/test_x509_crlbuilder.py open ↗
  • L837 Grover MD5 (broken, replace with SHA-256) md5
    hashes.MD5(),  # type: ignore[arg-type]
  • L864 Grover MD5 (broken, replace with SHA-256) md5
    hashes.MD5(),  # type: ignore[arg-type]