Generate memorable EFF Dice-Generated Passphrases in Commodore BASIC.
Works on the Commodore 64, Creative Micro Designs SuperCPU64, Commodore 128, Commodore CBM-II, Commodore PET, Commodore Plus/4, Commodore VIC-20, and Commander X16.
Written for the VICE Emulator and Commander X16 Emulator.
Uses the EFF short wordlist v2.
Device (emulator command(s)) | Emulator | BASIC Version | Program File |
---|---|---|---|
Commodore 64 (x64 or x64sc or x64dtv ) |
VICE | V2.0 | bin/c64.prg |
Creative Micro Designs SuperCPU64 (xscpu64 ) |
VICE | V2.0 | bin/c64.prg |
Commodore 128 (x128 ) |
VICE | V7.0 | bin/c128.prg |
Commodore CBM-II P500 (xcbm5x0 ) |
VICE | V4.0 | bin/cbm5x0.prg |
Commodore CBM-II (xcbm2 ) |
VICE | V4.0 | bin/cbm2_pet.prg |
Commodore PET (xpet ) |
VICE | V4.0 | bin/cbm2_pet.prg |
Commodore Plus/4 (xplus4 ) |
VICE | V3.5 | bin/plus4.prg |
Commodore VIC-20 (xvic ) |
VICE | V2.0 | bin/vic20.prg |
Commander X16 (x16emu ) |
Commander X16 Emulator | V2.0 | bin/x16.prg |
- This project is a recreational proof-of-concept to demonstrate how high-entropy passphrases may be generated in Commodore BASIC.
- Random number generators used by Commodore home computers are not cryptographically secure.
- If you need dice-generated passphrases for critical applications, follow the directions provided by the Electronic Frontier Foundation.
- VICE Emulator or Commander X16 Emulator
- Optional: Python 2/3 for generating BASIC code.
- Optional: petcat for compiling BASIC code.
Skip this step if you are not using the VIC-20 (xvic
).
Commodore VIC-20 requires memory expansion before the program can be loaded into the machine.
In VICE, go to
- Preferences → Settings
- Machine → Model
- Memory expansions → Common configurations → All (block0/1/2/3/5)
Then perform a hard reset
- File → Reset → Hard reset
If you are using the VIC-20 (xvic
), ensure that you have completed the aforementioned additional setup before proceeding.
In VICE, go to
- File → Smart attach ...
- Choose the appropriate
.prg
program file from this repository. See Supported Devices. - Autostart
- Enter number of words to generate (3-20)
In the terminal, run the following
x16emu -run -prg bin/x16.prg
x16emu.exe -run -prg bin\x16.prg
make build
GOTO with calculated expressions hack for Commodore 64 by Frithjof Dau, published on DATA WELT magazine issue 4/85.