hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

README (1421B)


      1 Bigint provides constant time operations on big integers. This module is limited
      2 in scope, therefore the user must exercise caution and read the documentation
      3 carefully to avoid misuse. Restrictions apply to the compatibility of
      4 differently-sized big integers, and some functions require an uneven modulo.
      5 
      6 A big integer is an array of [[word]] and must be encoded using [[encode]],
      7 [[encodemod]] or [[encodereduce]]. See [[encodelen]] on how to calculate the
      8 required size of the array. The big integer will also store its announced bit
      9 length, i.e. the number of bits that are actually used to store its value; and
     10 the effective word length, i.e. the number of words that are actually used to
     11 store the value. The value may be decoded back to its byte format by [[decode]].
     12 
     13 Repeated modular multiplication is supported via montgomery multiplication. See
     14 [[tomonty]] and [[frommonty]] on how to convert from and back to this format and
     15 [[montymul]] for the actual multiplication operation.
     16 
     17 This is a low-level module which implements cryptographic primitives. Direct
     18 use of cryptographic primitives is not recommended for non-experts, as
     19 incorrect use of these primitives can easily lead to the introduction of
     20 security vulnerabilities. Non-experts are advised to use the high-level
     21 operations available in the top-level [[crypto::]] module.
     22 
     23 Be advised that Hare's cryptography implementations have not been audited.