from typing import Any, Optional, Union, Text
from .pubkey import pubkey

class _RSAobj(pubkey):
    keydata: Any
    implementation: Any
    key: Any
    def __init__(self, implementation, key, randfunc: Optional[Any] = ...) -> None: ...
    def __getattr__(self, attrname): ...
    def encrypt(self, plaintext, K): ...
    def decrypt(self, ciphertext): ...
    def sign(self, M, K): ...
    def verify(self, M, signature): ...
    def has_private(self): ...
    def size(self): ...
    def can_blind(self): ...
    def can_encrypt(self): ...
    def can_sign(self): ...
    def publickey(self): ...
    def exportKey(self, format: str = ..., passphrase: Optional[Any] = ..., pkcs: int = ...): ...

class RSAImplementation:
    error: Any
    def __init__(self, **kwargs) -> None: ...
    def generate(self, bits, randfunc: Optional[Any] = ..., progress_func: Optional[Any] = ..., e: int = ...): ...
    def construct(self, tup): ...
    def importKey(self, externKey: Any, passphrase: Union[None, bytes, Text] = ...) -> _RSAobj: ...

generate: Any
construct: Any
importKey: Any
error: Any
