apache / apache/teaclave-sgx-sdk

Creating `Rsa3072KeyPair` under `ucrypto` feature panics

Open
#456 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1.2k
Forks
268
PR merge metrics
No merged PRs in 30d

Description

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"] }
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the Rsa3072KeyPair::create entry point and inspect its behavior when the ucrypto feature is enabled instead of tcrypto. Reproduce the issue with the provided Rust example and dependency configuration on the v2.0.0-preview-11-17 branch. Done means creating the key pair no longer returns the SGX Unexpected error in the non-enclave ucrypto configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.