Skip to content

Conversation

@dotxlem
Copy link

@dotxlem dotxlem commented Dec 29, 2022

For a project I'm working on, I wanted to use macaroon in a WebAssembly module (wasm32-wasi target). Unfortunately, libsodium makes this difficult if not impossible.

I've republished my fork with the changes for testing, but I wanted to see if there was any interest in bringing this upstream.

The main change is the replacing of libsodium with the following crates:

chacha20poly1305 = "0.10"
sha2 = "0.10"
hmac = "0.12"
rand = "0.8"

Additionally I refactored the crypto stuff around the Encryptor and Decryptor traits -- the idea being to allow the client to provide it's own encryption mechanism via a service like Vault for example.

This also takes care of #83 and #84!

Drop the libsodium dependency and replace with the same functionality from rust-crypto ecosystem crates.

`Encryptor` & `Decryptor` traits added to facilitate custom crypto operations, e.g. via a remote service
@dotxlem
Copy link
Author

dotxlem commented Dec 30, 2022

I should point out that the new traits are hidden behind the original encrypt/decrypt_key functions and not yet exposed in the API :)

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.

1 participant