Git Product home page Git Product logo

idris-crypto's People

Contributors

clayrat avatar esmooov avatar gitter-badger avatar jfdm avatar sellout avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

idris-crypto's Issues

MD5 doesn't typecheck

When I try to build the package, this error message is displayed. I am currently using Windows 8.

Type checking .\Data\Crypto\Hash\MD5.idr
.\Data\Crypto\Hash\MD5.idr:85:15:
   |
85 | shouldMatch_a : hashMessage dummyMD5 (map (intToBits {n=8}) [97]) = intToBits 0x0cc175b9c0f1b6a831c399e269772661
   |               ^
When checking type of Data.Crypto.Hash.MD5.shouldMatch_a:
Can't find implementation for Hash phTy b outputLength

make security properties of block cypher etc. evident in types

I found the Probabilistic relational verification types work in the F* project very interesting:

Recall that non-interference means that public results do not
depend on secrets. If an expression e with base type a that computes
over some secret information can be given the type

type eq a = x:a{|L x = R x|}

then its result can be safely published, since the execution of e
reveals no information about the secrets.
...
In cryptography, confidentiality is usually stated
as resistance against chosen-plaintext attacks (CPA) ... Instead of reasoning about
two messages selected by b, we just need to show that the function
let cpaโ€™ p = encrypt (sample n) p has the type block โ†’ eq block .

I'm not quite sure how well F* effects translate to idris effects, but it seems to me that it's essential to represent these security properties in the types, and not just the number of bits and bytes in the input and output parameters.

All this type tells me is that the function goes from some number of bits to bits; it doesn't express any actual security properties:

encryptBlock : k -> Bits bitsPerBlock -> Bits bitsPerBlock

The identity function satisfies that type, as do constant functions, etc.

Does not compile with Idris 1.2.0

./Data/Mod.idr:75:16-30:
   |
75 | implementation Neg (Mod (S n)) where
   |                ~~~~~~~~~~~~~~~
Data.Mod.abs not a method of interface Neg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.