<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p> Hello everyone!</p>
    <p>I have written a very simple tool called <a
        moz-do-not-send="true"
        href="https://github.com/TheDcoder/torhash">torhash</a> to
      generate hashed passwords/strings according to the instructions in
      control spec to authenticate with the controller interface (TC?).
      I did not actually study the S2K algorithm since I found it hard
      to understand RFC 2440, I studied source code and bit by bit I
      figured out what was happening behind the scenes!</p>
    <p>The reason I did this is that I am working on another program
      called <a moz-do-not-send="true"
        href="https://proxallium.dtw.tools/">ProxAllium</a> which acts
      as a graphical user interface for Tor, I am currently in the
      process of <a moz-do-not-send="true"
        href="https://github.com/DcodingTheWeb/ProxAllium/tree/next-gen">rewriting</a>
      it in C to make it cross-platform (along with a few other
      reasons...). I hit a roadblock while I was implementing support
      for interacting with the controller interface, I had to make a
      choice between calling Tor to generate the hashed password or to
      hash the password in the program itself. I felt like hashing the
      password in the program itself was the right choice, I had a few
      other weak reasons to not call Tor for hashing the password but my
      gut was the main motivator behind this choice.</p>
    <p>I created torhash (apologies about the bad name choice) as a
      proof-of-concept and to improve my general programming skills, I
      had no prior experience working with cryptography or hash
      functions on this level, so I went with the simplest library I
      could find for hashing the data. I could have gone with OpenSSL,
      as I believe that it is the de-facto cross-platform standard for
      cryptography and cryptographic hashing, I am currently looking
      into using it, but I am not yet sure if this is a good idea.</p>
    <p>I would be grateful if some of you can take out some time to have
      a look, I am very excited to hear your opinions and any advice
      that you may have to help me improve, the code itself is very
      simple and short (114 lines of code). Pardon any mistakes or bad
      code that I may have written, I have only begun programming
      relatively recently and my experience with low-level development
      (with C) is very recent.</p>
    <p>Thank you for reading and for the input in advance!</p>
    <p><br>
    </p>
    <p>Best Regards,</p>
    <p>Damon H. (TheDcoder)<br>
    </p>
  </body>
</html>