Comments (8)
It appears to be a padding issue.. NIST changed the padding to be:
SHA3-256(M) = K ECCAK [512] (M || 01, 256);
But this implementation doesn't account for the 01 bits in the padding. After padding the empty string, the first byte should be '06', not '01', to account for the extra 01 at the start (6 = 00000110, reversing endian = 01100000, the current padding is 10000......, but the proper padding is that one, 01 then 10000.......
from sha3.
@iagox86 This version of the gem is based on the original (optimized) C reference implementation released by Keccak team. I know that they have updated their implementation, and provide FIPS 202 support, but the gem's backing code MAY require a good amount of rewrite. Nonetheless, this is something I've been wanting to do, and I suppose it should be done sooner rather than later.
I'll look into this, but considering my schedule, I'm doubtful that I'll be able to complete a new release quickly (2 - 3 weeks would be optimistic). Of course, pull requests are welcome. :)
from sha3.
@iagox86 Quick update: I've managed to get SHA3-256 (FIPS 202) tests to pass. There is still quite a bit of work that needs to be done, but I should have it completed sooner than 2-weeks.
from sha3.
Sweet, thanks!
On Wed, Oct 21, 2015 at 11:34 AM, Johanns Gregorian <
[email protected]> wrote:
@iagox86 https://github.com/iagox86 Quick update: I've managed to get
SHA3-256 (FIPS 202) tests to pass. There is still quite a bit of work that
needs to be done, but I should have it completed sooner than 2-weeks.—
Reply to this email directly or view it on GitHub
#6 (comment).
from sha3.
@iagox86 I think it's done. I haven't cut a new gem yet, but you can grab a pre-release here:
https://github.com/johanns/sha3/releases/tag/v1.0.1
A few notes:
- There is no Keccak (non-FIPS) mode -- in other words, it's not backwards compatible (but fully SHA3 compliant). I didn't think this was necessary/required, and it was simpler to replace, rather than augment.
- I haven't implemented SHAKE128/256 functions, yet.
Let me know if this meets your expectations, and/or if you find any bugs.
from sha3.
Awesome, I'll check it out! Thanks for the update!
On Thu, Oct 22, 2015 at 12:11 AM, Johanns Gregorian <
[email protected]> wrote:
@iagox86 https://github.com/iagox86 I think it's done. I haven't cut a
new gem yet, but you can grab a pre-release here:https://github.com/johanns/sha3/releases/tag/v1.0.1
A few notes:
- There is no Keccak (non-FIPS) mode -- in other words, it's not
backwards compatible (but fully SHA3 compliant). I didn't think this was
necessary/required, and it was simpler to replace, rather than augment.- I haven't implemented SHAKE128/256 functions, yet.
Let me know if this meets your expectations, and/or if you find any bugs.
—
Reply to this email directly or view it on GitHub
#6 (comment).
from sha3.
Just letting you know that (at least for what I'm doing), it's working perfectly!
from sha3.
@iagox86 - Thanks for the feedback!
from sha3.
Related Issues (13)
- Seems like this gem's 512 result is not the same as phusion / digest-sha3-ruby HOT 1
- Support --disable-march-tune-native HOT 4
- ruby 3.1 compatibility: error: '__declspec' attributes are not enabled HOT 4
- can't build gem: possible bug in the tools you use to build with? HOT 1
- CVE-2022-37454 Buffer overflow HOT 2
- SHAKE128/SHAKE256 support HOT 1
- error in readme (usage > basics) HOT 2
- Loading this gem breaks OpenSSL HMAC HOT 4
- HMAC? HOT 2
- `:SHA512` does not output a correct hash HOT 2
- Error whille Installing on Raspbian OS HOT 5
- How can I use sha3 with OpenSSL in ruby? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sha3.