simplito / elliptic-php

Fast, general Elliptic Curve Cryptography library. Supports curves used in Bitcoin, Ethereum and other cryptocurrencies (secp256k1, ed25519, ..)
MIT License
220 stars 52 forks source link

Modernize: use sensitive parameter for keys #45

Closed DubbaThony closed 1 year ago

DubbaThony commented 1 year ago

New PHP has #[\SensitiveParameter]. I think it would be great to have it added, for example to ec->keyFromPrivate($key) since handling keys is handling sensitive information.

What this does, is hides key from stack traces and such.

ldudzsim commented 1 year ago

Feel free to prepare MR

DubbaThony commented 1 year ago

Done. See #46

DubbaThony commented 1 year ago

@ldudzsim Please double check if I didn't miss any privkey anywhere.