Code Monkey home page Code Monkey logo

digest's People

Contributors

danieldk avatar jkff avatar joeyadams avatar juhp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

digest's Issues

Wording should be fixed to avoid calling these "cryptographic"

Checksums aren't generally called hashes and these ones certainly aren't cryptographic. We should change the wording to reflect this fact.

An easy proof that alder32 is not cryptographic is in the simplicity of discovering a collision which, by definition, is computationally infeasible against a cryptographic hash. For example:

% cat adler.cry
import Cryptol::Extras

MOD_ADLER : [32]
MOD_ADLER = 65521

adler32 : {n} (fin n, n >= 0) => [n][8] -> [32]
adler32 dat = ((ys ! 0).1 << 16) || (ys ! 0).0
 where
 ys = [(1,0)] # [ (domod (a + pad d), domod (b + a)) | (a,b) <- ys | d <- dat ]
 domod x = x % MOD_ADLER
 pad x = zero # x
% cryptol adler.cry
Main> :sat \x y -> adler32 (x : [2][8]) == adler32 (y : [3][8])
(\x y -> adler32 (x : [2][8]) == adler32 (y : [3][8]))
  [0x7f, 0x10] [0x0e, 0x62, 0x1f] = True

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.