Skip to content
CP-MCP
Get Support

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.

ParameterRangeDefaultMeaning
count1–1001How many passphrases to generate
wordCount2–83Words per passphrase
separatorup 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.

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.

{ passphrases: string[], wordListSize: number }

wordListSize is always 1296; it is surfaced so the model can reason about entropy without hard-coding the list size.

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.