identity.ts
identity.ts copied to clipboard
Replace encryption library
Currently used encryption library secp256k1 generates private keys of 32 byte (256 bit) size. The length can't be increased to more secure 2048 bit size.
I recommend to use node-rsa library with adjustable key size. You can find completed and tested implementation in this file
You also won't need to use an additional eciesjs
library for encryption/decryption. This functionality is provided by node-rsa