Skip to main content

Generators & Randomness

Prime Generator for Pseudo-Random Studio

Generate a probable prime in your browser. Choose the bit length, testing strength, and output format, then select Generate prime.

Tool workspace

Your input stays in this browser.

The tool is ready to run.

Ready

Run the tool when your input is ready.

Settings

Options

Ready for a result

Generate a probable prime in your browser. Choose the bit length, testing strength, and output format, then select Generate prime.

This tool runs open-source code from CyberChef by GCHQ (Apache License 2.0). See open-source credits.

Prime Generator for Pseudo-Random Studio: Generate a probable prime using Bit length, Crypto grade, and Output format. This generator needs no source text.

The result contains one generated probable prime. Hexadecimal output starts with 0x. No supplied text determines the result.

  • Generate values for a prime-number exercise.
  • Compare decimal and hexadecimal representations.
  • Prepare probable-prime samples for a test workflow.

Instructions

  1. Set Bit length to a whole number from 2 through 4096.
  2. Choose Crypto grade and select Decimal or Hexadecimal under Output format.
  3. Select Generate prime. Inspect the generated number, then copy or download the result.

Example

Input: No input. The generator needs no source text.

Settings: Bit length 16; Crypto grade on; Output format Decimal

Result: One prime from 32768 through 65535. Each run can return a different prime.

Output format Hexadecimal returns four hex digits after a 0x prefix for this bit length.

Limits

  • Bit length accepts whole numbers from 2 through 4096. Larger requests can take longer to complete.
  • Crypto grade increases the Miller-Rabin testing rounds from 7 to 40. It does not certify cryptographic suitability.
  • Probable-prime generation does not create a complete encryption key or verify a supplied number.