5 comments

  • mratsim 370 days ago
    Author here, adding an accompanying post focused on performance: https://ethresear.ch/t/releasing-constantine-v0-1-0-a-modula...
  • taspeotis 370 days ago
    TW: blockchain

    > Releasing Constantine v0.1.0 - A modular cryptography stack for blockchain and proof systems

    I guess OP had to “edit” the title for conciseness…

    • tempodox 370 days ago
      Ferengi Rule of Acquisition #239: Never be afraid to mislabel a product.

      Cryptography and cryptocurrency aren't the same, and I know of no other use for blockchain. Maybe they were hoping to win over non-believers by deceiving them about the content of the article.

      • narodnik 370 days ago
        let me guess, you don't actually write code. just talk down people who actually do this is a crypto lib and the authors repo obv has a ton of hardwork https://github.com/mratsim/constantine
      • IanCal 370 days ago
        > Cryptography and cryptocurrency aren't the same,

        They aren't, but this is a cryptography library.

        • debatem1 370 days ago
          At a glance it seems fair to say that this is both a cryptocurrency library and a cryptography library.

          The only truly general purpose thing here is SHA256. Every protocol on its supported list starts with either "ethereum" or "evm", and to the best of my knowledge the other primitives have seen very little use besides cryptocurrency.

      • inhumantsar 370 days ago
        the vehemently anti-blockchain community is starting to sound more religious about their belief than the cryptobros ever did...
  • medo-bear 370 days ago
    I think this is cool, but how sure are the authors that this is side-channel safe? There is a similar (modular, high performance, zero-dependency) library in Common Lisp but it can't give side-channel guarantees due to how some Common Lisp compilers implement integer and arithmetic functions

    https://github.com/sharplispers/ironclad

    • mratsim 370 days ago
      Great question, first of all I did extensive research https://github.com/mratsim/constantine/wiki/Constant-time-ar....

      Then the library defines its own types SecretBool and SecretWord throughough library that cannot be mixed with regular Nim types and are based on uint32/uint64 so the compiler cannot assume 0/1 and do boolean logic.

      Assembly is used to avoid compilers getting too smart and reintroducing branches but the no-assembly fallback should still compile without branches.

      By convention, all variable-time cryptographic functions are suffixed _vartime.

      There is a plan to add automated constant-time checks as well https://github.com/mratsim/constantine/issues/7.

  • christophilus 370 days ago
    > Constantine has been written to have zero-dependency, besides the Nim compiler.

    More of this, please. I think this should be the norm.