Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid use should raise an error #27

Open
burgerdev opened this issue Jul 19, 2020 · 0 comments
Open

Invalid use should raise an error #27

burgerdev opened this issue Jul 19, 2020 · 0 comments

Comments

@burgerdev
Copy link
Owner

I just managed to confuse the input type, it would have been helpful if this were not accepted:

let _ =
  let pub = X25519.(base |> string_of_public_key) in
  let priv = "0123456789abcdef0123456789abcdef" in (* <-- note that this should be 64 hex characters, not 32 octets! *)
  let pub = x25519 ~priv ~pub in
  print_endline pub
  (* happily prints 633d0241b2d1519ecfc84b75e1520e01fed24538f36b2d26f939ddd1f1efd73d *)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant