ecdsa_x = keyptr[0:octets]
ecdsa_y = keyptr[octets:octets * 2]
pubkey = CryptoECC.construct(
- curve = curve,
- point_x = number.bytes_to_long(ecdsa_x),
- point_y = number.bytes_to_long(ecdsa_y))
+ curve=curve,
+ point_x=number.bytes_to_long(ecdsa_x),
+ point_y=number.bytes_to_long(ecdsa_y))
sig = rrsig.signature
- elif _is_eddsa(rrsig.algorithm) or _is_gost(rrsig.algorithm):
+ elif _is_eddsa(rrsig.algorithm):
+ keyptr = candidate_key.key
+ if not (_have_ecpy and sys.version_info >= (3, 6)):
+ raise ImportError('DNSSEC validation for algorithm %u requires ecpy library and Python 3.6 or newer' % rrsig.algorithm)
+ if rrsig.algorithm == ED25519:
+ curve = 'Ed25519'
+ else:
+ curve = 'Ed448'
+ point = Curve.get_curve(curve).decode_point(keyptr)
+ pubkey = ECPublicKey(point)
+ sig = rrsig.signature
+ elif _is_gost(rrsig.algorithm):
raise UnsupportedAlgorithm(
'algorithm "%s" not supported by dnspython' % algorithm_to_text(rrsig.algorithm))
else: