crypto-com / defi-wallet-core-rs

Cross-platform, cross-blockchain wallet library in Rust for DeFi Wallet and other applications.
Other
48 stars 16 forks source link

Problem: ed25519-signing is not supported #415

Open feizzhang opened 2 years ago

feizzhang commented 2 years ago
  1. Currently only supported sepc256k1 signature,not ed25519.
  2. The only exported struct is secret_key, but no public_key and signature.
  3. Hoping there is only a mod for crypto.
  4. Hoping the crypto have the uniform style. such as sign verify convert from/to string/bytes.
tomtau commented 2 years ago

@feizzhang just be careful about key recovery attacks: https://github.com/solana-labs/solana/issues/6301#issuecomment-551184457 https://github.com/w3f/hd-ed25519 https://github.com/oasisprotocol/oasis-core/blob/master/docs/adr/0008-standard-account-key-generation.md

https://raw.githubusercontent.com/LedgerHQ/orakolo/master/papers/Ed25519_BIP%20Final.pdf

Maybe bip32-ed25519 is the most reasonable option? Or what derivation scheme does NEAR use?

tomtau commented 2 years ago

It seems Ledger app uses SLIP10: https://github.com/LedgerHQ/app-near/blob/master/workdir/app-near/src/crypto/ledger_crypto.c#L24 but that may not be ideal... maybe can have a choice?