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

[CLI][Ledger] Incorporate key rotation support for Ledger #13515

Closed
5 tasks done
alnoki opened this issue Jun 1, 2024 · 2 comments
Closed
5 tasks done

[CLI][Ledger] Incorporate key rotation support for Ledger #13515

alnoki opened this issue Jun 1, 2024 · 2 comments
Labels
enhancement New feature or request stale-exempt Prevents issues from being automatically marked and closed as stale

Comments

@alnoki
Copy link
Contributor

alnoki commented Jun 1, 2024

Overview

It should now be possible to rotate an account's authentication key to be secured by a Ledger hardware wallet. Implementation steps below, detailed background at bottom.

Implementation roadmap

In Ledger library

In CLI

Background

In #11151, I attempted to update the CLI to support key rotation to a Ledger wallet. However, this was blocked by the Ledger's inability to sign an arbitrary message, as required for the RotationProofChallenge. @hardsetting began collaborating with @vldmkr on adding blind signing functionality for the Ledger and I put Ledger key rotation efforts on hold.

Recently, during an in-person discussion with @davidiw, @gedigi, @hariria, and @xbtmatt, I learned about the introduction of rotate_authentication_key_call, so I submitted aptos-labs/developer-docs#367 to demonstrate how the new function could enable key rotation to and from a Ledger hardware wallet without getting blocked by the RotationProofChallenge signing process.

During PR review, @gregnazario left comment aptos-labs/developer-docs#367 (comment), which I interpreted as a suggestion to update the CLI to use rotate_authentication_key_call instead of the existing
rotate_authentication_key.

However, since the existing CLI implementation relies on rotate_authentication_key, CLI rotations result in updates to the OriginatingAddress table, which would not be the case for rotate_authentication_key_call if it were to be incorporated in the CLI unless some kind of reconciliation function were added to the framework. (For example a function like account::ensure_originating_address_for_account, as proposed in #13517).

Even if a followup reconciliation function were to be added, however, it would still complicate the process due to the two-transaction process required when rotating via rotate_authentication_key_call.

While doing this writeup, I stumbled upon LedgerHQ/app-aptos#13 (comment), which indicates to me that arbitrary message signing is probably now available in the Ledger app API, such that a Ledger can indeed sign a RotationProofChallenge.

@alnoki
Copy link
Contributor Author

alnoki commented Aug 12, 2024

Closed per #14084

@alnoki alnoki closed this as completed Aug 12, 2024
@github-project-automation github-project-automation bot moved this from 🎉 New to ✅ Done in Developer Experience Aug 12, 2024
@AlexNaumov616
Copy link

Dear Frends !I need help!
I cannot use the resources of my aptos wallet stored on ledger.I found a transaction in the browser :rotation authentication key call.I remembered that I signed the transaction for the distribution of airdrop.Now the Bad account authentication key error occurs when signing.What should I do?Help please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale-exempt Prevents issues from being automatically marked and closed as stale
Projects
Archived in project
3 participants