Replace 'ed25519' by 'pynacl'

This commit is contained in:
onlykey
2020-07-05 16:36:36 -04:00
committed by Roman Zeyde
parent 4d9d6c0741
commit e1bbdb4bcc
5 changed files with 21 additions and 17 deletions

View File

@@ -7,7 +7,7 @@ import logging
import struct
import ecdsa
import ed25519
import nacl.signing
from . import protocol
from .. import util
@@ -67,7 +67,8 @@ def _parse_ed25519_pubkey(mpi):
prefix, value = util.split_bits(mpi, 8, 256)
if prefix != 0x40:
raise ValueError('Invalid MPI prefix: {}'.format(prefix))
return ed25519.VerifyingKey(util.num2bytes(value, size=32))
vk = nacl.signing.VerifyKey(util.num2bytes(value, size=32), encoder=nacl.encoding.RawEncoder)
return vk
SUPPORTED_CURVES = {