ethereumjs-wallet
ethereumjs-wallet copied to clipboard
fix generate now can't throw exception
Based on: fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141 Probability of throw was ~1/2**499 But after fix it should never throw
Hi there, thanks for the PR! 🙂
Could you please give some more context and explain what you are doing here?
Coverage increased (+0.05%) to 85.036% when pulling 6ee26f68184ab3d9fb7a82653904a0c5b09bb5a0 on vird:fix/generate_now_cant_throw_exception into 83c1b1aa601977e5b0bbcf3e09353c91f993ff54 on ethereumjs:master.
randomBytes(32) is used in current implementation of .generate() for generating new wallet. But this is not 100% correct way to properly generate ECDSA point for private key. My fix allows code to be formally correct and never throw exception (even with astronomically low probability)