Move from ed25519 to PyNaCl

This commit is contained in:
2022-05-06 11:39:23 +02:00
parent 280652d5a7
commit 1299acd463
9 changed files with 136 additions and 100 deletions

View File

@@ -1,22 +0,0 @@
from .keys import (
BadSignatureError,
BadPrefixError,
create_keypair,
SigningKey,
VerifyingKey,
remove_prefix,
to_ascii,
from_ascii,
)
__all__ = (
'BadSignatureError',
'BadPrefixError',
'create_keypair',
'SigningKey',
'VerifyingKey',
'remove_prefix',
'to_ascii',
'from_ascii',
'__version__'
)

View File

@@ -1,3 +0,0 @@
version_json: str
def get_versions(): ...

View File

@@ -1,32 +0,0 @@
from typing import Any, Callable, Optional, Tuple
BadSignatureError: Any
def create_keypair(entropy: Callable[[int], bytes] = ...) -> Tuple[SigningKey, VerifyingKey]: ...
class BadPrefixError(Exception): ...
def remove_prefix(s_bytes: bytes, prefix: bytes) -> bytes: ...
def to_ascii(s_bytes: bytes, prefix: str = ..., encoding: str = ...) -> str: ...
def from_ascii(s_ascii: str, prefix: str = ..., encoding: str = ...) -> bytes: ...
class SigningKey:
sk_s: bytes
vk_s: bytes
def __init__(self, sk_s: bytes, prefix: str = ..., encoding: Optional[str] = ...) -> None: ...
def to_bytes(self, prefix: str = ...) -> bytes: ...
def to_ascii(self, prefix: str = ..., encoding: Optional[str] = ...) -> str: ...
def to_seed(self, prefix: str = ...) -> bytes: ...
def __eq__(self, them: object) -> bool: ...
def get_verifying_key(self) -> VerifyingKey: ...
def sign(self, msg: bytes, prefix: str = ..., encoding: Optional[str] = ...) -> bytes: ...
class VerifyingKey:
vk_s: bytes
def __init__(self, vk_s: bytes, prefix: str = ..., encoding: Optional[str] = ...) -> None: ...
def to_bytes(self, prefix: str = ...) -> bytes: ...
def to_ascii(self, prefix: str = ..., encoding: Optional[str] = ...) -> str: ...
def __eq__(self, them: object) -> bool: ...
def verify(self, sig: bytes, msg: bytes, prefix: str = ..., encoding: Optional[str] = ...) -> bool: ...
def selftest() -> None: ...