mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-11 07:50:57 +00:00
apps/wallet: support Signify Ed25519 signatures (#348)
This commit is contained in:
parent
b5c909417e
commit
588998cb85
@ -39,6 +39,14 @@ async def sign_identity(ctx, msg, keychain):
|
|||||||
"gpg",
|
"gpg",
|
||||||
msg.ecdsa_curve_name,
|
msg.ecdsa_curve_name,
|
||||||
)
|
)
|
||||||
|
elif msg.identity.proto == "signify":
|
||||||
|
signature = sign_challenge(
|
||||||
|
seckey,
|
||||||
|
msg.challenge_hidden,
|
||||||
|
msg.challenge_visual,
|
||||||
|
"signify",
|
||||||
|
msg.ecdsa_curve_name,
|
||||||
|
)
|
||||||
elif msg.identity.proto == "ssh":
|
elif msg.identity.proto == "ssh":
|
||||||
signature = sign_challenge(
|
signature = sign_challenge(
|
||||||
seckey,
|
seckey,
|
||||||
@ -120,6 +128,10 @@ def sign_challenge(
|
|||||||
|
|
||||||
if sigtype == "gpg":
|
if sigtype == "gpg":
|
||||||
data = challenge_hidden
|
data = challenge_hidden
|
||||||
|
elif sigtype == "signify":
|
||||||
|
if curve != "ed25519":
|
||||||
|
raise ValueError("Unsupported curve")
|
||||||
|
data = challenge_hidden
|
||||||
elif sigtype == "ssh":
|
elif sigtype == "ssh":
|
||||||
if curve != "ed25519":
|
if curve != "ed25519":
|
||||||
data = sha256(challenge_hidden).digest()
|
data = sha256(challenge_hidden).digest()
|
||||||
|
Loading…
Reference in New Issue
Block a user