wasi-crypto icon indicating copy to clipboard operation
wasi-crypto copied to clipboard

Use WASI Streams

Open npmccallum opened this issue 3 years ago • 5 comments

WASI streams are beginning to reach a point of maturity. This standard should define how it interacts with streams (if at all).

npmccallum avatar Jun 30 '22 12:06 npmccallum

Good call.

Is there any implementation yet? Especially outside Rust?

jedisct1 avatar Jun 30 '22 15:06 jedisct1

@sunfishcode ^

npmccallum avatar Jun 30 '22 17:06 npmccallum

There is parsing support for the wit syntax in wit-bindgen, but the canonical ABI implementation is not complete yet.

sunfishcode avatar Jun 30 '22 21:06 sunfishcode

What we currently have for signatures and symmetric operations is something that can be directly mapped to the traditional NIST init()/update()/finalize() APIs.

But we can add update()/absorb()/squeeze() alternatives that accept a stream handle. That can indeed be useful to emulate OpenSSL BIO objects.

jedisct1 avatar Jun 30 '22 21:06 jedisct1

There is parsing support for the wit syntax in wit-bindgen, but the canonical ABI implementation is not complete yet.

witx-codegen doesn't support streams either, so there is some preliminary work to do.

But if we can keep the current interface, and augment it with streams-oriented functions later, that shouldn't be an issue.

jedisct1 avatar Jun 30 '22 21:06 jedisct1