Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: standardize on pseudorandom #38196

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -3605,7 +3605,7 @@ added: v15.8.0
* `err` {Error}
* `prime` {ArrayBuffer|bigint}

Generates a pseudo-random prime of `size` bits.
Generates a pseudorandom prime of `size` bits.

If `options.safe` is `true`, the prime will be a safe prime -- that is,
`(prime - 1) / 2` will also be a prime.
Expand Down Expand Up @@ -3645,7 +3645,7 @@ added: v15.8.0
as a `bigint`.
* Returns: {ArrayBuffer|bigint}

Generates a pseudo-random prime of `size` bits.
Generates a pseudorandom prime of `size` bits.

If `options.safe` is `true`, the prime will be a safe prime -- that is,
`(prime - 1) / 2` will also be a prime.
Expand Down Expand Up @@ -4316,7 +4316,7 @@ changes:
* `buf` {Buffer}
* Returns: {Buffer} if the `callback` function is not provided.

Generates cryptographically strong pseudo-random data. The `size` argument
Generates cryptographically strong pseudorandom data. The `size` argument
is a number indicating the number of bytes to generate.

If a `callback` function is provided, the bytes are generated asynchronously
Expand Down Expand Up @@ -5116,10 +5116,10 @@ When passing strings to cryptographic APIs, consider the following factors.

* Not all byte sequences are valid UTF-8 strings. Therefore, when a byte
sequence of length `n` is derived from a string, its entropy is generally
lower than the entropy of a random or pseudo-random `n` byte sequence.
lower than the entropy of a random or pseudorandom `n` byte sequence.
For example, no UTF-8 string will result in the byte sequence `c0 af`. Secret
keys should almost exclusively be random or pseudo-random byte sequences.
* Similarly, when converting random or pseudo-random byte sequences to UTF-8
keys should almost exclusively be random or pseudorandom byte sequences.
* Similarly, when converting random or pseudorandom byte sequences to UTF-8
strings, subsequences that do not represent valid code points may be replaced
by the Unicode replacement character (`U+FFFD`). The byte representation of
the resulting Unicode string may, therefore, not be equal to the byte sequence
Expand All @@ -5134,7 +5134,7 @@ When passing strings to cryptographic APIs, consider the following factors.
```

The outputs of ciphers, hash functions, signature algorithms, and key
derivation functions are pseudo-random byte sequences and should not be
derivation functions are pseudorandom byte sequences and should not be
used as Unicode strings.
* When strings are obtained from user input, some Unicode characters can be
represented in multiple equivalent ways that result in different byte
Expand Down
4 changes: 2 additions & 2 deletions doc/api/tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -1772,7 +1772,7 @@ changes:
**Default:** none, see `minVersion`.
* `sessionIdContext` {string} Opaque identifier used by servers to ensure
session state is not shared between applications. Unused by clients.
* `ticketKeys`: {Buffer} 48-bytes of cryptographically strong pseudo-random
* `ticketKeys`: {Buffer} 48-bytes of cryptographically strong pseudorandom
data. See [Session Resumption][] for more information.
* `sessionTimeout` {number} The number of seconds after which a TLS session
created by the server will no longer be resumable. See
Expand Down Expand Up @@ -1915,7 +1915,7 @@ changes:
If `callback` is called with a falsy `ctx` argument, the default secure
context of the server will be used. If `SNICallback` wasn't provided the
default callback with high-level API will be used (see below).
* `ticketKeys`: {Buffer} 48-bytes of cryptographically strong pseudo-random
* `ticketKeys`: {Buffer} 48-bytes of cryptographically strong pseudorandom
data. See [Session Resumption][] for more information.
* `pskCallback` {Function}
* socket: {tls.TLSSocket} the server [`tls.TLSSocket`][] instance for
Expand Down
4 changes: 2 additions & 2 deletions doc/api/webcrypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,7 @@ added: v15.0.0
* Type: {ArrayBuffer|TypedArray|DataView|Buffer}

The salt value significantly improves the strength of the HKDF algorithm.
It should be random or pseudo-random and should be the same length as the
It should be random or pseudorandom and should be the same length as the
output of the digest function (for instance, if using `'SHA-256'` as the
digest, the salt should be 256-bits of random data).

Expand Down Expand Up @@ -1327,7 +1327,7 @@ added: v15.0.0

* Type: {ArrayBuffer|TypedArray|DataView|Buffer}

Should be at least 16 random or pseudo-random bytes.
Should be at least 16 random or pseudorandom bytes.

### Class: `RsaHashedImportParams`
<!-- YAML
Expand Down