* API overview * ---------------------- Module: [wasi_ephemeral_crypto_common] ---------------------- enum crypto_errno: (tag: u16) - `success`: crypto_errno - `guest_error`: crypto_errno - `not_implemented`: crypto_errno - `unsupported_feature`: crypto_errno - `prohibited_operation`: crypto_errno - `unsupported_encoding`: crypto_errno - `unsupported_algorithm`: crypto_errno - `unsupported_option`: crypto_errno - `invalid_key`: crypto_errno - `invalid_length`: crypto_errno - `verification_failed`: crypto_errno - `rng_error`: crypto_errno - `algorithm_failure`: crypto_errno - `invalid_signature`: crypto_errno - `closed`: crypto_errno - `invalid_handle`: crypto_errno - `overflow`: crypto_errno - `internal_error`: crypto_errno - `too_many_handles`: crypto_errno - `key_not_supported`: crypto_errno - `key_required`: crypto_errno - `invalid_tag`: crypto_errno - `invalid_operation`: crypto_errno - `nonce_required`: crypto_errno - `invalid_nonce`: crypto_errno - `option_not_set`: crypto_errno - `not_found`: crypto_errno - `parameters_missing`: crypto_errno - `in_progress`: crypto_errno - `incompatible_keys`: crypto_errno - `expired`: crypto_errno enum keypair_encoding: (tag: u16) - `raw`: keypair_encoding - `pkcs8`: keypair_encoding - `pem`: keypair_encoding - `local`: keypair_encoding enum publickey_encoding: (tag: u16) - `raw`: publickey_encoding - `pkcs8`: publickey_encoding - `pem`: publickey_encoding - `sec`: publickey_encoding - `compressed_sec`: publickey_encoding - `local`: publickey_encoding enum secretkey_encoding: (tag: u16) - `raw`: secretkey_encoding - `pkcs8`: secretkey_encoding - `pem`: secretkey_encoding - `sec`: secretkey_encoding - `compressed_sec`: secretkey_encoding - `local`: secretkey_encoding enum signature_encoding: (tag: u16) - `raw`: signature_encoding - `der`: signature_encoding enum algorithm_type: (tag: u16) - `signatures`: algorithm_type - `symmetric`: algorithm_type - `key_exchange`: algorithm_type alias version = u64 predefined constants for version: - `unspecified` = 0xff00000000000000 - `latest` = 0xff00000000000001 - `all` = 0xff00000000000002 alias size = usize alias timestamp = u64 alias u64 = u64 alias array_output = handle alias options = handle alias secrets_manager = handle alias keypair = handle alias signature_state = handle alias signature = handle alias publickey = handle alias secretkey = handle alias signature_verification_state = handle alias symmetric_state = handle alias symmetric_key = handle alias symmetric_tag = handle enum opt_options_u: (tag: u8) - `some`: opt_options_u - `none`: opt_options_u union opt_options: (tag: u8) - `some`: options - `none`: (empty) enum opt_symmetric_key_u: (tag: u8) - `some`: opt_symmetric_key_u - `none`: opt_symmetric_key_u union opt_symmetric_key: (tag: u8) - `some`: symmetric_key - `none`: (empty) function options_open(): crypto_errno - Input: - `algorithm_type`: algorithm_type - Output: - mut_ptr function options_close(): crypto_errno - Input: - `handle`: options - No output function options_set(): crypto_errno - Input: - `handle`: options - `name`: string - `value`: ptr - `value_len`: size - No output function options_set_u64(): crypto_errno - Input: - `handle`: options - `name`: string - `value`: u64 - No output function options_set_guest_buffer(): crypto_errno - Input: - `handle`: options - `name`: string - `buffer`: mut_ptr - `buffer_len`: size - No output function array_output_len(): crypto_errno - Input: - `array_output`: array_output - Output: - mut_ptr function array_output_pull(): crypto_errno - Input: - `array_output`: array_output - `buf`: mut_ptr - `buf_len`: size - Output: - mut_ptr function secrets_manager_open(): crypto_errno - Input: - `options`: opt_options - Output: - mut_ptr function secrets_manager_close(): crypto_errno - Input: - `secrets_manager`: secrets_manager - No output function secrets_manager_invalidate(): crypto_errno - Input: - `secrets_manager`: secrets_manager - `key_id`: ptr - `key_id_len`: size - `key_version`: version - No output ---------------------- Module: [wasi_ephemeral_crypto_asymmetric_common] ---------------------- function keypair_generate(): crypto_errno - Input: - `algorithm_type`: algorithm_type - `algorithm`: string - `options`: opt_options - Output: - mut_ptr function keypair_import(): crypto_errno - Input: - `algorithm_type`: algorithm_type - `algorithm`: string - `encoded`: ptr - `encoded_len`: size - `encoding`: keypair_encoding - Output: - mut_ptr function keypair_generate_managed(): crypto_errno - Input: - `secrets_manager`: secrets_manager - `algorithm_type`: algorithm_type - `algorithm`: string - `options`: opt_options - Output: - mut_ptr function keypair_store_managed(): crypto_errno - Input: - `secrets_manager`: secrets_manager - `kp`: keypair - `kp_id`: mut_ptr - `kp_id_max_len`: size - No output function keypair_replace_managed(): crypto_errno - Input: - `secrets_manager`: secrets_manager - `kp_old`: keypair - `kp_new`: keypair - Output: - mut_ptr function keypair_id(): crypto_errno - Input: - `kp`: keypair - `kp_id`: mut_ptr - `kp_id_max_len`: size - Output: - mut_ptr - mut_ptr function keypair_from_id(): crypto_errno - Input: - `secrets_manager`: secrets_manager - `kp_id`: ptr - `kp_id_len`: size - `kp_version`: version - Output: - mut_ptr function keypair_from_pk_and_sk(): crypto_errno - Input: - `publickey`: publickey - `secretkey`: secretkey - Output: - mut_ptr function keypair_export(): crypto_errno - Input: - `kp`: keypair - `encoding`: keypair_encoding - Output: - mut_ptr function keypair_publickey(): crypto_errno - Input: - `kp`: keypair - Output: - mut_ptr function keypair_secretkey(): crypto_errno - Input: - `kp`: keypair - Output: - mut_ptr function keypair_close(): crypto_errno - Input: - `kp`: keypair - No output function publickey_import(): crypto_errno - Input: - `algorithm_type`: algorithm_type - `algorithm`: string - `encoded`: ptr - `encoded_len`: size - `encoding`: publickey_encoding - Output: - mut_ptr function publickey_export(): crypto_errno - Input: - `pk`: publickey - `encoding`: publickey_encoding - Output: - mut_ptr function publickey_verify(): crypto_errno - Input: - `pk`: publickey - No output function publickey_from_secretkey(): crypto_errno - Input: - `sk`: secretkey - Output: - mut_ptr function publickey_close(): crypto_errno - Input: - `pk`: publickey - No output function secretkey_import(): crypto_errno - Input: - `algorithm_type`: algorithm_type - `algorithm`: string - `encoded`: ptr - `encoded_len`: size - `encoding`: secretkey_encoding - Output: - mut_ptr function secretkey_export(): crypto_errno - Input: - `sk`: secretkey - `encoding`: secretkey_encoding - Output: - mut_ptr function secretkey_close(): crypto_errno - Input: - `sk`: secretkey - No output ---------------------- Module: [wasi_ephemeral_crypto_symmetric] ---------------------- function symmetric_key_generate(): crypto_errno - Input: - `algorithm`: string - `options`: opt_options - Output: - mut_ptr function symmetric_key_import(): crypto_errno - Input: - `algorithm`: string - `raw`: ptr - `raw_len`: size - Output: - mut_ptr function symmetric_key_export(): crypto_errno - Input: - `symmetric_key`: symmetric_key - Output: - mut_ptr function symmetric_key_close(): crypto_errno - Input: - `symmetric_key`: symmetric_key - No output function symmetric_key_generate_managed(): crypto_errno - Input: - `secrets_manager`: secrets_manager - `algorithm`: string - `options`: opt_options - Output: - mut_ptr function symmetric_key_store_managed(): crypto_errno - Input: - `secrets_manager`: secrets_manager - `symmetric_key`: symmetric_key - `symmetric_key_id`: mut_ptr - `symmetric_key_id_max_len`: size - No output function symmetric_key_replace_managed(): crypto_errno - Input: - `secrets_manager`: secrets_manager - `symmetric_key_old`: symmetric_key - `symmetric_key_new`: symmetric_key - Output: - mut_ptr function symmetric_key_id(): crypto_errno - Input: - `symmetric_key`: symmetric_key - `symmetric_key_id`: mut_ptr - `symmetric_key_id_max_len`: size - Output: - mut_ptr - mut_ptr function symmetric_key_from_id(): crypto_errno - Input: - `secrets_manager`: secrets_manager - `symmetric_key_id`: ptr - `symmetric_key_id_len`: size - `symmetric_key_version`: version - Output: - mut_ptr function symmetric_state_open(): crypto_errno - Input: - `algorithm`: string - `key`: opt_symmetric_key - `options`: opt_options - Output: - mut_ptr function symmetric_state_options_get(): crypto_errno - Input: - `handle`: symmetric_state - `name`: string - `value`: mut_ptr - `value_max_len`: size - Output: - mut_ptr function symmetric_state_options_get_u64(): crypto_errno - Input: - `handle`: symmetric_state - `name`: string - Output: - mut_ptr function symmetric_state_close(): crypto_errno - Input: - `handle`: symmetric_state - No output function symmetric_state_absorb(): crypto_errno - Input: - `handle`: symmetric_state - `data`: ptr - `data_len`: size - No output function symmetric_state_squeeze(): crypto_errno - Input: - `handle`: symmetric_state - `out`: mut_ptr - `out_len`: size - No output function symmetric_state_squeeze_tag(): crypto_errno - Input: - `handle`: symmetric_state - Output: - mut_ptr function symmetric_state_squeeze_key(): crypto_errno - Input: - `handle`: symmetric_state - `alg_str`: string - Output: - mut_ptr function symmetric_state_max_tag_len(): crypto_errno - Input: - `handle`: symmetric_state - Output: - mut_ptr function symmetric_state_encrypt(): crypto_errno - Input: - `handle`: symmetric_state - `out`: mut_ptr - `out_len`: size - `data`: ptr - `data_len`: size - Output: - mut_ptr function symmetric_state_encrypt_detached(): crypto_errno - Input: - `handle`: symmetric_state - `out`: mut_ptr - `out_len`: size - `data`: ptr - `data_len`: size - Output: - mut_ptr function symmetric_state_decrypt(): crypto_errno - Input: - `handle`: symmetric_state - `out`: mut_ptr - `out_len`: size - `data`: ptr - `data_len`: size - Output: - mut_ptr function symmetric_state_decrypt_detached(): crypto_errno - Input: - `handle`: symmetric_state - `out`: mut_ptr - `out_len`: size - `data`: ptr - `data_len`: size - `raw_tag`: ptr - `raw_tag_len`: size - Output: - mut_ptr function symmetric_state_ratchet(): crypto_errno - Input: - `handle`: symmetric_state - No output function symmetric_tag_len(): crypto_errno - Input: - `symmetric_tag`: symmetric_tag - Output: - mut_ptr function symmetric_tag_pull(): crypto_errno - Input: - `symmetric_tag`: symmetric_tag - `buf`: mut_ptr - `buf_len`: size - Output: - mut_ptr function symmetric_tag_verify(): crypto_errno - Input: - `symmetric_tag`: symmetric_tag - `expected_raw_tag_ptr`: ptr - `expected_raw_tag_len`: size - No output function symmetric_tag_close(): crypto_errno - Input: - `symmetric_tag`: symmetric_tag - No output ---------------------- Module: [wasi_ephemeral_crypto_signatures] ---------------------- alias signature_keypair = handle alias signature_publickey = handle alias signature_secretkey = handle function signature_export(): crypto_errno - Input: - `signature`: signature - `encoding`: signature_encoding - Output: - mut_ptr function signature_import(): crypto_errno - Input: - `algorithm`: string - `encoded`: ptr - `encoded_len`: size - `encoding`: signature_encoding - Output: - mut_ptr function signature_state_open(): crypto_errno - Input: - `kp`: signature_keypair - Output: - mut_ptr function signature_state_update(): crypto_errno - Input: - `state`: signature_state - `input`: ptr - `input_len`: size - No output function signature_state_sign(): crypto_errno - Input: - `state`: signature_state - Output: - mut_ptr function signature_state_close(): crypto_errno - Input: - `state`: signature_state - No output function signature_verification_state_open(): crypto_errno - Input: - `kp`: signature_publickey - Output: - mut_ptr function signature_verification_state_update(): crypto_errno - Input: - `state`: signature_verification_state - `input`: ptr - `input_len`: size - No output function signature_verification_state_verify(): crypto_errno - Input: - `state`: signature_verification_state - `signature`: signature - No output function signature_verification_state_close(): crypto_errno - Input: - `state`: signature_verification_state - No output function signature_close(): crypto_errno - Input: - `signature`: signature - No output ---------------------- Module: [wasi_ephemeral_crypto_kx] ---------------------- alias kx_keypair = handle alias kx_publickey = handle alias kx_secretkey = handle function kx_dh(): crypto_errno - Input: - `pk`: publickey - `sk`: secretkey - Output: - mut_ptr function kx_encapsulate(): crypto_errno - Input: - `pk`: publickey - Output: - mut_ptr - mut_ptr function kx_decapsulate(): crypto_errno - Input: - `sk`: secretkey - `encapsulated_secret`: ptr - `encapsulated_secret_len`: size - Output: - mut_ptr ---------------------- Module: [wasi_ephemeral_crypto_external_secrets] ---------------------- function external_secret_store(): crypto_errno - Input: - `secrets_manager`: secrets_manager - `secret`: ptr - `secret_len`: size - `expiration`: timestamp - `secret_id`: mut_ptr - `secret_id_max_len`: size - No output function external_secret_replace(): crypto_errno - Input: - `secrets_manager`: secrets_manager - `secret`: ptr - `secret_len`: size - `expiration`: timestamp - `secret_id`: ptr - `secret_id_len`: size - Output: - mut_ptr function external_secret_from_id(): crypto_errno - Input: - `secrets_manager`: secrets_manager - `secret_id`: ptr - `secret_id_len`: size - `secret_version`: version - Output: - mut_ptr function external_secret_invalidate(): crypto_errno - Input: - `secrets_manager`: secrets_manager - `secret_id`: ptr - `secret_id_len`: size - `secret_version`: version - No output function external_secret_encapsulate(): crypto_errno - Input: - `secrets_manager`: secrets_manager - `secret`: ptr - `secret_len`: size - `expiration`: timestamp - Output: - mut_ptr function external_secret_decapsulate(): crypto_errno - Input: - `secrets_manager`: secrets_manager - `encrypted_secret`: ptr - `encrypted_secret_len`: size - Output: - mut_ptr