0xMiden / 0xMiden/miden-proposals
Implement Precompiles for Efficient Cryptography and ZK Proof Verification
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 1
- Fork
- 1
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
## TL;DR
Miden VM is designed for STARK-based proving, and while this enables parallelization and recursion, it makes certain algorithms prohibitively expensive to execute natively. We will build a [canonical interface for adding precompiles](https://github.com/0xMiden/miden-vm/issues/1796), and we're looking for a team to help build a first set of essential precompiles.
The goal is to support cryptographic primitives and proof systems that are currently inefficient or infeasible to implement directly in Miden Assembly, like eliptic curves.
---
## Problem
Miden’s core proving model excels at operations optimized for STARKs, but struggles with:
- Elliptic curve operations not friendly to STARKs (e.g., secp256k1 for ECDSA)
- Hash functions like Keccak (used in Ethereum compatibility)
- Recursive SNARK/STARK verification (e.g., SP1 or RISC Zero proofs)
These operations are foundational for:
- Verifying Ethereum and Solana signatures
- Bridging with EVM ecosystems
- Verifying off-chain computations (via recursive proofs)
- Integrating external ZK circuits or proving systems
- Oracles
Running these computations inside the Miden VM as MASM code is currently **too slow or too expensive** to be practical.
---
## Objective
We want to implement **precompiles** — native host functions callable from within the Miden VM — to enable the above use cases.
---
## Scope
Implement precompiles for:
1. **ECDSA (secp256k1)**: Signature verification for Ethereum-style accounts
2. **EdDSA (ed25519)**: Signature verification for Solana-style accounts
3. **Keccak-256**: Hash function used widely in EVM compatibility
4. **Proof verification**:
- **SP1** proofs
- **RISC Zero** proofs
---
## Proof of Concept Phase
The first goal is a working proof-of-concept:
- The precompiles are callable via the interface defined in [#1796](https://github.com/0xMiden/miden-vm/issues/1796)
- Each function should accept inputs in a Miden-compatible format (stack, memory, or note inputs)
- Return valid results verifiable inside the Miden VM
- Include simple test vectors or benchmarks
- Maybe: batching of signature verification using Miden's recursion
---
## Final Product
A production-ready implementation should include:
- Performance-optimized precompile logic
- Miden SDK integration
- Benchmarks for runtime and constraint cost
- Documentation and usage examples
- Defined performance targets (to be specified)
---
## Desired Expertise
We are looking for a team with experience in:
- Cryptographic implementation (especially ECDSA, EdDSA and Keccak)
- ZK proof systems and recursive verification
- Rust (the Miden VM is implemented in Rust)
- WASM or host binding experience is a plus
---
## Interested?
If you're interested in contributing to this effort or have relevant experience, please comment below or reach out directly. Let us know:
- Which precompile(s) you're interested in tackling
- Your relevant experience
- Timeline or availability for PoC and full implementation
Let's make Miden composable and interoperable without compromising on performance or privacy! 🔧🧪
Hướng dẫn đóng góp
Hướng nghiên cứu
Xem xét thiết kế giao diện chuẩn trong issue #1796. Công việc liên quan đến việc triển khai các hàm máy chủ gốc bằng Rust cho các nguyên thủy mật mã (secp256k1, ed25519, Keccak-256) và xác minh bằng chứng (SP1, RISC Zero). Bắt đầu bằng cách hiểu giao diện lệnh gọi máy chủ của Miden VM và cách đầu vào/đầu ra được truyền. 'Hoàn thành' có nghĩa là mỗi hàm tiền biên dịch có thể được gọi, trả về kết quả có thể xác minh và có các vector kiểm tra.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- rust, wasm
- Lĩnh vực
- backend, blockchain, cryptography
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 25/100