let () =
  Mirage_crypto_rng_unix.use_default ();
  let open Mirage_crypto_ec.Ed25519 in
  let _priv, pub = generate () in
  let octets = pub_to_octets pub in
  let pub_b32 = B32.encode octets in
  let octets' = B32.decode pub_b32 |> Result.get_ok in
  assert (octets = octets');
  (*
  Fmt.pr "public key    :@.%S@." octets;
  Fmt.pr "len: %d@." (String.length octets);
  Fmt.pr "len: %d@." (String.length pub_b32);
  *)
  Fmt.pr "%s@." pub_b32;

  ()
