Git Product home page Git Product logo

Comments (4)

satvikc avatar satvikc commented on July 28, 2024

There is also a problem in Hash typeclass in which you assumed message size can not be greater that sizeOf Word64

from raaz.

satvikc avatar satvikc commented on July 28, 2024

I also need 128bit Big endian Word while encoding the padding.

from raaz.

piyush-kurur avatar piyush-kurur commented on July 28, 2024

I had thought about this. No machines currently have 128-bit native integers. To accomodate sha512 we would have to
use Integer for all hashes which will unnecessarily slow down things. If you think about it. It is going to be a problem if and only if the message size goes beyond 2^64 bits which actually is quite large. about 1024 petabytes.
For network applications this limit will almost never be exceed (Think of using hmac-sha512 to compute the mac of ssh packets). What we can do is we can document this as a limitation of the library and when Word128 arrives on GHC we can implement it.

You can implement the 128 but BE padding by actually storing 2 64 bit BE numbers, the first being just 0.

from raaz.

satvikc avatar satvikc commented on July 28, 2024

Ok.. I have done sha 224,256,512 and doing sha 384. what others we have to do?

from raaz.

Related Issues (20)

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.