{"id":51041936,"url":"https://github.com/rwilliamspbg-ops/smp-tee-runtime","last_synced_at":"2026-06-22T11:30:25.800Z","repository":{"id":360492399,"uuid":"1250389948","full_name":"rwilliamspbg-ops/smp-tee-runtime","owner":"rwilliamspbg-ops","description":"A minimal, hardened Rust runtime for executing critical federated learning aggregation logic (e.g., Multi-Krum, Federated Averaging) entirely within hardware-enforced Trusted Execution Environments (TEEs) including AMD SEV-SNP, Intel SGX/TDX, and AWS Nitro Enclaves.","archived":false,"fork":false,"pushed_at":"2026-06-17T16:39:57.000Z","size":29,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-17T18:22:58.840Z","etag":null,"topics":["confidential-computing","federated-learning","network-security","nitro-enclaves","privacy-preserving-ml","rust","secure-aggregation","sev-snp","sgx","tee","trusted-execution-environment","xdp"],"latest_commit_sha":null,"homepage":"https://rwilliamspbg-ops.github.io/Mohawk-Nexus/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rwilliamspbg-ops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-26T15:26:24.000Z","updated_at":"2026-06-17T16:40:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rwilliamspbg-ops/smp-tee-runtime","commit_stats":null,"previous_names":["rwilliamspbg-ops/smp-tee-runtime"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rwilliamspbg-ops/smp-tee-runtime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwilliamspbg-ops%2Fsmp-tee-runtime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwilliamspbg-ops%2Fsmp-tee-runtime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwilliamspbg-ops%2Fsmp-tee-runtime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwilliamspbg-ops%2Fsmp-tee-runtime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rwilliamspbg-ops","download_url":"https://codeload.github.com/rwilliamspbg-ops/smp-tee-runtime/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwilliamspbg-ops%2Fsmp-tee-runtime/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34647746,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-22T02:00:06.391Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["confidential-computing","federated-learning","network-security","nitro-enclaves","privacy-preserving-ml","rust","secure-aggregation","sev-snp","sgx","tee","trusted-execution-environment","xdp"],"created_at":"2026-06-22T11:30:24.829Z","updated_at":"2026-06-22T11:30:25.790Z","avatar_url":"https://github.com/rwilliamspbg-ops.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# smp-tee-runtime\n\nA hardened, minimal Rust runtime for federated-learning aggregation inside TEEs (SGX/TDX/SEV-SNP/Nitro).\n\n## Quickstart\n\n1. Build and test the crate locally:\n\n```bash\ncargo build\ncargo test\n```\n\n2. Run the example flows that demonstrate the public API:\n\n```bash\ncargo run --example basic_tee_call\ncargo run --example xdp_integration\n```\n\n3. Run the benchmark suite that tracks aggregation and ingress simulation cost:\n\n```bash\ncargo bench --bench aggregation\n```\n\n## Repository layout\n\n```text\nsmp-tee-runtime/\n├── Cargo.toml\n├── src/\n│   ├── lib.rs\n│   ├── main.rs\n│   ├── tee_interface/\n│   │   ├── mod.rs\n│   │   └── traits.rs\n│   ├── data_pipeline/\n│   │   ├── mod.rs\n│   │   └── xdp_ingress.rs\n│   └── aggregation/\n│       ├── mod.rs\n│       └── multi_krum.rs\n├── build-scripts/\n├── examples/\n│   ├── basic_tee_call.rs\n│   └── xdp_integration.rs\n├── benches/\n│   └── aggregation.rs\n├── tests/\n│   └── end_to_end.rs\n├── CONTRIBUTING.md\n└── SECURITY.md\n```\n\n### Targeted builds\n\n- SGX/TDX: `cargo build --target \u003csgx-specific-toolchain\u003e`\n- SEV-SNP: build inside an SNP-enabled guest VM/toolchain environment.\n\n## Performance Tracking\n\nThe table below records the current Criterion results for the shipped benchmark target.\n\nCollected on May 26, 2026 in the Ubuntu 24.04.4 LTS dev container with `stable-x86_64-unknown-linux-gnu` and `rustc 1.95.0` using `cargo bench --bench aggregation`.\n\n| Benchmark | Current result | What it measures |\n| --- | --- | --- |\n| `federated_averaging` | 35.325 ns to 36.458 ns | Mean aggregation over a small in-memory batch |\n| `multi_krum` | 3.5111 ns to 3.6398 ns | Robust aggregation selection for a small candidate set |\n| `simulated_packet_pointer_pass_1m` | 630.24 µs to 644.61 µs | Pointer-passing overhead for a 1M-packet ingress simulation |\n\n### Refresh Performance Numbers\n\nUse this exact workflow when updating the table above:\n\n```bash\ncargo bench --bench aggregation\n```\n\nUpdate the table only when the new Criterion results are meaningfully different from the current values.\n\n## Example end-to-end flow\n\n```bash\ncargo run --example xdp_integration\n```\n\nThis demonstrates: XDP-like ingress packet view -\u003e TEE memory write -\u003e aggregation -\u003e output.\n\n## Library Usage\n\nUse the public API directly when embedding the runtime in another Rust crate. The snippet below shows the same in-memory flow that the end-to-end tests exercise:\n\n```rust\nuse smp_tee_runtime::{AggregationAlgorithm, ComputationParams, InMemoryTee, TeeGuard};\n\nlet mut tee = InMemoryTee::default();\ntee.initialize().expect(\"TEE init failed\");\n\nlet left = tee.allocate_memory(8).expect(\"left allocation failed\");\nlet right = tee.allocate_memory(8).expect(\"right allocation failed\");\n\nlet _result = tee\n    .execute_computation(\n        \u0026[left.cast_const(), right.cast_const()],\n        \u0026ComputationParams {\n            algorithm: AggregationAlgorithm::FederatedAveraging,\n        },\n    )\n    .expect(\"aggregation failed\");\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwilliamspbg-ops%2Fsmp-tee-runtime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frwilliamspbg-ops%2Fsmp-tee-runtime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwilliamspbg-ops%2Fsmp-tee-runtime/lists"}