{"id":13399325,"url":"https://github.com/GaloisInc/cryptol","last_synced_at":"2025-03-14T04:31:16.375Z","repository":{"id":16149725,"uuid":"18895427","full_name":"GaloisInc/cryptol","owner":"GaloisInc","description":"Cryptol: The Language of Cryptography","archived":false,"fork":false,"pushed_at":"2024-10-28T19:25:45.000Z","size":76916,"stargazers_count":1139,"open_issues_count":245,"forks_count":126,"subscribers_count":57,"default_branch":"master","last_synced_at":"2024-10-29T15:35:15.964Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://galoisinc.github.io/cryptol/master/RefMan.html","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GaloisInc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-04-17T22:29:10.000Z","updated_at":"2024-10-28T18:35:12.000Z","dependencies_parsed_at":"2023-10-30T17:42:10.558Z","dependency_job_id":"e3dfd4b0-f49e-4de5-9b6b-e3696221835d","html_url":"https://github.com/GaloisInc/cryptol","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GaloisInc%2Fcryptol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GaloisInc%2Fcryptol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GaloisInc%2Fcryptol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GaloisInc%2Fcryptol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GaloisInc","download_url":"https://codeload.github.com/GaloisInc/cryptol/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243428432,"owners_count":20289317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T19:00:36.356Z","updated_at":"2025-03-14T04:31:16.367Z","avatar_url":"https://github.com/GaloisInc.png","language":"Haskell","funding_links":[],"categories":["Haskell","others","Frameworks and Libs"],"sub_categories":["Haskell"],"readme":"[![Cryptol](https://github.com/GaloisInc/cryptol/workflows/Cryptol/badge.svg)](https://github.com/GaloisInc/cryptol/actions?query=workflow%3ACryptol)\n[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/GaloisInc/cryptol)\n\n\n# Cryptol, version 3\n\n    This version of Cryptol is (C) 2013-2024 Galois, Inc., and\n    distributed under a standard, three-clause BSD license. Please see\n    the file LICENSE, distributed with this software, for specific\n    terms and conditions.\n\n# What is Cryptol?\n\nThe Cryptol specification language was designed by Galois for the NSA\nLaboratory for Advanced Cybersecurity Research as a public standard for\nspecifying cryptographic algorithms. A Cryptol reference specification\ncan serve as the formal documentation for a cryptographic module.\nUnlike current specification mechanisms, Cryptol is fully executable,\nallowing designers to experiment with their programs incrementally as\ntheir designs evolve.\n\nThis release is an interpreter for version 3 of the Cryptol\nlanguage. The interpreter includes a `:check` command, which tests\npredicates written in Cryptol against randomly-generated test vectors\n(in the style of\n[QuickCheck](http://hackage.haskell.org/package/QuickCheck)). There is\nalso a `:prove` command, which calls out to SMT solvers, such as\nYices, Z3, CVC4, or CVC5, to prove predicates for all possible inputs.\n\n# Getting Cryptol Binaries\n\nCryptol binaries for Mac OS X, Linux, and Windows are available from the\nGitHub [releases page](https://github.com/GaloisInc/cryptol/releases).\nMac OS X and Linux binaries are distributed as a tarball which you can\nextract to a location of your choice. Windows binaries are distributed\nboth as tarballs and as `.msi` installer packages which place a shortcut\nto the Cryptol interpreter in the Start menu.\n\nOn Mac OS X, Cryptol is also available via\n[Homebrew](http://brew.sh/). Simply run `brew update \u0026\u0026 brew install cryptol`\nto get the latest stable version.\n\n## Getting Z3\n\nCryptol currently uses Microsoft Research's [Z3 SMT\nsolver](https://github.com/Z3Prover/z3) by default to solve constraints\nduring type checking, and as the default solver for the `:sat` and\n`:prove` commands.  Cryptol generally requires the most recent version\nof Z3, but you can see the specific version tested in CI by looking [here](https://github.com/GaloisInc/what4-solvers/releases/tag/snapshot-20250227).\n\nYou can download Z3 binaries for a variety of platforms from their\n[releases page](https://github.com/Z3Prover/z3/releases). If you\ninstall Cryptol using Homebrew, the appropriate version of Z3 will be\ninstalled automatically. If you're using Linux, the package manager for\nyour distribution may include Z3, as well, though sometimes the\navailable versions are somewhat old.\n\nAfter installation, make sure that `z3` (or `z3.exe` on Windows)\nis on your PATH.\n\n### Note for 64-bit Linux Users\n\nOn some 64-bit Linux configurations, 32-bit binaries do not work. This\ncan lead to unhelpful error messages like `z3: no such file or\ndirectory`, even when `z3` is clearly present. To fix this, either\ninstall 32-bit compatibility packages for your distribution, or download\nthe `x64` version of Z3.\n\n# Building Cryptol From Source\n\nIn addition to the binaries, the Cryptol source is available publicly\non [GitHub](https://github.com/GaloisInc/cryptol).\n\nCryptol builds and runs on various flavors of Linux, Mac OS X, and\nWindows. We regularly build and test it in the following environments:\n\n- macOS 13 (x86-64)\n- macOS 14 (ARM64)\n- Ubuntu 20.04 (x86-64)\n- Ubuntu 22.04 (x86-64)\n- Windows Server 2019 (x86-64)\n\n## Prerequisites\n\nCryptol is regularly built and tested with the three most recent\nversions of GHC, which at the time of this writing are 9.4.8, 9.6.2, and\n9.8.2. The easiest way to install an appropriate version of GHC is\nwith [ghcup](https://www.haskell.org/ghcup/).\n\nSome supporting non-Haskell libraries are required to build\nCryptol. Most should already be present for your operating system, but\nyou may need to install the following:\n\n- [The GNU Multiple Precision Arithmetic Library (GMP)](https://gmplib.org/)\n- [ncurses](https://www.gnu.org/software/ncurses/)\n\nYou'll also need [Z3](#getting-z3) installed when running Cryptol.\n\n## Building Cryptol\n\nAfter a fresh checkout of cryptol, be sure to initialize its git submodules:\n\n    git submodule update --init\n\nThen, from the Cryptol source directory, run:\n\n    ./cry build\n\nThis will build Cryptol in place. From there, there are additional targets:\n\n- `./cry run`: run Cryptol in the current directory\n- `./cry test`: run the regression test suite\n\n## Installing Cryptol\n\nIf you run `cabal v2-install --installdir=DIR` in your source directory\nafter running one of the above `./cry` command, you will end up with a\nbinary in `DIR`.\n\n## Configuring Cryptol\n\nCryptol can use several external files to control its operation.\nNormally, the build process embeds these files into the executable.\nHowever, these embedded files can be overwritten with local copies in\ntwo ways:\n\n- Copy the contents of the `lib` directory into `$HOME/.cryptol`.\n\n- Set the `CRYPTOLPATH` environment variable to name some other\n  directory that contains the files from the `lib` directory.\n\n# Contributing\n\nWe believe that anyone who uses Cryptol is making an important\ncontribution toward making Cryptol a better tool. There are many ways\nto get involved.\n\n## Users\n\nIf you write Cryptol programs that you think would benefit the\ncommunity, fork the GitHub repository, and add them to the\n`examples/contrib` directory and submit a pull request.\n\nWe host a Cryptol mailing list, which you can [join\nhere](https://groups.google.com/a/galois.com/forum/#!forum/cryptol-users).\n\nIf you run into a bug in Cryptol, if something doesn't make sense in the\ndocumentation, if you think something could be better, or if you just\nhave a cool use of Cryptol that you'd like to share with us, use the\nissues page on [GitHub](https://github.com/GaloisInc/cryptol), or send\nemail to \u003ccryptol@galois.com\u003e.\n\n## Developers\n\nIf you'd like to get involved with Cryptol development, see the list of\n[low-hanging\nfruit](https://github.com/GaloisInc/cryptol/labels/low-hanging%20fruit).\nThese are tasks which should be straightforward to implement. Make a\nfork of this GitHub repository, send along pull requests and we'll be\nhappy to incorporate your changes.\n\n### Repository Structure\n\n- `/cryptol`: Haskell sources for the front-end `cryptol` executable\n  and read-eval-print loop\n- `/docs`: LaTeX and Markdown sources for the Cryptol documentation\n- `/examples`: Cryptol sources implementing several interesting\n  algorithms\n- `/lib`: Cryptol standard library sources\n- `/src`: Haskell sources for the `cryptol` library (the bulk of the\n  implementation)\n- `/tests`: Haskell sources for the Cryptol regression test suite, as\n  well as the Cryptol sources and expected outputs that comprise that\n  suite\n\n# Where to Look Next\n\nThe `docs` directory of the installation package contains an\nintroductory book, the `examples` directory contains a number of\nalgorithms specified in Cryptol.\n\nIf you are familiar with version 1 of Cryptol, you should read the\n`Version2Changes` document in the `docs` directory.\n\nFor a large collection of Cryptol examples, see the [cryptol-specs\nrepository](https://github.com/galoisinc/cryptol-specs).\n\nCryptol is still under active development at Galois. We are also\nbuilding tools that consume both Cryptol specifications and\nimplementations in (for example) C or Java, and can (with some amount of\nwork) allow you to verify that an implementation meets its\nspecification. See more information on the [SAW\nwebsite](https://saw.galois.com).\n\n# Thanks!\n\nWe hope that Cryptol is useful as a tool for educators and students,\ncommercial and open source authors of cryptographic implementations,\nand by cryptographers to\n\n- specify cryptographic algorithms\n- check or prove properties of algorithms\n- generate test vectors for testing implementations\n- experiment with new algorithms\n\n## Acknowledgements\n\nCryptol has been under development for over a decade with many people\ncontributing to its design and implementation. Those people include (but are\nnot limited to) Aaron Tomb, Adam Foltzer, Adam Wick, Alexander Bakst, Andrew\nKent, Andrei Stefanescu, Andrey Chudnov, Andy Gill, Benjamin Barenblat, Ben\nJones, Ben Selfridge, Brett Boston, Bretton Chen, Brian Huffman, Brian Ledger,\nChris Phifer, Daniel Wagner, David Thrane Christiansen, David Lazar, Dylan\nMcNamee, Eddy Westbrook, Edward Yang, Eric Mertens, Eric Mullen, Fergus\nHenderson, Hazel Weakly, Henry Blanchette, Iavor Diatchki, Jeff Lewis, Jim\nTeisher, Joe Hendrix, Joe Hurd, Joe Kiniry, Joel Stanley, Joey Dodds, John\nLaunchbury, John Matthews, Jonathan Daugherty, Kenneth Foner, Kevin Quick, Kyle\nCarter, Ledah Casburn, Lee Pike, Levent Erkök, Lisanna Dettwyler, Magnus\nCarlsson, Mark Shields, Mark Tullsen, Matt Sottile, Matthew Yacavone, Nathan\nCollins, Philip Weaver, Robert Dockins, Ryan Scott, Sally Browning, Sam\nAnklesaria, Sigbjørn Finne, Stephen Magill, Thomas Nordin, Trevor Elliott, and\nTristan Ravitch.\n\nMuch of the work on Cryptol has been funded by, and lots of design input\nwas provided by, the team at the [NSA's Laboratory for Advanced Cybersecurity\nResearch](https://www.nsa.gov/Research/NSA-Mission-Oriented-Research/LAC/),\nincluding Brad Martin, Frank Taylor, and Sean Weaver.\n\nPortions of Cryptol are also based upon work supported by the Office\nof Naval Research under Contract No. N68335-17-C-0452. Any opinions,\nfindings and conclusions or recommendations expressed in this\nmaterial are those of the author(s) and do not necessarily reflect\nthe views of the Office of Naval Research.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGaloisInc%2Fcryptol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGaloisInc%2Fcryptol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGaloisInc%2Fcryptol/lists"}