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

Replace aes-gcm with ring for AES encryption #963

Closed
Kailai-Wang opened this issue Nov 18, 2022 · 4 comments
Closed

Replace aes-gcm with ring for AES encryption #963

Kailai-Wang opened this issue Nov 18, 2022 · 4 comments
Assignees
Labels
D1-feature A new feature, a piece of functionality that needs to be developed D2-bug Something isn't working

Comments

@Kailai-Wang
Copy link
Collaborator

Context

companion of litentry/tee-worker#144


✔️ Please set appropriate labels and assignees if applicable.

@Kailai-Wang Kailai-Wang added D2-bug Something isn't working D1-feature A new feature, a piece of functionality that needs to be developed labels Nov 18, 2022
@Kailai-Wang
Copy link
Collaborator Author

Kailai-Wang commented Nov 23, 2022

About the ring crate for wasm:

It failed to compile because ring 0.16.20implicitly depends on web-sys which has std dep - even for default-features = false
image

Btw the crate version 0.16.20 is rather old as they haven't updated the crate version for a while.

However, trying to switch to the up-to-date version won't work either, even though web-sys is removed:

ring = { git = "https://github.com/briansmith/ring", default-features = false, features = [ "alloc", "wasm32_unknown_unknown_js" ] }

as it's blocked by getrandom std (similar problem as above)

Solutions:

  1. keep using aes-gcm, as it's for mock anyway
  2. switch to patched version of ring, e.g. integritee-branch
  3. switch to ring-oxus, see Switch to ring-xous integritee-network/pallets#115

@BillyWooo
Copy link
Collaborator

I would suggest we keep using aes-gcm for the moment to save the bandwidth for other more important tasks. And wait for INTEGRITEE's next movement. If necessary, we can propose our input to them for decision making about ring.

@Kailai-Wang
Copy link
Collaborator Author

OK let's keep aes-gcm. We need to add a comment sometime to explain why we didn't switch to ring. Integritee has more knowledge about it, I don't think they need any suggestion for now :/

@Kailai-Wang
Copy link
Collaborator Author

closing it now, nothing to do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
D1-feature A new feature, a piece of functionality that needs to be developed D2-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants