Repository navigation
SNP: add RustCrypto verification and signed workload claims for WASM - #243
Conversation
|
@mateo-moon ,您好,您的请求已接收,请耐心等待结果。 |
|
@mateo-moon ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
|
@mateo-moon ,您好,您的请求已接收,请耐心等待结果。 |
|
@mateo-moon ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
|
@mateo-moon ,您好,您的请求已接收,请耐心等待结果。 |
|
@mateo-moon ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
|
@mateo-moon ,您好,您的请求已接收,请耐心等待结果。 |
|
@mateo-moon ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
|
@mateo-moon ,您好,您的请求已接收,请耐心等待结果。 |
|
@mateo-moon ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
|
@mateo-moon ,您好,您的请求已接收,请耐心等待结果。 |
|
@mateo-moon ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
|
@mateo-moon ,您好,您的请求已接收,请耐心等待结果。 |
|
@mateo-moon ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
|
@mateo-moon ,您好,您的请求已接收,请耐心等待结果。 |
|
@mateo-moon ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
|
@mateo-moon Now that #246 is merged, please rebase this PR onto the latest |
|
@mateo-moon Thanks for your contribution. I've split the reqwest_sdk hack out into a separate PR: #246. This should help with your work; you'll probably want to rebase onto it ;) Also, I notice the SNP verifier now has two implementations (the legacy OpenSSL one and the modern RustCrypto one). For maintainability, would it make sense to unify them into a single codebase? As far as I know, ring's API is fairly close to openssl-sys, so perhaps we could use conditional compilation, or just migrate everything to ring or rust-crypto. @jiale would like your take on this. I've also noticed your PR on TNG; I'll get to that as soon as this one lands. |
2de4169 to
c873f70
Compare
|
@mateo-moon ,您好,您的请求已接收,请耐心等待结果。 |
|
@mateo-moon ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
|
Thanks @imlk0 and @jialez0! Rebased onto main including #246, removed the duplicate reqwest upgrade and Locally, all 22 SNP tests pass with each backend on Rust 1.88, along with the three artifact SDK regression tests, formatting, RustCrypto lint, and the verifier/AS WASM compile checks. Upstream CI is currently awaiting approval. On unifying the SNP verifier, I agree with the maintainability concern. Evidence parsing, certificate-chain selection, chip/TCB checks, REPORT_DATA/HOST_DATA binding, SVSM handling, and claim extraction already share one path. Conditional compilation selects the certificate and signature backend. There is still validation worth consolidating: RustCrypto explicitly restricts certificate signature parameters and the report algorithm, while the OpenSSL path delegates more to its library. My preference is shared validation with small compile-time backend adapters, backed by the same malformed-input tests. Moving SNP entirely to RustCrypto could simplify this further, but I’d treat changing the native default as a separate step. ring provides the required signature primitives, though we would still need the X.509 parsing and validation around them, so API similarity alone wouldn’t remove that work. |
|
@mateo-moon The updated code looks good to merge, and all CI checks are passing. Please rebase the branch onto the latest |
Share SNP evidence, workload-binding and claim handling across the native OpenSSL and optional RustCrypto backends. Accept current CoCo evidence without changing the signed report bytes, and exercise both backends and WASM builds in CI.
c873f70 to
95ee31d
Compare
|
@mateo-moon ,您好,您的请求已接收,请耐心等待结果。 |
|
@mateo-moon ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
|
Thanks @jialez0! Cleaned up the history into one commit on latest The source tree is unchanged from the previous head that passed all 18 checks. Fresh CI runs were triggered, but they’re awaiting maintainer approval. Could you approve those when you have a moment? |
jialez0
left a comment
There was a problem hiding this comment.
LGTM. Thanks @mateo-moon
Browser verifiers cannot use the SNP backend’s native OpenSSL dependency. Add an optional
snp-rustcryptobackend that shares the existing AMD certificate/report verification, generation/TCB, VMPL, REPORT_DATA, HOST_DATA and SVSM checks. Keep the native OpenSSL backend and its ARM-compatible signature conversion.Accept both the legacy SNP evidence schema and current CoCo AA
sev7 JSON while preserving the signed report bytes. Export AMD-signed HOST_DATA, REPORT_DATA and chip ID for EAR appraisal and transport-key/nonce binding. Browser evidence must include its AMD-signed VCEK/VLEK; browsers do not fall back to a filesystem or KDS lookup. Check certificate signature parameters and the P-384 report algorithm explicitly.Exercise RustCrypto in native test/lint jobs and the existing WASM builds. Keep the lockfile compatible with the declared Rust 1.88 toolchain and the AS test HTTP client compatible with its pinned SDK. Run the SNP checks before sudo-based tests create root-owned Cargo files.
Validation:
2de41693c4b40fbf8e86e20cba7a78817836b4bd.Upstream Actions approval remains separate from the fork validation results.