Talking about Random APIs with some Rust folks prompt me to think about how to address the use case of HashMaps which need random data for DoS resistance.

I've now posted a proposed design:

https://github.com/WebAssembly/wasi-random/pull/15

#wasi

Add an insecure-random API. by sunfishcode · Pull Request #15 · WebAssembly/wasi-random

This API uses a value import, so it limits the amount of data that can be obtained. This is hopefully enough data to allow source languages to initialize their DoS-resistant hash-maps, but limited ...

GitHub
@sunfish I ran into the same problem when I wrote and implemented PEP 456 for CPython. Eventually CPython grew https://github.com/python/cpython/blob/main/Python/bootstrap_hash.c to deal with RNG sources.
cpython/bootstrap_hash.c at main · python/cpython

The Python programming language. Contribute to python/cpython development by creating an account on GitHub.

GitHub