Author

Topic: SHA-256 CPU support - experiences? (Read 95 times)

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
May 31, 2024, 03:36:22 AM
#5
I'm not programmer, but how about SHA-256 library which use WebAssembly such as https://github.com/Daninet/hash-wasm? Although i don't know whether such library would work on all browser or CPU.


So basically everything made in the last decade should work fine.

I see, i must've missed that earlier.

WebAssembly doesn't have to worry about supporting x86 or ARM architectures itself, the browser implementations take care of that.

I'd say this is even better than my suggestion to use a different language. I mean, this is literally assembly language after all, it just runs on the browser's engine instead of on an OS.

Weird it doesn't have to worry about CPU architecture, even though the name contain word assembly. Anyway, that means it should fulfill OP needs.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
May 30, 2024, 06:33:54 AM
#4
I'm not programmer, but how about SHA-256 library which use WebAssembly such as https://github.com/Daninet/hash-wasm? Although i don't know whether such library would work on all browser or CPU.



So basically everything made in the last decade should work fine.

WebAssembly doesn't have to worry about supporting x86 or ARM architectures itself, the browser implementations take care of that.

I'd say this is even better than my suggestion to use a different language. I mean, this is literally assembly language after all, it just runs on the browser's engine instead of on an OS.
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
May 30, 2024, 06:25:02 AM
#3
I'm not programmer, but how about SHA-256 library which use WebAssembly such as https://github.com/Daninet/hash-wasm? Although i don't know whether such library would work on all browser or CPU.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
May 30, 2024, 02:07:36 AM
#2
Have you looked at this topic? https://bitcointalksearch.org/topic/m.64140587

It will probably help you.

JS cryptographic implementations will always be slow. One, because most of the time, it is a polyfill and not implemented as some C++ library - and all web apps fall into this category - so since there's a lot of math that goes into this it's quite slow. Two, you can't multi-thread it or take advantage of hardware acceleration that might be available.
newbie
Activity: 19
Merit: 1
May 29, 2024, 08:38:36 AM
#1
i'm currently working on few projects, i want to use SHA-256 CPU support for hashing because it is more performant than JS native implementation. i tried to get details about this topic on web (stack overflow and few more forums), but i couldn't find clear answer to my question. if you have knowledge in cryptography, reply here Cheesy
Jump to: