My Project
Loading...
Searching...
No Matches
wolfcrypt.ciphers.RsaPrivate Class Reference
Inheritance diagram for wolfcrypt.ciphers.RsaPrivate:
wolfcrypt.ciphers.RsaPublic wolfcrypt.ciphers._Rsa

Public Member Functions

 __init__ (self, key)
 
 decrypt (self, ciphertext)
 
 sign (self, plaintext)
 
- Public Member Functions inherited from wolfcrypt.ciphers.RsaPublic
 encrypt (self, plaintext)
 
 verify (self, signature)
 
- Public Member Functions inherited from wolfcrypt.ciphers._Rsa
 __del__ (self)
 

Data Fields

 output_size = _lib.wc_RsaEncryptSize(self.native_object)
 
- Data Fields inherited from wolfcrypt.ciphers.RsaPublic
 output_size = _lib.wc_RsaEncryptSize(self.native_object)
 
- Data Fields inherited from wolfcrypt.ciphers._Rsa
 native_object = _ffi.new("RsaKey *")
 

Additional Inherited Members

- Static Public Attributes inherited from wolfcrypt.ciphers._Rsa
int RSA_MIN_PAD_SIZE = 11
 
- Protected Attributes inherited from wolfcrypt.ciphers._Rsa
 _random = Random()
 

Constructor & Destructor Documentation

◆ __init__()

wolfcrypt.ciphers.RsaPrivate.__init__ ( self,
key )

Reimplemented from wolfcrypt.ciphers.RsaPublic.

Member Function Documentation

◆ decrypt()

wolfcrypt.ciphers.RsaPrivate.decrypt ( self,
ciphertext )
Decrypts **ciphertext**, using the private key data in the
object. The ciphertext's length must be equal to:

    **self.output_size**

Returns a string containing the plaintext.

◆ sign()

wolfcrypt.ciphers.RsaPrivate.sign ( self,
plaintext )
Signs **plaintext**, using the private key data in the object.
The plaintext's length must not be greater than:

    **self.output_size - self.RSA_MIN_PAD_SIZE**

Returns a string containing the signature.