+ Denomination_key
This commit is contained in:
parent
aa1f64fe3e
commit
68b5e6608a
3 changed files with 74 additions and 4 deletions
27
src/types.ml
27
src/types.ml
|
|
@ -130,19 +130,17 @@ module Eddsa = struct
|
|||
let pub_to_string pub =
|
||||
pub |> Mirage_crypto_ec.Ed25519.pub_to_octets |> Base_32.encode
|
||||
|
||||
(*type priv = string*)
|
||||
(* EdDSA signatures are transmitted as 64-bytes base32
|
||||
binary-encoded objects with just the R and S values (base32_ binary-only). *)
|
||||
(*type signature = string*)
|
||||
end
|
||||
|
||||
module Rsa = struct
|
||||
(* TODO
|
||||
GNUNET_CRYPTO custom encode/decode *)
|
||||
(* RSA public key converted to Crockford Base32. *)
|
||||
type pub = Mirage_crypto_pk.Rsa.pub
|
||||
|
||||
(* TODO
|
||||
how to read/write pub rsa key
|
||||
what format is used? *)
|
||||
let pub_of_string _s = assert false
|
||||
let pub_to_string _pub = assert false
|
||||
end
|
||||
|
|
@ -151,3 +149,24 @@ module Hash_code = struct
|
|||
(* 32-byte value representing a point on Curve25519. *)
|
||||
type cs25519Point = string
|
||||
end
|
||||
|
||||
module Rsa_denomination_key = struct
|
||||
type t = {
|
||||
age_mask: int
|
||||
; rsa_pub: string (* Rsa.pub *)
|
||||
}
|
||||
end
|
||||
|
||||
module CS_denomination_key = struct
|
||||
(* Clause Schnorr *)
|
||||
type t = {
|
||||
age_mask: int
|
||||
; cs_pub: string
|
||||
}
|
||||
end
|
||||
|
||||
module Denomination_key = struct
|
||||
type t =
|
||||
| Rsa of Rsa_denomination_key.t
|
||||
| CS of CS_denomination_key.t
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue