File: insecure-seed.wit

package info (click to toggle)
rust-wasmtime 26.0.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 48,492 kB
  • sloc: ansic: 4,003; sh: 561; javascript: 542; cpp: 254; asm: 175; ml: 96; makefile: 55
file content (27 lines) | stat: -rw-r--r-- 1,156 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package wasi:random@0.2.1;
/// The insecure-seed interface for seeding hash-map DoS resistance.
///
/// It is intended to be portable at least between Unix-family platforms and
/// Windows.
@since(version = 0.2.0)
interface insecure-seed {
    /// Return a 128-bit value that may contain a pseudo-random value.
    ///
    /// The returned value is not required to be computed from a CSPRNG, and may
    /// even be entirely deterministic. Host implementations are encouraged to
    /// provide pseudo-random values to any program exposed to
    /// attacker-controlled content, to enable DoS protection built into many
    /// languages' hash-map implementations.
    ///
    /// This function is intended to only be called once, by a source language
    /// to initialize Denial Of Service (DoS) protection in its hash-map
    /// implementation.
    ///
    /// # Expected future evolution
    ///
    /// This will likely be changed to a value import, to prevent it from being
    /// called multiple times and potentially used for purposes other than DoS
    /// protection.
    @since(version = 0.2.0)
    insecure-seed: func() -> tuple<u64, u64>;
}