wasmsign2/
lib.rs

1//! A proof of concept implementation of the WebAssembly module signature proposal.
2
3// The `PublicKey::verify()` function is what most runtimes should use or reimplement if they don't need partial verification.
4// The `SecretKey::sign()` function is what most 3rd-party signing tools can use or reimplement if they don't need support for multiple signatures.
5
6#![allow(clippy::vec_init_then_push)]
7#![forbid(unsafe_code)]
8
9mod error;
10mod signature;
11mod split;
12mod wasm_module;
13
14#[allow(unused_imports)]
15pub use error::*;
16#[allow(unused_imports)]
17pub use signature::*;
18#[allow(unused_imports)]
19pub use split::*;
20#[allow(unused_imports)]
21pub use wasm_module::*;
22
23pub mod reexports {
24    pub use {ct_codecs, getrandom, hmac_sha256, log, thiserror};
25}
26
27const SIGNATURE_WASM_DOMAIN: &str = "wasmsig";
28const SIGNATURE_VERSION: u8 = 0x01;
29const SIGNATURE_WASM_MODULE_CONTENT_TYPE: u8 = 0x01;
30const SIGNATURE_HASH_FUNCTION: u8 = 0x01;