This commit is contained in:
parent
e0a9d7f1e2
commit
b303c874a7
1 changed files with 13 additions and 0 deletions
|
|
@ -108,3 +108,16 @@ let () =
|
|||
assert (encode bmsg = blinded_message);
|
||||
|
||||
()
|
||||
|
||||
let () = Mirage_crypto_rng_unix.use_default ()
|
||||
|
||||
let () =
|
||||
let open Crypto in
|
||||
let priv, pub = RsaPrivateKey.generate ~bits:2048 () in
|
||||
let bks = "deadbeaf" in
|
||||
let msg = "uhuh." in
|
||||
let sig_ = Fdh_rsa.sign ~priv ~pub ~bks ~msg in
|
||||
let res = Fdh_rsa.verify pub ~msg ~sig_ in
|
||||
assert (Result.is_ok res);
|
||||
|
||||
()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue