unison/unison-src/transcripts/ed25519.output.md
Greg Pfeil 0031542faf
Add a space before code block info strings
This is for consistency with the `cmark` style. Now the blocks we still
pretty-print ourselves will match the bulk of them that `cmark`
produces.
2024-07-10 13:56:07 -06:00

1.2 KiB

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

  Loading changes detected in scratch.u.

  I found and typechecked these definitions in scratch.u. If you
  do an `add` or `update`, here's how your codebase would
  change:
  
    ⍟ These new definitions are ok to `add`:
    
      down      : Bytes
      message   : Bytes
      public    : Bytes
      secret    : Bytes
      sigOkay   : Either Failure Boolean
      signature : Either Failure Bytes
      up        : Bytes
  
  Now evaluating any watch expressions (lines starting with
  `>`)... Ctrl+C cancels.

    17 | > signature
           ⧩
           Right
             0xs0b76988ce7e5147d36597d2a526ec7b8e178b3ae29083598c33c9fbcdf0f84b4ff2f8c5409123dd9a0c54447861c07e21296500a98540f5d5f15d927eaa6d30a
  
    18 | > sigOkay
           ⧩
           Right true