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

Public Member Functions

 __init__ (self, key)
 
 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._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.RsaPublic.__init__ ( self,
key )

Reimplemented from wolfcrypt.ciphers._Rsa.

Member Function Documentation

◆ encrypt()

wolfcrypt.ciphers.RsaPublic.encrypt ( self,
plaintext )
Encrypts **plaintext**, using the public 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 ciphertext.

◆ verify()

wolfcrypt.ciphers.RsaPublic.verify ( self,
signature )
Verifies **signature**, using the public key data in the
object. The signature's length must be equal to:

    **self.output_size**

Returns a string containing the plaintext.