CodeQL library for Python
codeql/python-all 2.0.1-dev (changelog, source)
Search

Module Cryptography

Provides models for cryptographic concepts.

Note: The CryptographicAlgorithm class currently doesn’t take weak keys into consideration for the isWeak member predicate. So RSA is always considered secure, although using a low number of bits will actually make it insecure. We plan to improve our libraries in the future to more precisely capture this aspect.

Import path

import semmle.python.internal.ConceptsShared

Classes

BlockMode

A cryptographic block cipher mode of operation. This can be used to encrypt data of arbitrary length using a block encryption algorithm.

CryptographicOperation

A data-flow node that is an application of a cryptographic algorithm. For example, encryption, decryption, signature-validation.

Modules

CryptographicOperation

Provides classes for modeling new applications of a cryptographic algorithms.

Aliases

CryptographicAlgorithm

A cryptographic algorithm.

EncryptionAlgorithm

An encryption algorithm such as DES or AES512.

HashingAlgorithm

A hashing algorithm such as MD5 or SHA512.

PasswordHashingAlgorithm

A password hashing algorithm such as PBKDF2 or SCRYPT.