emn178 / js-sha3

A simple SHA-3 / Keccak hash function for JavaScript supports UTF-8 encoding.
MIT License
354 stars 86 forks source link

Feature Request: KangarooTwelve and MarsupilamiFourteen #18

Closed DonaldTsang closed 3 years ago

DonaldTsang commented 6 years ago

Reference: https://github.com/XKCP/XKCP/blob/master/Standalone/KangarooTwelve/Python/K12.py
https://keccak.team/kangarootwelve.html and https://keccak.team/files/KangarooTwelve.pdf

paulmillr commented 3 years ago

Just wanted to mention that we've coded pure-typescript implementation of Kangaroo12 and Marsupilami14 here: https://github.com/paulmillr/noble-hashes

As lightweight as possible. K12 code itself is just 100 lines of code.

DonaldTsang commented 3 years ago

This looks good, but pure JS vs pure TS seems to differ in ease-of-usage

paulmillr commented 3 years ago

@DonaldTsang not really. Typescript is compiled to JS. We distribute js libs and js npm package. Typescript is extremely useful for typings / developer experience and I would argue it's easier with them than without them.

As for "ease of usage", it's the same: you install NPM package and use it. No difference.

DonaldTsang commented 3 years ago

For those that are beginner, it would be useful to have a compiled JS script to be in the repo as well.