+ wip copypasta secmod_rsa

This commit is contained in:
swrup 2026-02-20 11:04:09 +01:00
parent 213952cbea
commit 3405f9e4ef
3 changed files with 211 additions and 10 deletions

View file

@ -119,6 +119,7 @@ module EddsaPrivateKey = struct
type t = priv
let generate = generate
let pub_of_priv = pub_of_priv
let to_octets t = priv_to_octets t
@ -251,9 +252,14 @@ module RsaSignature : sig
type t
val jsont : t Jsont.t
val sign : key:RsaPrivateKey.t -> string -> string
end = struct
type t = string
(* TODO crypto
this is a placeholder signature algorithm *)
let sign ~key s = Mirage_crypto_pk.Rsa.PKCS1.sig_encode ~key s
let jsont =
let of_b32 s = B32.decode s in
let to_b32 t = B32.encode t in