Infer a point on a curve from the private part.
This commit is contained in:
parent
ca3b6f0142
commit
d6e712a075
1 changed files with 5 additions and 5 deletions
|
|
@ -520,11 +520,11 @@ class Tls():
|
||||||
self.trace('y=0x%x' % y)
|
self.trace('y=0x%x' % y)
|
||||||
self.trace('d=0x%x' % d)
|
self.trace('d=0x%x' % d)
|
||||||
|
|
||||||
# Someone has reported that x and y are 0 after pairing with the latest windows driver,
|
# Someone has reported that x and y are 0 after pairing with the latest windows driver.
|
||||||
# for compatibility we could derive x and y with a following call:
|
#pub_key = ec.EllipticCurvePublicNumbers(x, y, ec.SECP256R1())
|
||||||
#ec.derive_private_key(d, ec.SECP256R1(), backend=crypto_backend)
|
#self.priv_key = ec.EllipticCurvePrivateNumbers(d, pub_key).private_key(crypto_backend)
|
||||||
|
|
||||||
|
self.priv_key = ec.derive_private_key(d, ec.SECP256R1(), backend=crypto_backend)
|
||||||
|
|
||||||
pub_key = ec.EllipticCurvePublicNumbers(x, y, ec.SECP256R1())
|
|
||||||
self.priv_key = ec.EllipticCurvePrivateNumbers(d, pub_key).private_key(crypto_backend)
|
|
||||||
|
|
||||||
tls = Tls(usb)
|
tls = Tls(usb)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue