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

AEX-3: what does secret_type mean? #27

Closed
davidyuk opened this issue May 20, 2019 · 6 comments
Closed

AEX-3: what does secret_type mean? #27

davidyuk opened this issue May 20, 2019 · 6 comments

Comments

@davidyuk
Copy link
Member

Its current value ed25519 is ambiguous, for example, it can be just a private key, or a key that is for the derivation of child account that will use the same curve for signing. Is it correct to use AEX-3 for arbitrary data or it should be somehow related to user accounts?

@shekhar-shubhendu
Copy link
Contributor

@davidyuk the first part is not very clear as I don't know how base app generates child accounts. can you please expand on this?
AEX-3 allows arbitrary data and recommends that it should be user related but it can not enforce the type of data the wallet can store.

@davidyuk
Copy link
Member Author

Here is my implementation of account derivation in Base app: https://github.com/aeternity/hd-wallet-js/blob/master/src/hd-wallet.js
And some explanations: aeternity/aepp-sdk-js#41 (comment)

If secret_type doesn't have any strict meaning, let's drop it for now.

@shekhar-shubhendu
Copy link
Contributor

@knarz will be able to provide more information on this since he is the original author here.

@knarz
Copy link
Contributor

knarz commented May 28, 2019

Right now I imagine the secret_type to be taken quite literally in the sense that it is a private key, which should be used to generate signatures according to ed25519.
I'd rather include more types and keep the field around s.t. the files can be self-contained.
Otherwise we either specify that a version field with value 1 should indicate to a reader that it contains above key material or we add more types to the spec. What would you suggest?

@davidyuk
Copy link
Member Author

davidyuk commented Jun 3, 2019

I think AEX-3 becomes more useful if we get rid of the ambiguity of secret_type field by adding more types like:

  • ed25519-bip39-mnemonic, or just mnemonic?
  • ed25519-slip0010-masterkey
  • aex*-account -- a key that can be used to derive subaccounts
  • aex*-keypair -- derived key

where aex* is a standard explaining account derivation. Also, it is important to define the payload layout for all types to get consistent implementations.

@knarz
Copy link
Contributor

knarz commented Jun 27, 2019

Addressed in b762e6d, please re-open if that doesn't solve the problem

@knarz knarz closed this as completed Jun 27, 2019
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

3 participants