Skip to content

Conversation

@DemesneGH
Copy link
Contributor

This PR adds the OP-TEE target to the ring source code, enabling it to be used in TrustZone SDK TAs with std support.
An example demonstrating how to use this crate is provided here: DemesneGH/rust-optee-trustzone-sdk@2f26866

After this PR is merged, I will update the link of ring in Cargo.toml accordingly: DemesneGH/rust-optee-trustzone-sdk@2f26866#diff-f364a71ab8e7d11e3fae1e6ccf83fd0fe4254583945c71924405918dbe51dc59

Next, I will open a PR to the TrustZone SDK to integrate the ring ecdsa example.

@DemesneGH DemesneGH requested a review from m4sterchain July 24, 2025 06:29
@DemesneGH
Copy link
Contributor Author

Since there're all third-party crates in this repo, how to handle the license?

@ivila
Copy link

ivila commented Jul 24, 2025

I don't get it, why not elliptic-curves from RustCrypto, it supports no_std, save us from porting codes like this.

@DemesneGH
Copy link
Contributor Author

I don't get it, why not elliptic-curves from RustCrypto, it supports no_std, save us from porting codes like this.

elliptic-curves is indeed a good crate, it supports no-std and fits the our need of crypto. But ring is the dependency of rustls, and rustls is the dependency of our tls examples. Our final goal is to provide a new rustls version which eliminate the security warnings https://github.com/apache/incubator-teaclave-trustzone-sdk/security/dependabot. To achieve that, we need to first port ring, then update rustls accordingly.

@DemesneGH
Copy link
Contributor Author

I see the new version of rustls supports no-std: rustls/rustls#157 (comment). I will try if it works for our case.
For this PR, I will fix the license issue then it's ready to merge.
For the ring ecdsa examples, it is just a test for the ported ring, maybe it should not be included in the trustzone sdk examples, let's keep it pending for now.
Please feel free to share any suggestions about this, thanks!

@DemesneGH DemesneGH merged commit 24a37e4 into apache:main Jul 25, 2025
1 check passed
@DemesneGH DemesneGH deleted the ring-optee branch July 25, 2025 06:39
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

Successfully merging this pull request may close these issues.

2 participants