code: public static byte[] sharedSecret(byte[] publicKey, byte[] privateKey) {
      final byte[] s = new byte[KEY_LEN];
      X25519.scalarMult(privateKey, 0, publicKey, 0, s, 0);
      final byte[] k = new byte[KEY_LEN];
      HSalsa20.hsalsa20(k, HSALSA20_SEED, s);
      return k;
    }
docs: Calculate the X25519/HSalsa20 shared secret for the given public key and private key.
  
  @param publicKey the recipient's public key
  @param privateKey the sender's private key
  @return a 32-byte secret key only re-calculable by the sender and recipient