Logic of Trezor.sign_with_pubkey and Trezor.ecdh_with_pubkey #450
SlugFiller
started this conversation in
General
Replies: 2 comments
-
From a little bit of testing, they give different results. But it's unclear in what way. As in, why there are two different public keys, and how the second one is generated. And I kind of need that information for my next PR. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Oh wait, it just has a single null byte prepended to it, and it's discarded in the def sign_with_pubkey(self, identity, blob):
"""Sign given blob and return the signature (as bytes)."""
return self.sign(identity, blob), b'\x00' + bytes(self.pubkey(identity, ecdh=False)) Why isn't it pre-discarded in the sign case too, if it's known to always be 0? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The trezor
Device
subclass contains two methods,sign_with_pubkey
andecdh_with_pubkey
respectively. They are only implemented for trezor, and not for any of the other devices. They are necessary forage
andsignify
to work.What I want to know is if it is possible to add a default implementation to
Device
as so:Would this do essentially the same thing, but less efficiently? Would making this addition allow other devices to support
age
andsignify
? Or is the public key returned bysign_with_pubkey
andecdh_with_pubkey
something different?If the answers to the above questions are yes yes no, this change may appear in my upcoming PR.
Beta Was this translation helpful? Give feedback.
All reactions