• 简体中文
  • BSV
  • mBSV
  • Bits
  • Sat


( - )
2019-11-18 10:31:10
2,383 B

8 Inputs

Total Input:
Total Output:

4 Outputs

Total Output:
  • j"19HxigV4QyBv3tHpQVcUEQyq1pzZVdoAutMð# 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](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto) and [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt). Or even an Emscripten-compiler Javascript library such as [js-nacl](https://github.com/tonyg/js-nacl). text/markdownUTF-8 question.md