Security Consideration for Deterministic Keygen #18
Replies: 1 comment 6 replies
-
Here is a walk-through (total Signatures + Transactions) of how things work on the client:
Note:
There are basically,
Thinking out loud: I guess if we generate another |
Beta Was this translation helpful? Give feedback.
-
Our current deterministic keygen is simple HKDF design easy to explain and implement.
In worst case of deterministic keys or signature leakage we don't have good enough plans so it'll open up for bruteforce attacks on password after key/signature leak from users signing ditto requests on bad clients.. actual ownership of domain is never compromised as resolver doesn't handle domain ownership, as last line of defense users can eject resolver and/or change ownership of their domain to gain full control of everything again.
Condition Red:
quick fix A OR B:
A) simple : hashing password with user data and add that hash in signature request, it'll close that bruteforce surface.
let statement =
Requesting signature for IPNS key generation\n\nUsername: ${ens}\nExtradata: ${<keccak256(ens, password?password:"", caip10)>}\nSigned By: ${caip10}
, better to make password non-optional in this case and use that to encrypt deterministic ipns/signer keys stored on client.B) hard : next level after HKDF is PBKDF or Scrypt like.. better we don't complicate for now, but for our CAIP we can let App-specific sides select their own algo to generate hashkey before plugging that to hash-to-privkey function.
Extra security : clients should handle keys more seriously, delete keys after use or encrypt keys with password if it's saved on client side after use. Possibly use MM/wallet's encrypt/decrypt features, some wallets don't support.. we can always generate extra secp256k1 signer key for records on client side to pair with IPNS keys instead of bugging wallet for multiple signature requests for records signing.
Beta Was this translation helpful? Give feedback.
All reactions