Open mimoo opened 5 years ago
What about the following:
my_protocol = new(Disco)
// won't work out of the box
my_protocol.Authenticate_server_with_whitelist(whitelist_keys[]) // NX
// or
my_protocol.Authenticate_server_with_PKI(root_key) // NX
// or
my_protocol.Authenticate_server_with_TOFU(TOFU_list[], callback_fingerprint) // NX
// or
my_protocol.Authenticate_server_with_key(server_key) // NK
// at this point the protocol can be used with `Nsomething`
my_protocol.Authenticate_client_with_key(my_key) // KK
// at this point the protocol can be used while authenticating the client as well!
of course power users can still use disco_initialize
since this is also a library
We need wrappers around disco_Initialize for the different handshakes. Some ideas:
client_authenticates_server_via_PKI_handshake()
client_authenticates_server_via_TOFU_handshake()
symmetric_key_handshake()
client_authenticated_via_PKI_and_server_key_is_known_to_client()
These are really mouthy. Perhaps a composition system?
Need a composition system for
disco_Initialize
as well. Too manyNULL
in there. Can add: