module arch.node.types.crypto; import prelude open; type PublicKey := | Curve25519PubKey ByteString; deriving instance PublicKeyEq : Eq PublicKey; instance PublicKeyOrd : Ord PublicKey := mkOrd@{ cmp := \{_ _ := Equal}; }; type PrivateKey := | Curve25519PrivKey ByteString; deriving instance PrivateKeyEq : Eq PrivateKey; instance PrivateKeyOrd : Ord PrivateKey := mkOrd@{ cmp := \{_ _ := Equal}; }; type SecretKey := | ChaCha20Key; deriving instance SecretKeyEq : Eq SecretKey; deriving instance SecretKeyOrd : Ord SecretKey; type Signature := | Ed25519Signature ByteString; type Digest := | Blake3Digest ByteString; axiom hash {A} : A -> Digest; deriving instance DigestEq : Eq Digest; instance DigestOrd : Ord Digest := mkOrd@{ cmp := \{(Blake3Digest a) (Blake3Digest b) := Equal}; };