Ciphers
Alberti
A keyed inner disk against a fixed outer alphabet, turned one step after every period letters. Simplified on purpose, so it's reproducible.
Cipher / Polyalphabetic
Alberti
A keyed disk that turns every few letters.
- Keyspace
- not stated
- Decode
- same options back
- Works on
- A-Z, the rest passes
- Family
- 14 in polyalphabetic
required 2 / 2
Options
Access
- Create
create("alberti") - CLI
ciphers encode alberti 'ATTACK AT DAWN' --key ALBERTI --period 4 - Tryplayground with the sample above
- Kinvigenere, gronsfeld, beaufort, porta +9
Alberti's disk of 1467 had a fixed outer ring and a movable inner ring, and the operator turned the inner ring by agreement. That agreement is the problem - two implementations, two answers. So this one fixes it: the inner disk is the keyword with duplicate letters removed, then the rest of the alphabet, and it rotates one position after every period Latin letters. key and period are both required, period a positive integer.
const alberti = create("alberti");
alberti.encode("ATTACK AT DAWN", { key: "ALBERTI", period: 4 }).text; // "ASSAEH LU TBYN"
alberti.decode("ASSAEH LU TBYN", { key: "ALBERTI", period: 4 }).text; // "ATTACK AT DAWN"
alberti.encode("AAAA A", { key: "KEY", period: 4 }).text; // "KKKK E", the disk turned after four
Only ASCII letters count toward the period and the rotation, anything else passes through. This isn't a historical simulation. It's a disk with a clock, which is what a puzzle setter usually means when they write "Alberti".