elf, numbers: DSAPrivateNumbers) -> DSAPrivateKey: ...
    @abstractmethod
    def load_dsa_public_numbers(self, numbers: DSAPublicNumbers) -> DSAPublicKey: ...

class EllipticCurveBackend(metaclass=ABCMeta):
    @abstractmethod
    def derive_elliptic_curve_private_key(self, private_value: int, curve: EllipticCurve) -> EllipticCurvePrivateKey: ...
    @abstractmethod
    def elliptic_curve_signature_algorithm_supported(
        self, signature_algorithm: EllipticCurveSignatureAlgorithm, curve: EllipticCurve
    ) -> bool: ...
    @abstractmethod
    def elliptic_curve_supported(self, curve: EllipticCurve) -> bool: ...
    @abstractmethod
    def generate_elliptic_curve_private_key(self, curve: EllipticCurve) -> EllipticCurvePrivateKey: ...
    @abstractmethod
    def load_elliptic_curve_private_numbers(self, numbers: EllipticCurvePrivateNumbers) -> EllipticCurvePrivateKey: ...
    @abstractmethod
    def load_elliptic_curve_public_numbers(self, numbers: EllipticCurvePublicNumbers) -> EllipticCurvePublicKey: ...

class HMACBackend(metaclass=ABCMeta):
    @abstractmethod
    def create_hmac_ctx(self, key: bytes, algorithm: HashAlgorithm) -> HashContext: ...
    @abstractmethod
    def cmac_algorithm_supported(self, algorithm: HashAlgorithm) -> bool: ...

class HashBackend(metaclass=ABCMeta):
    @abstractmethod
    def create_hash_ctx(self, algorithm: HashAlgorithm) -> HashContext: ...
    @abstractmethod
    def hash_supported(self, algorithm: HashAlgorithm) -> bool: ...

class PBKDF2HMACBackend(metaclass=ABCMeta):
    @abstractmethod
    def derive_pbkdf2_hmac(
        self, algorithm: HashAlgorithm, length: int, salt: bytes, iterations: int, key_material: bytes
    ) -> bytes: ...
    @abstractmethod
    def pbkdf2_hmac_supported(self, algorithm: HashAlgorithm) -> bool: ...

class PEMSerializationBackend(metaclass=ABCMeta):
    @abstractmethod
    def load_pem_parameters(self, data: bytes) -> Any: ...
    @abstractmethod
    def load_pem_private_key(self, data: bytes, password: Optional[bytes]) -> Any: ...
    @abstractmethod
    def load_pem_public_key(self, data: bytes) -> Any: ...

class RSABackend(metaclass=ABCMeta):
    @abstractmethod
    def generate_rsa_parameters_supported(self, public_exponent: int, key_size: int) -> bool: ...
    @abstractmethod
    def generate_rsa_private_key(self, public_exponent: int, key_size: int) -> RSAPrivateKey: ...
    @abstractmethod
    def load_rsa_public_numbers(self, numbers: RSAPublicNumbers) -> RSAPublicKey: ...
    @abstractmethod
    def load_rsa_private_numbers(self, numbers: RSAPrivateNumbers) -> RSAPrivateKey: ...
    @abstractmethod
    def rsa_padding_supported(self, padding: AsymmetricPadding) -> bool: ...

class ScryptBackend(metaclass=ABCMeta):
    @abstractmethod
    def derive_scrypt(self, key_material: bytes, salt: bytes, length: int, n: int, r: int, p: int) -> bytes: ...

class X509Backend(metaclass=ABCMeta):
    @abstractmethod
    def create_x509_certificate(
        self,
        builder: CertificateBuilder,
        private_key: Union[DSAPrivateKey, EllipticCurvePrivateKey, RSAPrivateKey],
        algorithm: HashAlgorithm,
    ) -> Certificate: ...
    @abstractmethod
    def create_x509_crl(
        self,
        builder: CertificateRevocationListBuilder,
        private_key: Union[DSAPrivateKey, EllipticCurvePrivateKey, RSAPrivateKey],
        algorithm: HashAlgorithm,
    ) -> CertificateRevocationList: ...
    @abstractmethod
    def create_x509_csr(
        self,
        builder: CertificateSigningRequestBuilder,
        private_key: Union[DSAPrivateKey, EllipticCurvePrivateKey, RSAPrivateKey],
        algorithm: HashAlgorithm,
    ) -> CertificateSigningRequest: ...
    @abstractmethod
    def create_x509_revoked_certificate(self, builder: RevokedCertificateBuilder) -> RevokedCertificate: ...
    @abstractmethod
    def load_der_x509_certificate(self, data: bytes) -> Certificate: ...
    @abstractmethod
    def load_der_x509_csr(self, data: bytes) -> CertificateSigningRequest: ...
    @abstractmethod
    def load_pem_x509_certificate(self, data: bytes) -> Certificate: ...
    @abstractmethod
    def load_pem_x509_csr(self, data: bytes) -> CertificateSigningRequest: ...
    @abstractmethod
    def x509_name_bytes(self, name: Name) -> bytes: ...
PK