ForHosting KIT · Developer Utilities

Pollux cipher encoder and decoder

With the key .-xx.-x.-x, HI becomes 0470247: the message is first written in Morse, then each dot, dash and gap is replaced by a digit the key assigns to it. Decrypt the digits with the same key to read the text again. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Text
HI
Key
.-xx.-x.-x
Calculation mode
Encrypt
You get
Result
0470247
Encoding
pollux
Morse
....x..
Input length
2

This Pollux cipher tool encrypts plain text into a stream of digits and decrypts digit ciphertext back into letters by combining International Morse code with a ten-digit assignment key. First the message becomes Morse: dots and dashes for each letter, a single gap between letters, and a double gap between words. Then every Morse symbol is replaced by a digit that your key assigns to that symbol, so several digits can stand for the same dot, dash, or gap. On decrypt the mapping runs in reverse: each digit becomes a Morse symbol, the stream is read as Morse, and the plain text is recovered.

What the Pollux cipher is and what this tool returns

The Pollux cipher is a classical tomogrammic overcipher built on Morse code. You do not substitute letters directly for other letters; you first write the message in Morse, then hide the three Morse atoms—dit, dah, and the separator—inside a larger alphabet of digits. Because there are ten digits and only three symbols, several digits usually share the same meaning, which flattens letter frequencies and makes bare frequency attacks harder than on a simple monoalphabetic cipher.

Historically the assignment of digits to dots, dashes, and spaces was a shared secret; without that table, recovering the Morse stream is difficult even when you already know Morse. The preferred key is a ten-character string whose character at position i states what digit i means: a period for dot, a hyphen for dash, and the letter x for a gap. At least one digit must map to each of the three symbols so both encrypt and decrypt can run.

If you only need Morse without a digit overlay, use a dedicated Morse translator; this landing answers only the Pollux digit-assignment contract that cryptogram and CTF materials describe.

Where Pollux fits in lessons and puzzles

Developers and educators meet Pollux in American Cryptogram Association-style puzzles, capture-the-flag warm-ups that layer Morse under a digit map, and lightweight demos that show why a three-symbol Morse stream can still hide inside a ten-digit alphabet. Frontend teams can show encrypt and decrypt side by side so learners see that a fixed key turns HI into a reproducible digit string and back again without opaque web toys.

Backend services precompute challenge strings for puzzle APIs or teaching sandboxes where students must recover the key or apply a known key to unlock the next step. Quality engineers generate deterministic encrypt and decrypt pairs for contract tests so middleware that claims Pollux support cannot silently switch to plain Morse or pad unknown groups. Contest organizers precompute answer keys for modest English phrases without trusting random digit selection that would break goldens between runs.

Product and education tools use the transform when a learner pastes a digit stream and the UI must show both the intermediate Morse and the recovered letters under the documented key. Pair it with other classical encoding helpers when you are building a small lab of free, deterministic text tools, and never treat Pollux as a substitute for modern authenticated encryption when real secrets are at stake.

Cryptogram and CTF practice

Encrypt and decrypt Pollux digit streams for worksheets, ACA-style practice, and capture-the-flag warm-ups that combine Morse with a digit key.

Morse overcipher demos

Show how dots, dashes, and gaps hide inside digits 0–9 under a shared assignment key, with intermediate Morse returned for teaching.

What does the Pollux cipher tool cost?

It is free in your browser on this page.

How do I format the Pollux key?

Send a string of exactly ten characters from {., -, x}. Position i assigns digit i: period means Morse dot, hyphen means dash, and x means a letter or word gap. At least one digit must map to each symbol.

How do I decrypt a Pollux message?

Send the digit ciphertext as text, the same ten-character key, and set mode to decrypt (or dec, decode, d). Encrypt is the default when mode is omitted.

Which characters can I encrypt?

Letters A–Z (any case) and digits 0–9. Spaces separate words (encoded as a double gap).

Is the Pollux cipher secure for real secrets?

No. It is a classical teaching cipher with a small key space over Morse. Use modern authenticated encryption such as AES-GCM for real confidentiality.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/enc/pollux

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/enc/pollux \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"HI","key":".-xx.-x.-x"}'
{
  "text": "HI",
  "key": ".-xx.-x.-x"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "enc.pollux",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Invalid keys, unsupported characters, non-digit ciphertext, and Morse groups that are not letters or digits fail with invalid_input instead of guessing. Use it free in the browser for cryptogram practice and Morse-overcipher lessons, or call the API at $0.002 per successful request when pipelines need the same Pollux transform every time.

What the Pollux cipher is and what this tool returns

This endpoint implements that contract in pure, documented form. The JSON response always includes result for the transformed string, encoding fixed to pollux, mode set to encrypt or decrypt, the normalized key, an intermediate morse field showing the . - x stream for teaching and debugging, input_length and output_length, and a formula string that restates the pipeline. There is no streaming path and no silent fallback to plain Morse or another classical cipher: either the payload is valid for the chosen mode, or the request fails with invalid_input.

How text, key, and mode are read and how invalid input fails

The key must be exactly ten characters after trim, drawn only from period, hyphen, and x (asterisk and space are normalized to x for convenience). A key that omits any of the three symbol classes is rejected so you cannot encrypt with a map that has no dash digits, for example. In decrypt mode only digits zero through nine are kept, optional spaces or hyphens between groups are ignored, and any other character fails. After digits map back to Morse symbols, every Morse letter group must be a known ITU code for A–Z or zero through nine; unknown patterns and streams that begin with a gap fail rather than inventing a letter. The preferred payload fields are text for the message or ciphertext, key for the ten-character digit assignment, and optional mode for encrypt or decrypt. Text accepts aliases such as input, value, s, message, plaintext, and ciphertext so forms and SDK clients can reuse existing column names. Key accepts aliases such as digit_key, assignment, digit_map, map, pollux_key, and secret. Mode defaults to encrypt when omitted and also accepts short aliases such as enc, encode, e for encrypt and dec, decode, d for decrypt; any other string fails validation. In encrypt mode only A–Z letters and digits zero through nine are accepted; letter case is ignored; runs of whitespace become word breaks encoded as a double gap; any other character fails immediately with invalid_input. Missing text, empty text, non-string types, and unknown modes likewise raise invalid_input. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline. Invalid inputs return invalid_input and are not charged, which keeps validation cheap while successful transforms remain a fixed item price at $0.002.

Where Pollux fits in lessons, puzzles, and test fixtures

On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split—free interactive exploration and a priced, identical API—matches the rest of the KIT tier-A catalog and lets you move from a classroom demo to an automated pipeline without changing the transformed result.

Deterministic CI fixtures

Generate reproducible Pollux ciphertext and plaintext pairs for unit tests, golden files, and contract checks without random digit picks.

Read the full KIT documentation →