more comments Peter McGoron (17 May 2026 04:39 UTC)
Re: more comments Wolfgang Corcoran-Mathe (17 May 2026 20:33 UTC)
Re: more comments Peter McGoron (17 May 2026 21:21 UTC)
Re: more comments Wolfgang Corcoran-Mathe (18 May 2026 00:54 UTC)
Re: more comments Shiro Kawai (18 May 2026 11:52 UTC)
Re: more comments John Cowan (18 May 2026 13:46 UTC)
Re: more comments Shiro Kawai (18 May 2026 17:21 UTC)
Re: more comments Wolfgang Corcoran-Mathe (18 May 2026 18:03 UTC)
Re: more comments Peter McGoron (18 May 2026 15:33 UTC)
Re: more comments Vincent Manis (he/him) (18 May 2026 16:41 UTC)
Re: more comments Shiro Kawai (18 May 2026 17:13 UTC)
Re: more comments Peter McGoron (18 May 2026 18:28 UTC)
Re: more comments Shiro Kawai (18 May 2026 18:42 UTC)
Re: more comments Peter McGoron (19 May 2026 02:12 UTC)
Re: more comments Shiro Kawai (19 May 2026 03:16 UTC)
Re: more comments Wolfgang Corcoran-Mathe (18 May 2026 16:59 UTC)
Re: more comments Shiro Kawai (18 May 2026 17:08 UTC)
Re: more comments John Cowan (18 May 2026 06:17 UTC)
Re: more comments Peter McGoron (18 May 2026 11:30 UTC)
Re: more comments John Cowan (18 May 2026 13:21 UTC)
Re: more comments Wolfgang Corcoran-Mathe (18 May 2026 17:19 UTC)

Re: more comments Wolfgang Corcoran-Mathe 18 May 2026 17:19 UTC

On 2026-05-18 02:17 -0400, John Cowan wrote:
> > There is no guarantee that any bytevector would be a
> > valid input (it may not be structured properly or may not be of the
> > correct length).
>
> Sure. The idea is not that you can pass just any bytevector; the
> bytevector would come from a call to random-port-state on some port
> from the same library.

I don't know where you got this.

Per the current draft you can, indeed, pass just any bytevector,
provided it's long enough and isn't useless to the backing algorithm
(e.g. no all-zero bytevectors for xoshiro256++).

John Cowan:
> It's one thing to require that
> a port must be initializable from an infinite stream of arbitrary
> data,, because if the data constitute a weak key (so to speak) it can
> be discarded and the implementation can ask for more bytes.  But are
> we to require that a bytevector of length 1 can initialize an
> arbitrary algorithm?  Clearly not.

Putting this together with the quotation above, I get the sense that
you are proposing that 'make-random-port' choose an initialization mode
based on the type of the initializer.  Something like the following:

Sketch specification for determinized 'make-random-port':
> If *initializer* is a bytevector, it must be a random-port state
> obtained with 'random-port-state'.  The returned port is
> initialized to this state.
>
> If *initializer* is a binary input port, then data is drawn from
> *initializer* until enough is obtained to create a random port
> state, to which the returned port is initialized.  *initializer*
> may produce arbitrary data, but if enough "valid" data cannot be
> obtained, an error (satisfying ...) is signaled.  In particular,
> the data drawn from *initializer* need not represent a state
> obtained with 'random-port-state'; an implementation is not
> required to check whether the data drawn from *initializer*
> represents such a state.

This seems convoluted and over-subtle, so I've probably misunderstood
your intended meaning.  Would you mind writing a sketch specification
for 'make-random-port' that does what you want?

--
Wolfgang Corcoran-Mathe  <xxxxxx@sigwinch.xyz>