JayDDee / cpuminer-opt

Optimized multi algo CPU miner
Other
773 stars 544 forks source link

Using algo/keccak as keccak256 library #388

Closed t-anyu closed 1 year ago

t-anyu commented 1 year ago

Hey,

How can I use algo/keccak (AVX2, AVX512 optimized) for my own project? I need to hash arbitrary length bytes.

Btw. what does 4-way and 8-way keccak mean?

Thanks

JayDDee commented 1 year ago

N-way is the number of data threads per CPU thread, it's only usefull for parallel hashing of multiple data streams. If you don't need parallel hashing you should use an existing library like SPH. Also if you need security don't use any of my code. Arbitrary length may not work with my code, some optimizations assume certain lengths. Otherwise read the code to figure it out.