Generating passphrases
core.generate_passphrase is a utility on the core object that mints
memorable word-list passphrases such as apple-red-truck. It does not
proxy a Cloudpath REST call — it draws words from a bundled word list and hands
the strings back to your code, where you can feed them straight into a
core.call(...) in the same code_mode invocation.
The intended use is seeding Cloudpath DPSK pools, MPSK entries, and registration-list passwords: mint the secret and store it in one call, so the generated value never round-trips the MCP transport before Cloudpath has it.
Parameters
Section titled “Parameters”| Parameter | Range | Default | Meaning |
|---|---|---|---|
count | 1–100 | 1 | How many passphrases to generate |
wordCount | 2–8 | 3 | Words per passphrase |
separator | up to 3 chars | "-" | String joining the words |
Words are drawn uniformly at random from the EFF Short Word List (1,296
three- to six-letter words) using crypto.getRandomValues.
Entropy
Section titled “Entropy”Three words drawn from 1,296 is roughly 31 bits of entropy — comfortably
above the 8-character Wi-Fi PSK floor — while staying memorable enough to read
aloud. Increase wordCount if you need more.
Return shape
Section titled “Return shape”{ passphrases: string[], wordListSize: number }wordListSize is always 1296; it is surfaced so the model can reason about
entropy without hard-coding the list size.
Example: seed a DPSK pool
Section titled “Example: seed a DPSK pool”async () => { const { passphrases } = await core.generate_passphrase({ count: 10 }); // ...then core.call({ method: 'POST', path: '/dpskPools/{guid}/dpsks', ... }) for each. return { generated: passphrases.length, sample: passphrases.slice(0, 3) };}The defaults (count 1, wordCount 3, separator -) match the standalone
cp-word-list enrollment webhook exactly, so passphrases minted here look the
same as those generated during Cloudpath enrollment.