Replace 'ed25519' by 'pynacl'
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user