ecdsa.eddsa module

Implementation of Edwards Digital Signature Algorithm.

class ecdsa.eddsa.PrivateKey(generator, private_key)[source]

Bases: object

Private key for the Edwards Digital Signature Algorithm.

property private_key
public_key()[source]

Generate the public key based on the included private key

sign(data)[source]

Perform a Pure EdDSA signature over data.

class ecdsa.eddsa.PublicKey(generator, public_key, public_point=None)[source]

Bases: object

Public key for the Edwards Digital Signature Algorithm.

property point
public_key()[source]
public_point()[source]
verify(data, signature)[source]

Verify a Pure EdDSA signature over data.

ecdsa.eddsa.bytes_to_int(bytes, byteorder='big', *, signed=False)

Return the integer represented by the given array of bytes.

bytes

Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value. Default is to use ‘big’.

signed

Indicates whether two’s complement is used to represent the integer.