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

feat(tee-proof-verifier): add support for Solidity-compatible pubkey in report_data #240

Conversation

pbeza
Copy link
Contributor

@pbeza pbeza commented Dec 31, 2024

This PR is part of the effort to implement on-chain TEE proof verification. This PR goes hand in hand with:

Verified

This commit was signed with the committer’s verified signature.
pradyunsg Pradyun Gedam
@pbeza pbeza marked this pull request as ready for review December 31, 2024 14:52
@pbeza pbeza requested a review from a team as a code owner December 31, 2024 14:52
@pbeza pbeza changed the base branch from pab/solidity-compatible-pubkey-in-report-data to main December 31, 2024 15:58
@pbeza pbeza force-pushed the pab/solidity-compatible-offchain-proof-verifier branch 2 times, most recently from 97a37fd to 5ac5999 Compare December 31, 2024 17:51
@pbeza pbeza changed the base branch from main to pab/solidity-compatible-pubkey-in-report-data January 2, 2025 10:01
@pbeza pbeza force-pushed the pab/solidity-compatible-offchain-proof-verifier branch 4 times, most recently from c7be253 to cd9ba04 Compare January 3, 2025 09:46
…in report_data

This PR is part of the effort to implement on-chain TEE proof
verification. This PR goes hand in hand with:
- matter-labs/zksync-era#3414
- #228
@pbeza pbeza force-pushed the pab/solidity-compatible-offchain-proof-verifier branch from cd9ba04 to bdb213c Compare January 3, 2025 10:28
…action-30.x

chore(deps): update cachix/install-nix-action action to v30
Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
fix(teepot-tee-quote-verification-rs): memory leak
Free the FFI collateral on rust checks anyway to prevent memory leaks.

Also remove the `TryFrom<&sgx_ql_qve_collateral_t>` as it is unsafe.

Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
fix(teepot-tee-quote-verification-rs): free collateral on ffi error
haraldh and others added 5 commits January 14, 2025 14:50
Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
feat(tdx): add nix build for TDX google VMs
Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
feat(tee-key-preexec): add test container for tee-key-preexec
…le-offchain-proof-verifier
@pbeza
Copy link
Contributor Author

pbeza commented Jan 15, 2025

Closing in favor of #251.

@pbeza pbeza closed this Jan 15, 2025
github-merge-queue bot pushed a commit to matter-labs/zksync-era that referenced this pull request Feb 17, 2025
## What ❔

This PR is part of the effort to implement on-chain TEE proof
verification. Signatures produced by the TEE Prover are now compatible
with the on-chain verifier that uses the `ecrecover` precompile.

## Why ❔

Until now, we've been using _non-recoverable_ signatures in the TEE
prover with a compressed ECDSA public key in each attestation – it was
compressed because there are only 64 bytes available in the report
attestation quote. That worked fine for off-chain proof verification,
but for on-chain verification, it's better to use the Ethereum address
derived from the public key so we can call `ecrecover` in Solidity to
verify the signature.

This PR goes hand in hand with:
- matter-labs/teepot#228
- matter-labs/teepot#240
- matter-labs/teepot#245

## Checklist

- [x] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [x] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [x] Code has been formatted via `zkstack dev fmt` and `zkstack dev
lint`.

---------

Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
Co-authored-by: Harald Hoyer <harald@matterlabs.dev>
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.

None yet

2 participants