mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-10 23:40:58 +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",
|
||||
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":
|
||||
signature = sign_challenge(
|
||||
seckey,
|
||||
@ -120,6 +128,10 @@ def sign_challenge(
|
||||
|
||||
if sigtype == "gpg":
|
||||
data = challenge_hidden
|
||||
elif sigtype == "signify":
|
||||
if curve != "ed25519":
|
||||
raise ValueError("Unsupported curve")
|
||||
data = challenge_hidden
|
||||
elif sigtype == "ssh":
|
||||
if curve != "ed25519":
|
||||
data = sha256(challenge_hidden).digest()
|
||||
|
Loading…
Reference in New Issue
Block a user