Robert Dockins
14af3690c6
Update the SIV example to avoid issue #375 .
2016-08-23 14:08:15 -07:00
Robert Dockins
cd9ffed00b
Update examples to use (/\) instead of (&&) where appropriate,
...
and to squash other warnings related to the upcomming precedence change.
2016-08-22 18:14:44 -07:00
Iavor S. Diatchki
8c36992904
Merge pull request #344 from adrianherrera/enhancement/MISTY1
...
Crytol spec for MISTY1 cipher
2016-07-18 11:19:53 -07:00
Adam C. Foltzer
2c428804bc
remove splitBy
and update documentation
...
Closes #291
2016-07-05 09:58:49 -07:00
Adrian Herrera
bedeeb0883
Crytol spec for MISTY1 cipher (as described in RFC 2994)
2016-06-07 22:42:16 +10:00
Brian Huffman
df27f577a4
Fix typo in comment, whitespace
2016-05-24 08:21:55 -07:00
Thomas M. DuBuisson
8b577828f6
Simplify constraints of Minilock prims.
...
Cryptol 2.3-alpha couldn't math, but thanks to @yav 's hard work, Cryptol 2.3 and
later can math! So with our new found powers comes great simplification. Not
all is perfect, much like Dori-Mic's situation, but things are much better.
See the width constraints in SCrypt.cry for areas that could be improved with
some semi-obvious statements (forall x. 1 + width x >= width (x - 1)).
2016-04-12 15:53:12 -07:00
Brian Huffman
5e5184d5ee
Add alternative implementations of bivium and trivium ciphers
2016-02-19 14:24:07 -08:00
Brian Huffman
ab82097033
Fix bug/typo in Trivium example implementation
...
See also the Trivium specification:
http://www.ecrypt.eu.org/stream/ciphers/trivium/trivium.pdf
2016-02-19 14:04:52 -08:00
Brian Huffman
1322156d28
Remove trailing whitespace
2016-02-19 10:08:20 -08:00
Aaron Tomb
9809e176eb
Add examples from Alexander Semenov
...
A new Cryptol user! Alexander Semenov from the Russian Academy of
Sciences is the developer of the Transalg tool, which can also translate
cryptographic algorithms (written in imperative form) into SAT problems.
He recently started experimenting with Cryptol, and wrote up
implementations of several stream ciphers, included in this commit.
2016-02-18 15:08:17 -08:00
Clint Adams
07088eddef
CAST5 example
2016-02-05 15:26:25 -05:00
Thomas M. DuBuisson
9b8d153692
Import ::Extras in minilock modules.
2016-01-20 09:45:13 -08:00
Adam C. Foltzer
bf294a60b8
integrate MiniLock example
2016-01-19 18:19:35 -08:00
Thomas M. DuBuisson
a4e42b8429
Example: miniLock in Cryptol
2016-01-19 18:19:35 -08:00
Adam C. Foltzer
58a605e8ff
update examples and documentation
2016-01-19 18:19:35 -08:00
Adam C. Foltzer
4d3fc9a413
Update copyright dates and add missing headers
2016-01-19 18:19:35 -08:00
Adam C. Foltzer
ee99873e43
fix FoxChickenCorn example
...
The new type signature for popCount is simpler, and more importantly
passes the typechecker. The old one really _ought_ to typecheck, though,
so a shrunken version of it is now in the test suite for #126
2016-01-19 18:18:03 -08:00
Adam C. Foltzer
07da2018b7
switch to more portable seeding for random
...
The `random` primitive previously took a `[32]` seed, but this causes
inconsistency between 32-bit and 64-bit platforms when the seed is large
enough to wrap around in GHC's representation of an `Int`. This patch
switches to an API that seeds directly with four 64-bit words, and so
should behave the same way on our supported platforms.
2016-01-19 18:17:34 -08:00
Thomas M. DuBuisson
46599a03b5
make SHA1 typecheck with Cryptol 2.3
...
There were some spurious constraints to help the previous typechecker figure
things out that now confuse the new one... ugh.
2016-01-12 17:22:22 -08:00
Thomas M. DuBuisson
fc04e415d7
Don't expose internal type in the Function API.
...
I've found that exposing helper types that are only of internal concern to the
function to be bad form. These values should be in where clauses both to help
the type checker not get distracted and to keep the user-facing API as clean as
possible.
2016-01-12 16:52:40 -08:00
Adam C. Foltzer
9e179d14bc
finally add Even-Mansour example; closes #124
2016-01-12 16:49:47 -08:00
Thomas M. DuBuisson
17abf37b7d
A rough cut at SIV.
2015-09-16 09:19:27 -07:00
Thomas M. DuBuisson
7643a17182
Fix #272 Don't full blocks in ChaChaPoly8675309
2015-08-28 15:22:03 -07:00
Aaron Tomb
44f8bcd310
Fix comment in Keccak example
...
Note: this is actually Cryptol 1 code. We should port it. I've started
the process, but don't have a complete port yet.
2015-08-28 09:49:29 -07:00
Dylan McNamee
f12f7d82eb
lg2 -> width
2015-04-20 10:00:25 -07:00
Iavor S. Diatchki
afd53bb6a1
Merge remote-tracking branch 'origin/master' into wip/cs
...
Conflicts:
cryptol.cabal
src/Cryptol/TypeCheck/Solve.hs
src/Cryptol/TypeCheck/Solver/CrySAT.hs
src/Cryptol/TypeCheck/Solver/Selector.hs
2015-03-30 11:29:20 -07:00
Adam C. Foltzer
0536d0f15a
update copyright years
2015-03-24 11:19:52 -07:00
Dylan McNamee
1fd98e02b0
removed property keyword from helper functions. Thanks to Joey Dodds for pointing this out.
2015-03-09 14:43:30 -07:00
Dylan McNamee
a246f25211
coins puzzle added to funstuff
2015-03-03 10:51:18 -08:00
Adam C. Foltzer
9923b6f11a
split out notebook into separate package
...
This involved:
- Moving a couple REPL modules into the Cryptol library hierarchy (those
that don't depend on console libraries)
- Splitting up the Makefile, which unfortunately resulted in a lot of
not-quite-duplication between the two Makefiles. Let's look into
better abstraction...
2015-03-02 15:46:21 -08:00
Adam C. Foltzer
adcd96fa47
make notebook distributable
...
This commit brings the notebook into the rest of the distribution
infrastructure set up for cryptol. The main points are:
- new icryptol-kernel executable
- new icryptol shell script that wraps ipython and makes sure the
cryptol profile is set up
- Makefile target for friendly local testing (`make notebook`)
- moved example notebooks to examples subdirectory
2015-02-11 16:21:43 -08:00
Adam C. Foltzer
22df9717cb
properties and cleanup for new contrib examples
2015-01-18 12:46:03 -08:00
Adam C. Foltzer
d7e9b9b3c6
add README for contrib
2015-01-18 12:45:39 -08:00
Adam C. Foltzer
473b175922
move RC4 to contrib directory
2015-01-18 11:47:40 -08:00
orchid
1f3c9b8203
RC4
2015-01-18 11:47:40 -08:00
Adam C. Foltzer
85e1725b29
Merge pull request #69 from mknight-tag/master
...
Add MKRAND RBG to contrib
2015-01-18 11:42:21 -08:00
Dylan McNamee
16bca156d7
Salsa20 working better with type checker improvements (thanks, Sean!)
2014-12-17 06:44:39 -05:00
Dylan McNamee
675ca65c9a
fixes to Salsa20 spec suggested by Sean (thanks!)
2014-10-10 12:37:10 -07:00
M Knight
ee86eb87fd
Back out ND until Cryptol exposes IO Monad [fd4f4]
2014-09-24 09:13:28 -05:00
Thomas M. DuBuisson
31f0015e8c
Merge pull request #29 from TomMD/fnv1a-example
...
Add an FNV-1a example (non-cryptographic hash).
2014-09-14 15:05:24 -07:00
Dylan McNamee
75852a2596
Merge branch 'master' of https://github.com/GaloisInc/cryptol
2014-09-10 14:27:26 -07:00
Dylan McNamee
81adb95a37
tweaks to documentation and Salsa20 fix from Sean
2014-09-10 14:27:08 -07:00
Adam C. Foltzer
a0bb572388
add note about solvers for ZUC theorem
2014-09-08 14:45:10 -07:00
Adam C. Foltzer
4622a1d177
add ZUC example, translated from Cryptol 1
2014-09-04 11:05:42 -07:00
Adam C. Foltzer
d409116160
Merge branch 'devel'
...
This was the branch I originally set up for git flow, but we're moving
to production=release and develop=master, so this branch is obsolete.
2014-08-19 10:31:31 -07:00
M Knight
502816fbd3
Add MKRAND RBG
2014-08-10 10:47:19 -05:00
Joey Dodds
7300f29606
changed collision properties to require inputs to be different
2014-08-06 10:16:14 -07:00
Joey Dodds
72fefff367
added malicious sha example
2014-08-05 14:08:30 -07:00
Joey Dodds
d248b50b40
finished test vectors
...
created function AeadConstruction that is used to generate tags in
AEAD encryption and decryption
2014-08-04 10:52:50 -07:00
Joey Dodds
72c870cb12
small fixes for push
2014-08-01 09:15:58 -07:00
Joey Dodds
00ad314681
added most of the test cases
2014-07-29 16:39:50 -07:00
Dylan McNamee
5faf927b3e
Initial (incomplete, but mostly working) version of ChaChaPoly IETF draft.
...
Original document: https://datatracker.ietf.org/doc/draft-irtf-cfrg-chacha20-poly1305/
2014-07-29 09:32:14 -07:00
Thomas M. DuBuisson
97488c0cc1
Add an FNV-1a example (non-cryptographic hash).
2014-05-29 22:13:28 -07:00
Dylan McNamee
87042d4604
fixing lone bad reference in doc, added syntax chapter, replaced Salsa spec
...
PDF with pointer to it, fixed table in section 1.2.2
2014-04-30 11:37:15 -07:00
Adam C. Foltzer
2cf71679c6
Merge branch 'master' into devel
2014-04-27 20:51:56 -07:00
David Lazar
fe67268088
Simplify type constraints.
2014-04-24 17:33:43 -04:00
David Lazar
bda2596f30
Minor whitespace tweak.
2014-04-24 17:28:25 -04:00
David Lazar
e1c2ddec55
Fix formatting in speck.cry.
2014-04-24 17:27:34 -04:00
David Lazar
46c93d1a33
spec.cry should be speck.cry.
2014-04-24 17:19:20 -04:00
Dylan McNamee
bba0c10cf7
keccak is version 1, and proving too tricky to convert for now.
...
Moving simon and spec to contrib, to "seed the pool" of contributed
examples.
2014-04-22 17:26:11 -07:00
Dylan McNamee
72d690bd9f
a little "how to run this" added to funstuff
2014-04-22 10:44:02 -07:00
Dylan McNamee
a04a2444a5
Note: NIST 180-4 has an inconsistency in section 4.1.1 - the prose
...
says 0<=t<=80, but the formula says 0<=t<=79. Later, they refer to
80 elements, so we're going with the formula's specification
2014-04-21 13:50:00 -07:00
Dylan McNamee
744808f67f
Making the SHA1 "f" look more like the NIST SHA1 "f"
2014-04-21 13:42:56 -07:00
Adam C. Foltzer
bca8d997f5
add David's Keccak implementation
2014-04-21 11:46:55 -07:00
Dylan McNamee
4f57c0a93f
polishing
2014-04-21 11:40:07 -07:00
Adam C. Foltzer
63b77b82d3
add David's Keccak implementation
2014-04-21 11:39:07 -07:00
Adam C. Foltzer
ba0a0e8576
Initial import from internal repo
2014-04-17 15:34:25 -07:00