When starting a new connection to the server, the client first reads
the server's public key from the network; then it calls
.Fn crypto_client_x_init_client
-to initialize a
+to initialise a
.Vt crypto_kex_ctx .
The arguments to
.Fn crypto_client_x_init_client
.Ss Key exchange as the server
When accepting a new connection from a client, the server calls
.Fn crypto_client_xk1_init_server
-to initialize a
+to initialise a
.Vt crypto_kex_ctx .
The arguments to
.Fn crypto_client_xk1_init_server
only once the handshake completes,
which is application logic and not part of the key exchange protocol.
.Pp
-After initializing
+After initialising
.Fa ctx ,
the server waits for the client to send
.Fa msg1
.Ss Key exchange as the client
When starting a new connection to the server, the client first calls
.Fn crypto_client_xk1_init_client
-to initialize a
+to initialise a
.Vt crypto_kex_ctx .
The arguments to
.Fn crypto_client_xk1_init_client
.Ss Key exchange as the server
When accepting a new connection from a client, the server first calls
.Fn crypto_client_xk1_init_server
-to initialize a
+to initialise a
.Vt crypto_kex_ctx .
The arguments to
.Fn crypto_client_xk1_init_server
.Fa local_pk
are generated ahead of time and known to the clients.
.Pp
-After initializing
+After initialising
.Fa ctx ,
the server waits for the client to send
.Fa msg1