Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: ed25519-signing is not supported #415

Open
feizzhang opened this issue May 27, 2022 · 2 comments
Open

Problem: ed25519-signing is not supported #415

feizzhang opened this issue May 27, 2022 · 2 comments

Comments

@feizzhang
Copy link

feizzhang commented May 27, 2022

  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 tomtau changed the title supporting ed25519 for NEAR Problem: ed25519-signing is not supported May 27, 2022
@tomtau
Copy link
Contributor

tomtau commented May 27, 2022

@feizzhang just be careful about key recovery attacks: solana-labs/solana#6301 (comment)
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
Copy link
Contributor

tomtau commented May 27, 2022

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?

feizzhang added a commit that referenced this issue Jun 1, 2022
- [x] modularity
  - [x] crypto operation is in one mod. algorithm includes ed25519 secp256k1 and more。struct includes secret_key public_key and pair_key.
  - [x] errors is in one mod,and in the crypto directory。
  - [x] crypto mod only handle related operations of sign. no associated with specific chain.
- [x] interface adjustment
   - unify key string format:key_type:encode_type:xxxxxxxxx
- [ ] detailed document

issue: Problem: ed25519-signing is not supported #415
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants