Add Ed25519 keys and EdDSA signatures

This commit is contained in:
Helder Eijs 2022-04-15 00:15:48 +02:00
parent db731bb3a7
commit 764c1e81b9
73 changed files with 6840 additions and 629 deletions

View file

@ -51,12 +51,12 @@ class IntegerBase(ABC):
pass
@abc.abstractmethod
def to_bytes(self, block_size=0):
def to_bytes(self, block_size=0, byteorder='big'):
pass
@staticmethod
@abc.abstractmethod
def from_bytes(byte_string):
def from_bytes(byte_string, byteorder='big'):
pass
# Relations
@ -228,7 +228,7 @@ class IntegerBase(ABC):
@abc.abstractmethod
def jacobi_symbol(a, n):
pass
@staticmethod
def _tonelli_shanks(n, p):
"""Tonelli-shanks algorithm for computing the square root