Open vkomenda opened 4 years ago
I like the idea, but do you think it would be feasible to implement that as a separate crate, i.e. have a threshold_crypto_c
crate that depends on threshold_crypto
and exposes a C-compatible API, and ships with C header files?
It would be cleaner to have it separate, and I don't think it would require access to any private internals of the threshold_crypto
crate.
Thanks for the suggestion. A separate crate should do the job perfectly.
Great! I won't be able to work on it any time soon, but I'd be happy to help with the review.
Thank you very much!
Actually, let's keep this open until such a crate exists. It would be really great to have FFI bindings.
This is not an issue with the crate but rather a question. As it happens, not all projects using this crate are written in Rust. Which is why such projects need to import the crate using FFI. When writing Ocaml FFI, I found that it is an extension of what a standard C API would have been, although I hadn't intended to write a C FFI in the first place.
Would it make sense to add a standard C FFI to this crate so that it could either be used on its own or embedded in more complex FFI for other languages like Ocaml?
The benefit of having a standard FFI from the crate user point of view is peer review and memory safety. For example, the FFI would keep secret keys on the Rust heap and not pass it over the FFI.