-
Notifications
You must be signed in to change notification settings - Fork 21
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
Leverage sharded origin key #288
Leverage sharded origin key #288
Conversation
As this PR change the way to interact with blockchain from client software, we have to provide them the way to get the origin private key before merging this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
I would suggest as well to add a content formatter for the origin_shared_secrets transaction in the explorer to be able to see the public keys by parsing them.
lib/archethic/crypto.ex
Outdated
@spec get_origin_family_seed(supported_origin()) :: binary() | ||
def get_origin_family_seed(origin_id) do | ||
storage_nonce() <> | ||
case origin_id do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of putting this in the crypto.ex, you should move it to shared_secrets.ex, to avoid confusion with origin_id for public keys
Description
First software origin key is no more hardcoded but randomly generated during network init and encrypted with the hardcoded public key in secret transaction.
Hardcoded key is now able to read and decrypt first software origin key
Fixes #275
Type of change
How Has This Been Tested?
origin_shared_secret
transaction and decypt it using libjs. Resulted private key is the same that the one generated during network initChecklist: