margelo / react-native-quick-crypto

⚡️ A fast implementation of Node's `crypto` module written in C/C++ JSI
Other
627 stars 79 forks source link

createSign not working consistently for non-RSA keys #307

Open Fabian-Lobnig opened 3 weeks ago

Fabian-Lobnig commented 3 weeks ago

Hi,

I tested createSign with secp256k1 and secp256r1 key input and it randomly produces incorrect signatures but sometimes correct ones - I cross tested this with NodeJS which gives me this error whenever there is an incorrect signature:

error: Signature without r or s
      at assert (node:crypto:2371:39)
      at new Signature (node:crypto:7569:45)
      at node:crypto:7699:75

(As temporary workaround I used @noble-curves)