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

fix: fix derive key and update remote attestation #2303

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

HashWarlock
Copy link
Collaborator

@HashWarlock HashWarlock commented Jan 14, 2025

Relates to

Re-implements #2039 and updates Remote Attestations to have more content to ensure older generated RA Quotes cannot be used to as a fake verifiable quote.

Risks

Low

Background

Currently, the derive key function will use the WALLET_SECRET_SALT to generate a key for the agent. This is okay for single agent deployments, but the subject field is used for the certificate chain and will not generate a new key if the WALLET_SECRET_SALT is changed during an upgrade. This change moves the WALLET_SECRET_SALT to the path parameter and uses the subject parameter to define the type of wallet (i.e solana, evm).

Another problem with the current remote attestations is that not enough content is added to the RA Quote reportData parameter. Currently, we only include the agentId and this will become troublesome bc anyone can repurpose the quote to fool users into believing the quote generated is valid.

What does this PR do?

This PR fixes the derive key function for solana and evm chains to generate a new keypair when the WALLET_SECRET_SALT is changed and provides clarity on the parameters.

For RA, this fix will add the message contents to the RA Quote to give more verifiability into a quote so users cannot take an existing remote attestation and repurpose it for malicious reasons.

What kind of change is this?

improvements and fixes

Documentation changes needed?

Updated the TEE Docs in PR

Testing

Where should a reviewer start?

Detailed testing steps

Copy link
Member

@shakkernerd shakkernerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@shakkernerd shakkernerd merged commit d3305c3 into elizaOS:develop Jan 14, 2025
8 checks passed
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

Successfully merging this pull request may close these issues.

2 participants