I’m not entirely sure, if I get the logic of the PublicId and SecretId traits. Lets assume we use a standard public key cryptographic scheme like RSA or EdDSA… We have a private_key and a public_key…

In the trait PublicID, we have the type Signature… Shouldn’t it be “type pub_key” instead? Every peer that implements this trait has a public key (obviously) that doesn’t change, so here is a good place to store it. Signatures depend on data too and are different for different events.

And the function verify needs the pubkey, a signature and the data. Why is it different in the trait?

A structure that implements the privateID, the should store a private key, too…

So the general idea is to have to structures, say our_peer and other_peer, the former implements both publicID and privateID, while the latter implements only publicID. Something like that?