Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrappers around API #20

Open
mimoo opened this issue Dec 7, 2018 · 1 comment
Open

wrappers around API #20

mimoo opened this issue Dec 7, 2018 · 1 comment

Comments

@mimoo
Copy link
Owner

mimoo commented Dec 7, 2018

We need wrappers around disco_Initialize for the different handshakes. Some ideas:

  • NX -> client_authenticates_server_via_PKI_handshake()
  • NX -> client_authenticates_server_via_TOFU_handshake()
  • NNpsk2 -> symmetric_key_handshake()
  • XK -> client_authenticated_via_PKI_and_server_key_is_known_to_client()

These are really mouthy. Perhaps a composition system?

my_protocol = new(Disco)
my_protocol.authenticate_server(PKI)
tada

Need a composition system for disco_Initialize as well. Too many NULL in there. Can add:

my_protocol.addMyKey()
my_protocol.addRemoteKey()
@mimoo mimoo changed the title API wrappers around API Dec 7, 2018
@mimoo
Copy link
Owner Author

mimoo commented Dec 7, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant