1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20�
:�!Qc @ s� d d l Z d d l Z e j e j j e j j e � d � � Z e j Z e j
e j � g e _ d � Z
e j Z e j
e j � e j
e j � e j
e j � g e _ d � Z e j Z e j
e j � e j
e j � e j e j
e j � e j
e j � g e _ d � Z e j Z e j
e j � e j
e j � e j e j
e j � g e _ d � Z e j Z e j
e j � e j
e j � e j
e j � g e _ d d d � Z d S( i����Nt ed25519c C s t j d � } t | � | j S( Ni ( t ctypest create_string_buffert
c_create_seedt raw( t seed( ( s1 c:\programming\python\secudht\ed25519\__init__.pyt create_seed s
c C s? t j d � t j d � } } t | | | � | j | j f S( Ni i@ ( R R t c_create_keypairR ( R t
public_keyt private_key( ( s1 c:\programming\python\secudht\ed25519\__init__.pyt create_keypair s c C s2 t j d � } t | | t | � | | � | j S( Ni@ ( R R t c_signt lenR ( t messageR R t signature( ( s1 c:\programming\python\secudht\ed25519\__init__.pyt sign s c C s t t | | t | � | � � S( N( t boolt c_verifyR ( R R
R ( ( s1 c:\programming\python\secudht\ed25519\__init__.pyt verify* s c C s� | d k r t j | � } n | d k r<