unison/unison-src/transcripts/ed25519.md
2024-06-25 11:11:07 -07:00

534 B

scratch/main> builtins.merge

up = 0xs0123456789abcdef
down = 0xsfedcba9876543210

secret = 0xs3885da624f4430c01326d96764da85647d403dae1fcdc9856c51037f9c647032 

public = 0xsb14dbcf139c0e73d942a184b419e4f4fab726102bfe2b65c060b113bb379c77c


message = up ++ down ++ up ++ down ++ down ++ up ++ down ++ up

signature = crypto.Ed25519.sign.impl secret public message

sigOkay = match signature with
  Left err -> Left err
  Right sg -> crypto.Ed25519.verify.impl public message sg

> signature
> sigOkay