cryptol

Cryptol: The Language of Cryptography

BSD-3-CLAUSE License

Downloads
667
Stars
1.1K

Bot releases are hidden (Show)

cryptol - 3.1.0 Latest Release

Published by RyanGlScott 9 months ago

Language changes

  • Cryptol now supports enum declarations. An enum is a named type which is defined by one or more constructors. Enums correspond to the notion of algebraic data types, which are commonly found in other programming languages. See the manual section for more information.

  • Add two enum declarations to the Cryptol standard library:

    enum Option a = None | Some a
    
    enum Result t e = Ok t | Err e
    

    These types are useful for representing optional values (Option) or values that may fail in some way (Result).

  • foreign functions can now have an optional Cryptol implementation, which by default is used when the foreign implementation cannot be found, or if the FFI is unavailable. The :set evalForeign REPL option controls this behavior.

Bug fixes

  • Fixed #1455, making anything in scope of the functor in scope at the REPL as well when an instantiation of the functor is loaded and focused, design choice (3) on the ticket. In particular, the prelude will be in scope.

  • Fix #1578, which caused parmap to crash when evaluated on certain types of sequences.

  • Closed issues #813, #1237, #1397, #1446, #1486, #1492, #1495, #1537, #1538, #1542, #1544, #1548, #1551, #1552, #1554, #1556, #1561, #1562, #1566, #1567, #1569, #1571, #1584, #1588, #1590, #1598, #1599, #1604, #1605, #1606, #1607, #1609, #1610, #1611, #1612, #1613, #1615, #1616, #1617, #1618, and #1619.

  • Merged pull requests #1429, #1512, #1534, #1535, #1536, #1540, #1541, #1543, #1547, #1549, #1550, #1555, #1557, #1558, #1559, #1564, #1565, #1568, #1570, #1572, #1573, #1577, #1579, #1580, #1583, #1585, #1586, #1592, #1600, #1601, and #1602.

cryptol - 3.0.0

Published by RyanGlScott over 1 year ago

Language changes

  • Cryptol now includes a redesigned module system that is significantly more expressive than in previous releases. The new module system includes the following features:

    • Nested modules: Modules may now be defined within other modules.

    • Named interfaces: An interface specifies the parameters to a module. Separating the interface from the parameter declarations makes it possible to have different parameters that use the same interface.

    • Top-level module constraints: These are useful to specify constraints between different module parameters (i.e., ones that come from different interfaces or multiple copies of the same interface).

    See the manual section for more information.

  • Declarations may now use numeric constraint guards. This is a feature that allows a function to behave differently depending on its numeric type parameters. See the manual section) for more information.

  • The foreign function interface (FFI) has been added, which allows Cryptol to call functions written in C. See the manual section for more information.

  • The unary - operator now has the same precedence as binary -, meaning expressions like -x^^2 will now parse as -(x^^2) instead of (-x)^^2. This is a breaking change. A warning has been added in cases where the behavior has changed, and can be disabled with :set warnPrefixAssoc=off.

  • Infix operators are now allowed in import lists: import M ((<+>)) will import only the operator <+> from module M.

  • lib/Array.cry now contains an arrayEq primitive. Like the other array-related primitives, this has no computational interpretation (and therefore cannot be used in the Cryptol interpreter), but it is useful for stating specifications that are used in SAW.

New features

  • Add a :time command to benchmark the evaluation time of expressions.

  • Add support for literate Cryptol using reStructuredText. Cryptol code is extracted from .. code-block:: cryptol and .. sourcecode:: cryptol directives.

  • Add a syntax highlight file for Vim, available in syntax-highlight/cryptol.vim

  • Add :new-seed and :set-seed commands to the REPL. These affect random test generation, and help write reproducable Cryptol scripts.

  • Add support for the CVC5 solver, which can be selected with :set prover=cvc5. If you want to specify a What4 or SBV backend, you can use :set prover=w4-cvc5 or :set prover=sbv-cvc5, respectively. (Note that sbv-cvc5 is non-functional on Windows at this time due to a downstream issue with CVC5 1.0.4 and earlier.)

  • Add :file-deps commands to the REPL and Python API. It shows information about the source files and dependencies of modules or Cryptol files.

Bug fixes

  • Fix a bug in the What4 backend that could cause applications of (@) with symbolic Integer indices to become out of bounds (#1359).

  • Fix a bug that caused finite bitvector enumerations to panic when used in combination with (#) (e.g., [0..1] # 0).

  • Cryptol's markdown parser is slightly more permissive and will now parse code blocks with whitespace in between the backticks and cryptol. This sort of whitespace is often inserted by markdown generation tools such as pandoc.

  • Improve documentation for fromInteger (#1465)

  • Closed issues #812, #977, #1090, #1140, #1147, #1253, #1322, #1324, #1329, #1344, #1347, #1351, #1354, #1355, #1359, #1366, #1368, #1370, #1371, #1372, #1373, #1378, #1383, #1385, #1386, #1391, #1394, #1395, #1396, #1398, #1399, #1404, #1415, #1423, #1435, #1439, #1440, #1441, #1442, #1444, #1445, #1448, #1449, #1450, #1451, #1452, #1456, #1457, #1458, #1462, #1465, #1466, #1470, #1475, #1480, #1483, #1484, #1485, #1487, #1488, #1491, #1496, #1497, #1501, #1503, #1510, #1511, #1513, and #1514.

  • Merged pull requests #1184, #1205, #1279, #1356, #1357, #1358, #1361, #1363, #1365, #1367, #1376, #1379, #1380, #1384, #1387, #1388, #1393, #1401, #1402, #1403, #1406, #1408, #1409, #1410, #1411, #1412, #1413, #1414, #1416, #1417, #1418, #1419, #1420, #1422, #1424, #1429, #1430, #1431, #1432, #1436, #1438, #1443, #1447, #1453, #1454, #1459, #1460, #1461, #1463, #1464, #1467, #1468, #1472, #1473, #1474, #1476, #1477, #1478, #1481, #1493, #1499, #1502, #1504, #1506, #1509, #1512, #1516, #1518, #1519, #1520, #1521, #1523, #1527, and #1528.

cryptol - 2.13.0

Published by RyanGlScott over 2 years ago

Language changes

  • Update the implementation of the Prelude function sortBy to use a merge sort instead of an insertion sort. This improves the both asymptotic and observed performance on sorting tasks.

UI improvements

  • "Type mismatch" errors now show a context giving more information about the location of the error. The context is shown when the part of the types match, but then some nested types do not. For example, when mathching { a : [8], b : [8] } with { a : [8], b : [16] } the error will be 8 does not match 16 and the context will be { b : [ERROR] _ } indicating that the error is in the length of the sequence of field b.

Bug fixes

  • The What4 backend now properly supports Boolector 3.2.2 or later.

  • Make error message locations more precise in some cases (issue #1299).

  • Make :reload behave as expected after loading a module with :module (issue #1313).

  • Make include paths work as expected when nested within another include (issue #1321).

  • Fix a panic that occurred when loading dependencies before includes are resolved (issue #1330).

  • Closed issues #1098, #1280, and #1347.

  • Merged pull requests #1233, #1300, #1301, #1302, #1303, #1305, #1306, #1307, #1308, #1311, #1312, #1317, #1319, #1323, #1326, #1331, #1333, #1336, #1337, #1338, #1342, #1346, #1348, and #1349.

cryptol - 2.12.0

Published by atomb about 3 years ago

Language changes

  • Updates to the layout rule. We simplified the specification and made some minor changes, in particular:

    • Paren blocks nested in a layout block need to respect the indentation if the layout block
    • We allow nested layout blocks to have the same indentation, which is convenient when writing private declarations as they don't need to be indented as long as they are at the end of the file.
  • New enumeration forms [x .. y by n], [x .. <y by n], [x .. y down by n] and [x .. >y down by n] have been implemented. These new forms let the user explicitly specify the stride for an enumeration, as opposed to the previous [x, y .. z] form (where the stride was computed from x and y).

  • Nested modules are now available (from pull request #1048). For example, the following is now valid Cryptol:

      module SubmodTest where
    
      import submodule B as C
    
      submodule A where
        propA = C::y > 5
    
      submodule B where
        y : Integer
        y = 42
    

New features

  • What4 prover backends now feature an improved multi-SAT procedure which is significantly faster than the old algorithm. Thanks to Levent Erkök for the suggestion.

  • There is a new w4-abc solver option, which communicates to ABC as an external process via What4.

  • Expanded support for declaration forms in the REPL. You can now define infix operators, type synonyms and mutually-recursive functions, and state signatures and fixity declarations. Multiple declarations can be combined into a single line by separating them with ;, which is necessary for stating a signature together with a definition, etc.

  • There is a new :set path REPL option that provides an alternative to CRYPTOLPATH for controlling where to search for imported modules (issue #631).

  • The cryptol-remote-api server now natively supports HTTPS (issue #1008), newtype values (issue #1033), and safety checking (issue #1166).

  • Releases optionally include solvers (issue #1111). See the *-with-solvers* files in the assets list for this release.

Bug fixes

  • Closed issues #422, #436, #619, #631, #633, #640, #680, #734, #735, #759, #760, #764, #849, #996, #1000, #1008, #1019, #1032, #1033, #1034, #1043, #1047, #1060, #1064, #1083, #1084, #1087, #1102, #1111, #1113, #1117, #1125, #1133, #1142, #1144, #1145, #1146, #1157, #1160, #1163, #1166, #1169, #1175, #1179, #1182, #1190, #1191, #1196, #1197, #1204, #1209, #1210, #1213, #1216, #1223, #1226, #1238, #1239, #1240, #1241, #1250, #1256, #1259, #1261, #1266, #1274, #1275, #1283, and #1291.

  • Merged pull requests #1048, #1128, #1129, #1130, #1131, #1135, #1136, #1137, #1139, #1148, #1149, #1150, #1152, #1154, #1156, #1158, #1159, #1161, #1164, #1165, #1168, #1170, #1171, #1172, #1173, #1174, #1176, #1181, #1183, #1186, #1188, #1192, #1193, #1194, #1195, #1199, #1200, #1202, #1203, #1205, #1207, #1211, #1214, #1215, #1218, #1219, #1221, #1224, #1225, #1227, #1228, #1230, #1231, #1232, #1234, #1242, #1243, #1244, #1245, #1246, #1247, #1248, #1251, #1252, #1254, #1255, #1258, #1263, #1265, #1268, #1269, #1270, #1271, #1272, #1273, #1276, #1281, #1282, #1284, #1285, #1286, #1287, #1288, #1293, #1294, and #1295.

cryptol - 2.10.0

Published by atomb almost 4 years ago

Language changes

  • Cryptol now supports primality checking at the type level. The type-level predicate prime is true when its parameter passes the Miller-Rabin probabilistic primality test implemented in the GMP library.

  • The Z p type is now a Field when p is prime, allowing additional operations on Z p values.

  • The literals 0 and 1 can now be used at type Bit, as alternatives for False and True, respectively.

New features

  • The interpreter now includes a number of primitive functions that allow faster execution of a number of common cryptographic functions, including the core operations of AES and SHA-2, operations on GF(2) polynomials (the existing pmod, pdiv, and pmult functions), and some operations on prime field elliptic curves. These functions are useful for implementing higher-level algorithms, such as many post-quantum schemes, with more acceptable performance than possible when running a top-to-bottom Cryptol implementation in the interpreter.

    For a full list of the new primitives, see the new Cryptol SuiteB and PrimeEC modules.

  • The REPL now allows lines containing only comments, making it easier to copy and paste examples.

  • The interpreter has generally improved performance overall.

  • Several error messages are more comprehensible and less verbose.

  • Cryptol releases and nightly builds now include an RPC server alongside the REPL. This provides an alternative interface to the same interpreter and proof engine available from the REPL, but is better-suited to programmatic use. Details on the protocol used by the server are available here. A Python client for this protocol is available here.

  • Windows builds are now distributed as both .tar.gz and .msi files.

Bug Fixes

  • Closed issues #98, #485, #713, #744, #746, #787, #796, #803, #818,
    #826, #838, #856, #873, #875, #876, #877, #879, #880, #881, #883,
    #886, #887, #888, #892, #894, #901, #910, #913, #924, #926, #931,
    #933, #937, #939, #946, #948, #953, #956, #958, and #969.
cryptol - 2.8.0

Published by atomb about 5 years ago

New features

  • Added support for indexing on the left-hand sides of declarations, record field constructors, and record updaters (issue #577). This builds on a new prelude function called generate, where the new syntax x @ i = e is sugar for x = generate (\i -> e).

  • Added support for element type ascriptions on sequence enumerations. The syntax [a,b..c:t] indicates that the elements should be of type t.

  • Added support for wildcards in sequence enumerations. For example, the syntax [1 .. _] : [3][8] yields [0x01, 0x02, 0x03]. It can also be used polymorphically. For example, the most general type of [1 .. _] is {n, a} (n >= 1, Literal n a, fin n) => [n]a

  • Changed the syntax of type signatures to allow multiple constraint arrows in type schemas (issue #599). The following are now equivalent:

      f : {a} (fin a, a >= 1) => [a] -> [a]
    
      f : {a} (fin a) => (a >= 1) => [a] -> [a]
    
  • Added a mechanism for user-defined type constraint operators, and use this to define the new type constraint synonyms (<) and (>) (issues #400, #618).

  • Added support for primitive type declarations. The prelude now uses this mechanism to declare all of the basic types.

  • Added support for Haskell-style "block arguments", reducing the need for parentheses in some cases. For example, generate (\i -> i +1) can now be written generate \i -> i + 1.

  • Improved shadowing errors (part of the fix for issue #569).

Bug fixes

  • Closed many issues, including #265, #367, #437, #508, #522, #549,
    #557, #559, #569, #578, #590, #595, #596, #601, #607, #608, #610,
    #615, #621, and #636.
cryptol - 2.7.0

Published by atomb over 5 years ago

New features

  • Added syntax for record updates (see #399 for details of implemented and planned features).

  • Updated the :browse command to list module parameters (issue #586).

  • Added support for test vector creation (the :dumptests command). This feature computes a list of random inputs and outputs for the given expression of function type and saves it to a file. This is useful for generating tests from a trusted Cryptol specification to apply to an implementation written in another language.

Breaking changes

  • Removed the [x..] construct from the language (issue #574). It was shorthand for [x..2^^n-1] for a bit vector of size n, which was often not what the user intended. Users should instead write either [x..y] or [x...], to construct a smaller range or a lazy sequence, respectively.

  • Renamed the value-level width function to length, and generalized its type (issue #550). It does not behave identically to the type-level width operator, which led to confusion. The name length matches more closely with similar functions in other languages.

Bug fixes

  • Improved type checking performance of decimal literals.

  • Improved type checking of /^ and %^ (issues #581, #582).

  • Improved performance of sequence updates with the update primitive (issue #579).

  • Fixed elapsed time printed by :prove and :sat (issue #572).

  • Fixed SMT-Lib formulas generated for right shifts (issue #566).

  • Fixed crash when importing non-parameterized modules with the backtick prefix (issue #565).

  • Improved performance of symbolic execution for Z n (issue #554).

  • Fixed interpretation of the satNum option so finding multiple solutions doesn't run forever (issue #553).

  • Improved type checking of the length function (issue #548).

  • Improved error message when trying to prove properties in parameterized modules (issue #545).

  • Stopped warning about defaulting at the REPL when warnDefaulting is set to false (issue #543).

  • Fixed builds on non-x86 architectures (issue #542).

  • Made browsing of interactively-bound identifiers work better (issue #538).

  • Fixed a bug that allowed changing the semantics of the _ # _ pattern and the - and ~ operators by creating local definitions of functions that they expand to (issue #568).

  • Closed issues #498, #547, #551, #562, and #563.

Solver versions

Cryptol can interact with a variety of external SMT solvers to support the :prove and :sat commands, and requires Z3 for its type checker. Many versions of these solvers will work correctly, but for Yices and Z3 we recommend the following specific versions.

  • Z3 4.7.1
  • Yices 2.6.1

For Yices, this is the latest version at the time of this writing. For Z3, it is not, and the latest versions (4.8.x) include changes that cause some examples that previously succeeded to time out when type checking.

cryptol - 2.6.0

Published by atomb about 6 years ago

This release includes several significant language additions, including unbounded integers and parameterized modules, along with many smaller improvements and bug fixes.

Added

  • Cryptol now has types for unbounded integers (Integer) and, relatedly, integers modulo a constant value (Z n), which can be used for more natural encodings of many public-key algorithms, among many other use cases.

  • Modules can now take types and values (including functions) as parameters. Importing modules can instantiate these parameters, and proofs about parameterized modules can leave parameters abstract (and therefore prove properties for all possible concrete parameters).

  • Constraint synonyms can be used to group together collections of commonly-used constraints.

  • Signed operations now exist for arithmetic (/$ and %$), comparison (>$, <$, <=$, and >=$), and shifting (>>$).

  • Operations for chaining arithmetic now exist. The carry function returns True if addition of its arguments would result in unsigned overflow, the scarry function does the same for signed overflow, and the sborrow function checks for overflow on signed subtraction.

  • The new type operators /^ and %^ perform ceiling division and modulus, respectively. These can be particularly useful in computing the number of fixed-size blocks needed to store a message of a
    particular size, for instance, or conversely to compute the amount of padding needed to fill up an integral number of blocks.

  • The new type operator != allows the constraint that two types are not equal.

  • The experimental new :extract-coq command will export the currently-defined environment in a form usable with the Coq definition of Cryptol's operational semantics.

  • The new :ast command prints out the internal form of the AST for a given expression.

  • Underscores are allowed in numeric literals, and can be used to group digits for greater readability.

Changed

  • The Cryptol::Extras module has been merged with the Prelude, now that it type-checks more quickly. Removing a Cryptol::Extras import should be enough to get older modules to work with this release.

  • Several new type classes now exist: Logic for bitwise logical operations, Zero for the zero primitive, and SignedCmp for signed comparison operations. Some functions with explicit type signatures may now require additional constraints.

  • Numeric literals and enumerations can now be used with any type that is a member of the new Literal class, which includes [n], Integer, and Z n.

  • Type checker and interpreter performance is generally better. Please report regressions as issues on GitHub.

  • The :help command now works with built-in types, commands, and :set options.

  • Defaulting warnings and error messages use more meaningful variable names.

  • Many bugs have been fixed.

cryptol - 2.5.0

Published by atomb about 7 years ago

Cryptol 2.5.0

This release includes a re-written interpreter which is generally faster and has fewer strictness-related edge cases, major enhancements to the performance of the type checker, and a variety of smaller additions and bug fixes.

Added

  • New update and updates functions provide an efficient, built-in
    way to replace elements of a vector.

  • New trace and traceVal functions print messages as they are being
    evaluated, which can be helpful for debugging.

  • New short-cutting operators /\, \/ and ==> now exist. The older
    && and || operators are strict, and have higher precedence.

  • New experimental :eval command evaluates an expression using
    a reference interpreter, which we created to ultimately serve as the
    official definition of the Cryptol semantics. This interpreter is less
    efficient than the normal one, but written in a very direct style meant
    to clearly describe the meaning of each language construct. For this
    release, the semantics of the reference interpreter are not considered
    final and still subject to change.

  • New prover-stats setting in the REPL, when enabled, causes the
    :prove and :sat commands to print information about the time taken
    and prover used to coplete a proof.

  • The :help command now shows information about precedence and fixity
    of operators.

  • The cryptol executable returns a non-zero exit code when proofs
    fail.

  • New prelude function: iterate

  • New example: MISTY1

Changed

  • The main Cryptol interpreter has been re-written in monadic style,
    which allows much greater control over the order of evaluation, and
    generally improves performance.

  • The type-checker has had a major overhaul, improving performance
    dramatically in many cases.

  • Overall, performance is generally better.

  • New command line option --color makes use of color text output
    configurable.

  • With :set ascii=on, the REPL now prints quotation marks around
    strings.

  • Cryptol now depends on version 7.0 or greater of the SBV library.

Fixes

  • Fix an off by one error in the implementation of split.

  • Fix a typo in the implementation of the >> operator.

  • Fix the pdiv and pmod primitives in the special case where the
    length of the dividend is less than the degree of the divisor polynomial.

  • Fix an issue where literal sequences of bit values were being
    incorrectly reversed.

  • Various documentation fixes.

  • Close issues #138, #268, #334, #362, #373, #388, #395

cryptol - 2.4.0

Published by acfoltzer over 8 years ago

Cryptol 2.4.0

This is primarily a maintenance release to support GHC 8.0.1 and drop
support for the GHC 7.8 series, and to roll up a number of smaller
improvements and fixes. Highlights are below, and a comprehensive list
of closed issues is available on GitHub.

Added

  • Added convenient aliases to the prelude: a prefix complement
    operator ~, and a base-2 logarithm type alias lg2.
  • New library functions in a new module Cryptol::Extras. We
    intend to eventually move these functions into the prelude, but at
    the moment they take too long to typecheck for them to be loaded
    so frequently (tracking this as issue #302).
  • A new command line option --command/-c specifies
    commands to be run after the interpreter loads. Multiple commands
    can be specified, and will be run in order. For example:
cryptol Foo.cry --command ':set prover=abc' --command ':prove'
  • Added :readByteArray and :writeByteArray to read and
    write raw byte sequences from files, for example:
Cryptol> :writeByteArray /tmp/foo "hello world"
Cryptol> :readByteArray /tmp/foo
Cryptol> it
"hello world"
  • Added new examples: A51, Bivium, Trivium, Minilock
  • The Windows installer now offers a choice of destination
    directory, and can add the installation directory to the user's
    path.

Changed

  • Dropped support for GHC 7.8.4 and earlier.
  • The symbolic simulator now takes advantage of an SBV feature that
    can lead to signifcant performance improvements when selecting
    from tables of constant values.
  • The random primitive now takes a 256-bit seed, rather than the
    previous 32-bit seed. This avoids inconsistencies between
    platforms with different machine word sizes.
  • The splitBy function in the prelude has been removed in favor of
    just using split, which has an identical type.
  • Improved documentation and book, notably adding a section about
    using modules, and more syntax details.
  • Improved the parser to allow for more flexible use of prefix
    operators.
  • Improved formatting of output for several commands and error
    messages.

Fixes

  • Fixed certain keywords, such as if and else, not appearing as
    tab-completion results.
  • Fixed incorrect behavior of shifts and rotates by greater than
    2^63.
  • Fixed the prelude not loading when a module specified at the
    command line fails to load.
  • Fixed type-correctness of certain generated SMTLIB code from the
    symbolic simulator.
  • Fixed a performance regression caused by unnecessarily-parallel
    runtime settings.
cryptol - 2.3.0

Published by acfoltzer almost 9 years ago

Cryptol 2.3.0

General Improvements Made

  • Added new typechecker solver and typechecker improvements.

The major feature of this release is a revised constraint solver
for typechecking, and improvements to how the typechecker
generates and propagates constraints. In many cases, the
typechecker will now accept simpler type signatures and require
fewer extraneous "obvious" constraints.

If an existing definition fails to typecheck with the new solver,
try simplifying or eliminating its signature. Some of the
constraints added only to satisfy the earlier typechecker may no
longer be necessary or checkable.

Despite the improvements, we are still aware of some bugs with the
new solver. If you run into trouble, see
the relevant tickets.

  • Made the fixity of primitives more consistent with their
    counterparts in other languages.
  • Fixed some incorrect strictness in primitives.
  • Fixed some pretty-printing bugs that caused commands like :type
    to print results with invalid Cryptol syntax.
  • Improved Windows installer, allowing installation to custom
    locations, and adding the executables' directory to the user's
    path.
  • Numerous performance and stability fixes.

Features Added

  • Added an interpreter option :set tc-solver to allow configuration
    of the SMT solver used during typechecking.
  • Added support for docstrings on Cryptol definitions. Docstring
    syntax is the same as block comment syntax, but with more than one
    * opening the block, for example:
/** This is the docstring of foo */
foo x = x + 1

With this example loaded, typing :help foo will display the both
the type and the docstring for foo.

  • Added :writeByteArray and :readByteArray interpreter commands
    which allow the interpreter to write values of type [n][8] to a
    file, and then read those values back in (currently binding the
    result to the it variable).
  • Added support for UTF-8 in identifiers, and set the locale of the
    interpreter to UTF-8. If you encounter errors reading in your old
    Cryptol files, make sure they are encoded as UTF-8.
  • Added experimental cryptol-server executable, which can be built
    by passing -fserver to a Cabal build, or by prefixing a Makefile
    build with CRYPTOL_SERVER=1. The interface to this server is
    very unstable, but to see an example of it in use, see
    pycryptol.

Examples Added

  • 3DES
  • ChaCha20
  • FNV-a1
  • SIV (RFC5297)
  • Salsa20
  • MiniLock (including SHA256, Blake2s, Curve25519, SCrypt, PBKDF2, Salsa20, Poly1305)

Contrib

  • Even-Mansour

Puzzles

  • Coins
  • Fox-Chicken-Corn
  • Marble
  • NQueens
cryptol - v2.2.6

Published by acfoltzer almost 9 years ago

Release of version 2.2.6

cryptol - v2.2.5

Published by acfoltzer about 9 years ago

Cryptol 2.2.5

This is a minor release:

cryptol - v2.2.4

Published by acfoltzer over 9 years ago

Cryptol 2.2.4

This is a minor release:

  • Fixed a panic when using :prove and :sat with certain shift primitives (19ce4d4c4876a925a2e4aa7098b232bb49d00329)
cryptol - v2.2.3

Published by acfoltzer over 9 years ago

Cryptol 2.2.3

This is a minor release:

  • Changed to using SBV 4.3+
  • Fixed warnings when building with GHC 7.10.1
cryptol - v2.2.2

Published by acfoltzer over 9 years ago

Cryptol 2.2.2

This is a minor release:

  • Added an upper bound on sbv to avoid breakage with the new version 4.3 (we're using 4.3 in the development version as of 711ba43)
  • Remove vestigial references to the defunct configure script and require Cabal 1.20 (#197)
  • Tweak README.md to clarify CVC4 installation requirements

Note that in addition to the binaries posted here, Mac users can now use Homebrew to install both the latest stable release and the latest development version of Cryptol.

cryptol - v2.2.1

Published by acfoltzer over 9 years ago

Cryptol 2.2.1

This is a minor release to address a few issues that arose with Hackage and Homebrew distributions, and to add an Ubuntu 14.04 LTS binary.

  • Added an upper bound on base to make Hackage happy
  • Fixed an edge case when installing the LICENSE files with a PREFIX set in the Makefile
  • Fixed invalid Haddock syntax (#195)
cryptol - v2.2.0

Published by acfoltzer over 9 years ago

Cryptol 2.2.0

General Improvements Made

  • Added two flags to cryptol.cabal:
    • relocatable: ignores the library path baked in at compile time with the expectation that that path will not necessarily be valid in the installed environment (good for building tarball-style binary distributions)
    • self-contained: compiles the contents of the Cryptol prelude into the executable so that it can be reconstituted if the prelude is not found in the usual library path (good for applications using Cryptol as a Cabal library rather than using the Cryptol Makefile)
  • Changed the parser so that UTF-8 is always the encoding for Cryptol source files; it had previously depended on the locale settings on the user's computer which caused headaches when collaborating
  • Improved the way the type checker generates and discharges goals so that more information is used from explicit signatures and fewer unification operations are required, improving speed and precision of type inference (#16)
  • Merged changes in Cryptol's SBV fork upstream and switched to using the Hackage version of the library (#35)
  • Overhauled the Makefile and the way distributions are configured and built (#127, #161, #169)
  • Prepared Cryptol for a Hackage release (#18)
  • Redid the way the interpreter looks for modules to load, making it more portable and flexible for various types of installation scenarios (#127, 13a385d, 3d275ea)
  • Split off the experimental ICryptol notebook into a separate project (9923b6f)
  • Unified some of the concrete and symbolic evaluator code

Features Added

  • Added a "smoke test" on startup to check for the presence of CVC4 and give an informative error message if it's not found (#112)
  • Added abc as a prover option in the interpreter
  • Added binding of counterexamples and satisfying assignments to the it interpreter variable (#19)
  • Added support for multiple satisfying assignments from :sat by setting the satNum interpreter variable (#19, #72)
  • Added support for .cryptolrc files, batch scripts in either the current directory or the user's home directory that are automatically read and executed when the interpreter starts (#97)
  • Added the CRYPTOLPATH environment variable so that custom locations can be searched when loading modules (#127)
  • Added warnShadowing interpreter option, on by default, to control whether warnings about shadowed variables appear
  • Made local bindings without type signatures (like those in where clauses) monomorphic by default, though this behavior can be overridden using the mono-binds interpreter variable; in many cases this improves the quality of inferred types and makes more programs typecheck

Documentation Improved

  • Added documentation to explain mono-binds when introducing where clauses
  • Began documenting development and release practices in HACKING.md
  • Cleaned up and updated README.md to account for recent changes and the spinoff of ICryptol
  • Updated :sat examples to use satNum rather than manually adding clauses for additional counterexamples

Examples Added

  • MKRAND RBG (#69)
  • RC4 (#134)

Bugs Squished

  • Added a guard to help prevent GMP core dumps when creating extremely large bitvectors (#73)
  • Added the filename of the module being parsed when reporting a parser error (#168)
  • Changed precedence of xor (^) to bring it in line with Haskell and other languages
  • Fixed cases where evaluation was overly strict for sequences of bits (#130)
  • Fixed crash in symbolic simulation of (!!) and (@@) (#148)
  • Fixed empty modules being rejected (#167)
  • Fixed handling of Fin constraints when calling the solver during typechecking (#58, #140)
  • Fixed implementation of (#) in symbolic simulation (#131)
  • Fixed modules not being properly reloaded
  • Fixed pretty-printing of infinite enumerations ([x...] and [x,y...])
  • Fixed punctuation of Q.E.D. (#132)
  • Fixed symbolic rotation by rotation amounts greater than the width of a word (#160)
  • Improved and fixed specification of Salsa20
  • Improved clarity of renamer errors (#125)
  • Improved handling of :check progress bars for batch mode and when interrupted by an exception or Ctrl-C (#114)
  • Improved performance of symbolic simulation primitives applied to very large bitvectors (#189)
  • Improved performance when parsing and typechecking large integer literals (#139)
  • Refined how we present output from check, :sat and :prove, particularly when no arguments are given (#117)
  • Removed extra strictness from symbolic simulation of streams (#128)
  • Switched to Template Haskell for generating git revision info in the banner and panic messages, reducing the frequency of rebuilds triggered when using Cryptol as a library
  • Various SBV fixes (#133, #135)
cryptol - v2.1.0

Published by acfoltzer about 10 years ago

Cryptol 2.1.0

Language Semantics

  • Changed indexing of tuples to be 0-based, rather than 1-based (#82)
Cryptol> (True, False).0
True
Cryptol> (True, False).1
False

Testing, SAT, and Prove

  • Added :exhaust command for exhaustive testing (previously possible only by setting the tests variable high enough for full coverage) (#94)
  • Added any solver which runs all available solvers in parallel and returns the first result (#7)
  • Added offline mode for generating SMTLIB output, rather than invoking a solver (#85)
  • Added support for Boolector and MathSAT solvers
  • Improved distribution of :check cases (#86)
  • Improved performance and stability of the Cryptol symbolic simulator

REPL

  • Added let-binding to the REPL (#6)
Cryptol> let f x = x + 2
Cryptol> let g x = f x + 1
Cryptol> g 5 : [32]
8
Cryptol> let f x = 0
Cryptol> g 5 : [32]
8
  • Added short versions of : commands (listed in :help output); the old behavior of entering a prefix of a command still works but is overridden when the prefix is also another command (#90, #99)
  • Added the variable it to the REPL, which is always bound to the value of the previously-evaluated expression or to the counterexample/satisfying assignment of a :sat or :prove
Cryptol> 1+1 : [1]
0x0
Cryptol> it
0x0
Cryptol> :t it
it : [1]
  • Changed default base to 16 (#89)
  • Minor UI improvements to the REPL
  • When :check and :prove are run without an argument, all property declarations in the current module are now checked or proved (#93)

Documentation

  • Improved handling of fenced code in literate Cryptol Markdown files
  • Many improvements to documentation and the Programming Cryptol book

Examples

  • FNV-1a non-cryptographic hash
  • Keccak hash
  • ZUC cipher
  • Malicious SHA

Bugs

  • Fixed bug in Salsa20 example
  • Fixed crash when complementing infinite sequences (#65)
  • Fixed crash with large index sizes (#111)
  • Fixed handling of layout blocks ended by parentheses or curly braces (#81)
  • Fixed how we find the Cryptol.cry prelude file (#113)
  • Fixed minor typos and editing errors
  • Fixed some crashes during Cryptol Symbolic simulation (#101)
  • Fixed various bugs in the type system constraint solver
  • Handle exceptions properly when running :check (#103)
  • Improved build system portability and compatibility (#23, #71)
  • Modules are now only loaded once per load command (#10)
  • Pretty-printer for Cryptol expressions now correctly parenthesizes infix operators
  • The @, !, and !! operators now require finite-sized indexes (#111)
cryptol - v2.1.0-alpha1

Published by acfoltzer about 10 years ago

Version 2.1.0-alpha1.

Package Rankings
Top 8.17% on Proxy.golang.org
Top 8.38% on Pypi.org
Badges
Extracted from project README
Cryptol Open in Gitpod