Back to module index

Go to module by name

cryptography.hazmat.backends.openssl

cryptography.hazmat.backends

cryptography.hazmat

cryptography

cryptography.hazmat.backends.openssl.rsa

This module has no docstring.

Classes

AsymmetricPadding

name = <abc.abstractproperty object at 0x7f92bf0d0d00>

          A string naming this padding (e.g. "PSS", "PKCS1").
        

AsymmetricSignatureContext

finalize(self) -> bytes


          Returns the signature as bytes.
        
update(self, data: bytes) -> None


          Processes the provided bytes and returns nothing.
        

AsymmetricVerificationContext

update(self, data: bytes) -> None


          Processes the provided bytes and returns nothing.
        
verify(self) -> None


          Raises an exception if the bytes provided to update do not match the
          signature or the signature does not match the public key.
        

InvalidSignature

with_traceback(...)

  Exception.with_traceback(tb) --
      set self.__traceback__ to tb and return self.
args = <attribute 'args' of 'BaseException' objects>

MGF1

MAX_LENGTH = <object object at 0x7f92bedf8390>

OAEP

name = 'EME-OAEP'

PKCS1v15

name = 'EMSA-PKCS1-v1_5'

PSS

MAX_LENGTH = <object object at 0x7f92bedf82c0>
name = 'EMSA-PSS'

RSAPrivateKey

decrypt(self, ciphertext: bytes, padding: cryptography.hazmat.primitives._asymmetric.AsymmetricPadding) -> bytes


          Decrypts the provided ciphertext.
        
private_bytes(self, encoding: cryptography.hazmat.primitives._serialization.Encoding, format: cryptography.hazmat.primitives._serialization.PrivateFormat, encryption_algorithm: cryptography.hazmat.primitives._serialization.KeySerializationEncryption) -> bytes


          Returns the key serialized as bytes.
        
private_numbers(self) -> 'RSAPrivateNumbers'


          Returns an RSAPrivateNumbers.
        
public_key(self) -> 'RSAPublicKey'


          The RSAPublicKey associated with this private key.
        
sign(self, data: bytes, padding: cryptography.hazmat.primitives._asymmetric.AsymmetricPadding, algorithm: Union[cryptography.hazmat.primitives.asymmetric.utils.Prehashed, cryptography.hazmat.primitives.hashes.HashAlgorithm]) -> bytes


          Signs the data.
        
signer(self, padding: cryptography.hazmat.primitives._asymmetric.AsymmetricPadding, algorithm: cryptography.hazmat.primitives.hashes.HashAlgorithm) -> cryptography.hazmat.primitives.asymmetric.AsymmetricSignatureContext


          Returns an AsymmetricSignatureContext used for signing data.
        
key_size = <abc.abstractproperty object at 0x7f92bf0d0d60>

          The bit length of the public modulus.
        

RSAPrivateNumbers

private_key(self, backend: Any = None) -> cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey
d = <property object at 0x7f92bf0e38b0>
dmp1 = <property object at 0x7f92bf0e3900>
dmq1 = <property object at 0x7f92bf0e3950>
iqmp = <property object at 0x7f92bf0e39a0>
p = <property object at 0x7f92bf0e3630>
public_numbers = <property object at 0x7f92bf0e39f0>
q = <property object at 0x7f92bf0e3720>

RSAPublicKey

encrypt(self, plaintext: bytes, padding: cryptography.hazmat.primitives._asymmetric.AsymmetricPadding) -> bytes


          Encrypts the given plaintext.
        
public_bytes(self, encoding: cryptography.hazmat.primitives._serialization.Encoding, format: cryptography.hazmat.primitives._serialization.PublicFormat) -> bytes


          Returns the key serialized as bytes.
        
public_numbers(self) -> 'RSAPublicNumbers'


          Returns an RSAPublicNumbers
        
recover_data_from_signature(self, signature: bytes, padding: cryptography.hazmat.primitives._asymmetric.AsymmetricPadding, algorithm: Optional[cryptography.hazmat.primitives.hashes.HashAlgorithm]) -> bytes


          Recovers the original data from the signature.
        
verifier(self, signature: bytes, padding: cryptography.hazmat.primitives._asymmetric.AsymmetricPadding, algorithm: cryptography.hazmat.primitives.hashes.HashAlgorithm) -> cryptography.hazmat.primitives.asymmetric.AsymmetricVerificationContext


          Returns an AsymmetricVerificationContext used for verifying signatures.
        
verify(self, signature: bytes, data: bytes, padding: cryptography.hazmat.primitives._asymmetric.AsymmetricPadding, algorithm: Union[cryptography.hazmat.primitives.asymmetric.utils.Prehashed, cryptography.hazmat.primitives.hashes.HashAlgorithm]) -> None


          Verifies the signature of the data.
        
key_size = <abc.abstractproperty object at 0x7f92bf0d0dc0>

          The bit length of the public modulus.
        

RSAPublicNumbers

public_key(self, backend: Any = None) -> cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicKey
e = <property object at 0x7f92bf0e3a90>
n = <property object at 0x7f92bf0e3ae0>

UnsupportedAlgorithm

with_traceback(...)

  Exception.with_traceback(tb) --
      set self.__traceback__ to tb and return self.
args = <attribute 'args' of 'BaseException' objects>

Functions

calculate_max_pss_salt_length

calculate_max_pss_salt_length(key: Union[ForwardRef('rsa.RSAPrivateKey'), ForwardRef('rsa.RSAPublicKey')], hash_algorithm: cryptography.hazmat.primitives.hashes.HashAlgorithm) -> int

Modules

asym_utils

hashes

serialization

typing

utils