Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Kex ¶
func Kex(w http.ResponseWriter, r *http.Request)
Kex expects (1) intent, intentID and public key of client, (2) generates server keypair (3) generates secret key (4) store secret key in ecdhKexDerivedKey map and (5) resopods with public key received in step 2.
This handler is only to be used be client side flow i.e. kex request initiated by client. eg. device register process.
Types ¶
type KexRequest ¶
type KexRequest struct { // Intent of kex, example - KEX_EXPORT_DH, KEX_ENROL_DEVICE, KEX_HTTP_SR Intent string `json:"intent"` // IntentID is unique identifier for key exchange process. Should be trasaID in KEX_ENROL_DEVICE and sessionID in case of other intents IntentID string `json:"intentID"` // Unique id of device which is making kex request. Machine ID can be used here? DeviceID string `json:"deviceID"` // Public key of client PublicKey string `json:"publicKey"` }
Click to show internal directories.
Click to hide internal directories.