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

SGX Validation #1

Open
platten opened this issue Feb 18, 2022 · 1 comment
Open

SGX Validation #1

platten opened this issue Feb 18, 2022 · 1 comment
Assignees
Labels

Comments

@platten
Copy link
Contributor

platten commented Feb 18, 2022

No description provided.

@haraldh
Copy link
Member

haraldh commented Oct 27, 2022

Besides checking:

            let hash = Sha256::digest(&cri.public_key.to_vec()?);
            if hash.as_slice() != &rpt.reportdata[..hash.as_slice().len()] {
                return Err(anyhow!("sgx report data is invalid"));
            }

only this check is necessary:

            if rpt.mrenclave != HASH_OF_SGX_SIGNING_KEY_PROVIDED_BY_CONFIG {
                return Err(anyhow!("untrusted enarx runtime"));
            }

The other fields are mostly checked by the SGX firmware already.

Maybe these could be checked also, if they >= a configured value.

            if rpt.cpusvn != [0u8; 16] {
                return Err(anyhow!("untrusted cpu"));
            }
            if rpt.enclave_security_version() < u16::MAX {
                return Err(anyhow!("untrusted enclave"));
            }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants