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

Creating Rsa3072KeyPair under ucrypto feature panics #456

Open
Kailai-Wang opened this issue Mar 24, 2024 · 6 comments
Open

Creating Rsa3072KeyPair under ucrypto feature panics #456

Kailai-Wang opened this issue Mar 24, 2024 · 6 comments

Comments

@Kailai-Wang
Copy link

Kailai-Wang commented Mar 24, 2024

I'm using the branch v2.0.0-preview-11-17, creating Rsa3072KeyPair works for tcrypto feature (within enclave) but not with ucrypto for non-enclave.

It can be reproduced by:

use sgx_crypto::rsa::Rsa3072KeyPair;
fn main() {
    let _ = Rsa3072KeyPair::create().unwrap();
}

Running it gives SGX unexpected error:

called `Result::unwrap()` on an `Err` value: Unexpected

Dependency in TOML:

[dependencies]
sgx_crypto = { git = "https://github.com/apache/incubator-teaclave-sgx-sdk", branch = "v2.0.0-preview-11-17", default-features = false, features = ["ucrypto"] }
@volcano0dr
Copy link
Contributor

Thank you for reporting this issue.
Fixed. commit

@Kailai-Wang
Copy link
Author

Thanks!

@Kailai-Wang
Copy link
Author

I'm trying to apply newer intel-sdk version to v2.0.0 branch and this problem seems to occur again with intel-sdk-2.21, I'm referring to this dexlabs' version on v2.0.0-sgx-emm branch

It seems I'll get Unexpected error with or without this fix.

To reproduce this, simply change the TOML dep to:

sgx_crypto = { git = "https://gitlab.com/dexlabs/incubator-teaclave-sgx-sdk", rev = "1b80455857b16fef02348a5b6db01f2888a49fd5", default-features = false, features = ["ucrypto"] }

@Kailai-Wang Kailai-Wang reopened this May 4, 2024
@yangfh2004
Copy link

yangfh2004 commented May 6, 2024

I'm trying to apply newer intel-sdk version to v2.0.0 branch and this problem seems to occur again with intel-sdk-2.21, I'm referring to this dexlabs' version on v2.0.0-sgx-emm branch

It seems I'll get Unexpected error with or without this fix.

To reproduce this, simply change the TOML dep to:

sgx_crypto = { git = "https://gitlab.com/dexlabs/incubator-teaclave-sgx-sdk", rev = "1b80455857b16fef02348a5b6db01f2888a49fd5", default-features = false, features = ["ucrypto"] }

@Kailai-Wang Thanks for reporting, I am the maintainer for DEX Labs' fork. I am not sure that if I have rebased @volcano0dr fix to our fork. I will take a look and reply to you. Meanwhile, you are welcome to check it and report issues to the gitlab issues.

@Kailai-Wang
Copy link
Author

I'm trying to apply newer intel-sdk version to v2.0.0 branch and this problem seems to occur again with intel-sdk-2.21, I'm referring to this dexlabs' version on v2.0.0-sgx-emm branch
It seems I'll get Unexpected error with or without this fix.
To reproduce this, simply change the TOML dep to:

sgx_crypto = { git = "https://gitlab.com/dexlabs/incubator-teaclave-sgx-sdk", rev = "1b80455857b16fef02348a5b6db01f2888a49fd5", default-features = false, features = ["ucrypto"] }

@Kailai-Wang Thanks for reporting, I am the maintainer for DEX Labs' fork. I am not sure that if I have rebased @volcano0dr fix to our fork. I will take a look and reply to you. Meanwhile, you are welcome to check it and report issues to the gitlab issues.

Thank you, that would definitely help!

I tried my branch (which includes the sgx_rand fix) but it didn't seem to work either :(

@Kailai-Wang
Copy link
Author

I created an issue in your repo too: https://gitlab.com/dexlabs/incubator-teaclave-sgx-sdk/-/issues/4 : )

@yangfh2004

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

No branches or pull requests

3 participants