Earn Bitcoin by helping others

On BitQ&A you can get your questions answered by setting up a bounty or you can get paid by answering the community's questions.

Is it possible to use browser's crpyo primitives with bsv library?

I have some code that does a lot of HD derivation and ECIES encryption/decryption and I noticed that it runs quite slow in the browser. I did some profiling and it seems that it spends most of the time in the libraries that handle primitives (sha256 hashing, big int, …).

This makes sense as it seems that we have this primitives natively in node, but we need to use libraries in the browser. I did some Googling and it seems that newer browsers do have some support for this things so I was wondering if it is possible to use that when available? I suspect that would speed up things significantly?

I am thinking about browser’s native APIs such as SubtleCrypto and BigInt. Or even an Emscripten-compiler Javascript library such as js-nacl.

Submit an answer See answers Share on Twitter Share on Facebook

Double hash in Bitcoin

what exactly is this? Does this mean every TX gets hashed twice? How does it help to filter the content from the block chain (As Dr. Wright said)? Why cant i hash it just once and save the hash of the TX and prune the data (illegal)? Isnt the content now filtered with just a single hash? or am i getting it wrong?

Submit an answer See answers Share on Twitter Share on Facebook
Made with in Slovenia.