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

Support taking an array of cfrags in decrypt_reencrypted() in WASM bindings #23

Open
fjarri opened this issue Nov 30, 2020 · 1 comment
Assignees
Labels
blocked Blocked by a third-party library WASM Related to WASM bindings

Comments

@fjarri
Copy link
Contributor

fjarri commented Nov 30, 2020

Vec<MyType> is not supported as a parameter in wasm-bindgen (see rustwasm/wasm-bindgen#111), so we have to work around that by building an ephemeral struct:

let plaintext_bob = capsule
    .with_cfrag(cfrag0)
    .with_cfrag(cfrag1)
    .decrypt_reencrypted(bob_sk, alice_pk, ciphertext);

That won't work very well when the threshold is not known statically.

@fjarri fjarri added WASM Related to WASM bindings API Related to public API blocked Blocked by a third-party library labels Nov 30, 2020
@fjarri fjarri added this to the v1.0.0 milestone Jun 13, 2021
@vepkenez vepkenez self-assigned this Jul 19, 2021
vepkenez added a commit to vepkenez/rust-umbral that referenced this issue Jul 20, 2021
vepkenez added a commit to vepkenez/rust-umbral that referenced this issue Dec 4, 2021
@fjarri
Copy link
Contributor Author

fjarri commented Sep 19, 2022

For now we're using a custom type (VerifedCapsuleFragArray, declared as TS VerifiedCapsuleFrag[]) and a manual dynamic conversion to js_sys::Array and further to VerifedCapsuleFrag using wasm-bindgen-derive. When wasm-bindgen fixes the underlying issue, the internals can be updated too.

@fjarri fjarri removed the API Related to public API label Sep 19, 2022
@fjarri fjarri removed this from the v1.0.0 milestone Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked by a third-party library WASM Related to WASM bindings
Projects
None yet
Development

No branches or pull requests

2 participants