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
 __init__ (self, key)
 encrypt (self, plaintext)
 verify (self, signature)
Public Member Functions inherited from wolfcrypt.ciphers._Rsa
 __init__ (self)
 __del__ (self)

Additional Inherited Members

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 *")
Static Public Attributes inherited from wolfcrypt.ciphers._Rsa
int RSA_MIN_PAD_SIZE = 11
Protected Attributes inherited from wolfcrypt.ciphers._Rsa
 _random = Random()

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.