Authentication - AtlasNet/Protocols Wiki
Authentication sequence between Node and Client consists of two calls:
getAuthChallenge(publicKey) is called with client's PEM-encoded public key as an argument. This methods returns a chunk of random data encrypted with the supplied RSA public key with OAEP padding, encoded in Base64. Client must then decipher the data chunk, encode it in Base64 and send back to the node using confirmAuth(response) method. If the node confirms that response matches original data chunk, the connection goes into AUTHENTICATED state, and client is assumed to be the holder of RSA key pair identified by original publicKey parameter.