idris-hackers / idris-crypto Goto Github PK
View Code? Open in Web Editor NEWImplementation of cryptographic primitives using Idris
License: BSD 3-Clause "New" or "Revised" License
Implementation of cryptographic primitives using Idris
License: BSD 3-Clause "New" or "Revised" License
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
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 expressione
with base typea
that computes
over some secret information can be given the typetype 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 byb
, we just need to show that the function
let cpaโ p = encrypt (sample n) p
has the typeblock โ 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.
There's a port of inductive binary number arithmetics in the works at https://github.com/sbp/idris-bi/, which I suspect will work much faster than Fin
(though the analogue of Fin
still has to be defined).
./Data/Mod.idr:75:16-30:
|
75 | implementation Neg (Mod (S n)) where
| ~~~~~~~~~~~~~~~
Data.Mod.abs not a method of interface Neg
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.