Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
PyFLocker 0.0.1.dev50+0d81782 documentation
PyFLocker 0.0.1.dev50+0d81782 documentation

Contents:

  • API Reference
    • ciphers package
      • Base classes
      • Exception classes
      • Symmetric cipher modes
      • Algorithm loaders
        • AES
        • Camellia
        • ChaCha20
        • Diffie-Hellman Key Exchange
        • Elleptic-curve Cryptography
        • RSA Asymmetric Cipher
        • Hash functions
      • Backend of PyFLocker
        • Cryptodome specific implementation
          • AES
          • ChaCha20
          • ECC
          • RSA
          • Hash functions
          • Miscallaneous tools
          • Tools related to symmetric ciphers
          • Tools related to asymmetric ciphers
        • Cryptography specific implementation
          • AES
          • ChaCha20
          • Camellia
          • ECC
          • RSA
          • DH
          • Hash functions
          • Miscallaneous tools
          • Tools related to symmetric ciphers
          • Tools related to asymmetric ciphers
        • Tools related to symmetric ciphers
        • Tools related to asymmetric ciphers
    • locker – Easy File Encryption
  • Examples
Back to top
View this page

Tools related to asymmetric ciphers¶

Tools for asymmetric ciphers common to all the backends.

class pyflocker.ciphers.backends.asymmetric.MGF1(hashfunc: BaseHash = <factory>)[source]

Bases: BaseMGF

Mask Generation Function.

Parameters:

hashfunc – A BaseHash object. Defaults to ‘sha256’.

hashfunc: BaseHash
class pyflocker.ciphers.backends.asymmetric.OAEP(mgf: BaseMGF = <factory>, hashfunc: BaseHash = <factory>, label: bytes | None = None)[source]

Bases: BaseAsymmetricPadding

PKCS#1 OAEP is an asymmetric cipher based on RSA and OAEP padding. It can encrypt messages slightly shorter than RSA modulus.

Parameters:
  • mgf – Mask Generation Function. Defaults to MGF1.

  • hashfunc – A BaseHash object. Defaults to ‘sha256’. Can be created from interfaces.Hash.new() function.

  • label – A label to apply to this encryption. Defaults to None.

mgf: BaseMGF
hashfunc: BaseHash
label: bytes | None = None
name: ClassVar[str] = 'OAEP'
class pyflocker.ciphers.backends.asymmetric.PSS(mgf: ~pyflocker.ciphers.base.BaseMGF = <factory>, salt_length: int | None = None)[source]

Bases: BaseAsymmetricPadding

Probabilistic Digital Signature Scheme.

Parameters:
  • mgf – A Mask Generation Function. Defaults to MGF1.

  • salt_length – Length of the salt, in bytes. It must be greater than 0. Defaults to None.

mgf: BaseMGF
salt_length: int | None = None
name: ClassVar[str] = 'PSS'
class pyflocker.ciphers.backends.asymmetric.ECDSA[source]

Bases: BaseEllepticCurveSignatureAlgorithm

Elleptic Curve Digital Signature Algorithm.

class pyflocker.ciphers.backends.asymmetric.ECDH[source]

Bases: BaseEllepticCurveExchangeAlgorithm

Elleptic Curve Diffie Hellmann Algorithm.

class pyflocker.ciphers.backends.asymmetric.EdDSA(mode: str = 'rfc8032', context: bytes | None = None)[source]

Bases: BaseEllepticCurveSignatureAlgorithm

Edwards-curve Digital Signature Algorithm.

Parameters:
  • mode – A string that is currently equal to "rfc8032".

  • context – Up to 255 bytes of context, which is a constant byte string to segregate different protocols or different applications of the same key.

mode: str = 'rfc8032'
context: bytes | None = None
Next
locker – Easy File Encryption
Previous
Tools related to symmetric ciphers
Copyright © 2020-2025, Arunanshu Biswas
Made with Sphinx and @pradyunsg's Furo