argentlabs / web3.swift

Ethereum Swift API with support for smart contracts, ENS & ERC20
MIT License
668 stars 168 forks source link

Security Enhancement. #346

Closed bobgodwinx closed 9 months ago

bobgodwinx commented 9 months ago

I saw this line of code and I was wondering should we not encrypt the key before storing it ?

NSKeyedArchiver.archiveRootObject is for storing setting etc .. it's not secure. I would suggest using the keychain or a symmetric key derivation via the user password to store the privateKeys.

DarthMike commented 9 months ago

EthereumKeyLocalStorage is not supposed to be used as-is, it's only an example. Maybe it's not clear in the codebase, and possibly be removed.