{"id":36985638,"url":"https://github.com/lordofscripts/caesardisk","last_synced_at":"2026-01-13T23:02:54.482Z","repository":{"id":329176045,"uuid":"1117865476","full_name":"lordofscripts/caesardisk","owner":"lordofscripts","description":"A flexible Caesar encoder disk maker written in pure GO","archived":false,"fork":false,"pushed_at":"2025-12-31T14:35:24.000Z","size":1796,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-04T00:51:29.753Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lordofscripts.png","metadata":{"files":{"readme":"docs/README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"lordofscripts","patreon":null,"open_collective":null,"ko_fi":"lostinwriting","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":"lostinwriting","custom":null}},"created_at":"2025-12-16T23:41:20.000Z","updated_at":"2025-12-31T14:34:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/lordofscripts/caesardisk","commit_stats":null,"previous_names":["lordofscripts/caesardisk"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/lordofscripts/caesardisk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordofscripts%2Fcaesardisk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordofscripts%2Fcaesardisk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordofscripts%2Fcaesardisk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordofscripts%2Fcaesardisk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lordofscripts","download_url":"https://codeload.github.com/lordofscripts/caesardisk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lordofscripts%2Fcaesardisk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28399576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-13T23:02:53.388Z","updated_at":"2026-01-13T23:02:54.476Z","avatar_url":"https://github.com/lordofscripts.png","language":"Go","funding_links":["https://github.com/sponsors/lordofscripts","https://ko-fi.com/lostinwriting","https://buymeacoffee.com/lostinwriting"],"categories":[],"sub_categories":[],"readme":"# goCaesarDisk\n`Created: 16 Dec 2025`    `Updated: 24 Dec 2025`\n\n![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/lordofscripts/caesardisk)\n[![Go Report Card](https://goreportcard.com/badge/github.com/lordofscripts/caesardisk?style=flat-square)](https://goreportcard.com/report/github.com/lordofscripts/caesardisk)\n![Build](https://github.com/lordofscripts/caesardisk/actions/workflows/go.yml/badge.svg)\n[![Go Reference](https://pkg.go.dev/badge/github.com/lordofscripts/caesardisk.svg)](https://pkg.go.dev/github.com/lordofscripts/caesardisk)\n[![GitHub release (with filter)](https://img.shields.io/github/v/release/lordofscripts/caesardisk)](https://github.com/lordofscripts/caesardisk/releases/latest)\n[![License: MIT](https://img.shields.io/badge/License-MIT-lightgrey.svg)](https://choosealicense.com/licenses/mit/)\n\nA pure GO application to generate two images which, when put together, are\nused to implement a Caesar cipher encoding/decoding disk. Simply \noverlap the *inner* disk over the *outer* disk and pin it through\nthe middle hole.\n\nUnlike most prefabricated Caesar disks out there in the wild, with\nmy application you can use your own selection of letters. It is\nthus not English centric. With the provided XIROD font, you can\nuse it for many languages, including those supported by my\n`goCaesarX` suite: English, Spanish, Italian, Portuguese, German\nand Czech. If you plan to generate your disk for Cyrillic or\nGreek characters, you will need to supply a TrueType (*.ttf) font \nthat supports those characters or use any of BreamCatcher or Toxicogenesis.\n\nThe *XIROD* font is a free font, also free for commercial use and \ndeveloped by [1001 Fonts](https://www.1001fonts.com/xirod-font.html).\n\nThe *Ubuntu* fonts are free fonts, also free for commercial use and \ndeveloped by [Dalton Maag](https://www.1001fonts.com/ubuntu-font.html)\nand funded by Canonical.\n\nThe *BreamCatcher* \u0026 *Toxicogenesis* fonts are free fonts, also free \nfor commercial use and developed by [RaymondLarabie](https://www.1001fonts.com/users/typodermic/).\nFor German (`-DE` flag) I recommend BreamCatcher which supports all\nGerman characters.\n\n## Installation and Usage\n\nWhether you plan to use the library, or install the application and\nuse it, we got you covered. Just follow the simple instructions.\n\n### Installation\n\nTo get the library for development purposes while keeping in mind \nthe [License](../LICENSE):\n\n\u003e go get github.com/lordofscripts/caesardisk\n\nBut if you are only interested in using the application to generate\nyour own disk sets for yourself, family or friends:\n\n\u003e go get github.com/lordofscripts/caesardisk/cmd/disk\n\nAnd the graphical front-end application: \n\n\u003e go get github.com/lordofscripts/caesardisk/cmd/gui\n\n### Command Usage\n\nFor the [Graphical Front-end](./README_GUI.md) simply type:\n\n\u003e caesar-gui\n\nTo generate the English disks using the default fonts:\n\n\u003e caesardisk\n\nTo generate discs containing the Spanish alphabet with the default\nbuilt-in fonts:\n\n\u003e caesardisk -title \"Spanish\" -ES\n\u003e caesardisk -title \"Spanish\" -ES -dual\n\nIf you wish to override the default Alphabet letters font and use the\nsame for the indexes printed on the outer disk:\n\n\u003e caesardisk -title \"Spanish\" -ES -text-font xirod.regular.ttf\n\nIf you want to override both alphabet and indices fonts:\n\n\u003e caesardisk -title \"Spanish\" -ES -text-font xirod.regular.ttf -digit-font \n\nEach run of the application generates *two* PNG image files, one for the\nouter disk (background) and one for the inner disk (foreground) which are\nprinted and pinned through the middle hole.\n\n![](./assets/caesar_disk_outer.png)\n\n![](./assets/caesar_disk_inner.png)\n\nIn case you didn't notice, in `v1.2` I added the possibility of genearing\n**Dual Wheels**. Basically, the same two disks but each containing two\nrows of characters, the outer row contains letters (a language alphabet),\nand the inner row of the disk containing symbols. Instead of assembling\n2 disks you only need one! But this only works when your symbol alphabet\nhas the **same** length as the letter/language alphabet. At present, it\nis supported by the default English \u0026 Spanish (`-ES`):\n\n\u003e caesardisk -title \"Spanish\" -dual -ES\n\u003e caesardisk -title \"English\" -dual\n\nwhich results in two disk images that, when assembled together with a pin\nyields this with the inner disk rotated to `Key=03` (or \"D\" in this alphabet):\n\n![](./assets/caesar_disk_dual_ES.png)\n\nFor the *dual Spanish disk* the standard `-ES` alphabet is stripped of the\naccented vowels, they are usually not part of passwords anyway:\n\n```\nSpanish (-ES):\n  Size: 27 characters\n  Letter alphabet: ABCDEFGHIJKLMNÑOPQRSTUVWXYZ\n  Symbol alphabet: !\"#$%\u0026()*+,-./ 0123456789=?\nEnglish:\n  Size: 26 characters\n  Letter alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZ\n  Symbol alphabet: !\"#$%\u0026()*+,-./ 0123456789? \n```\n\n# Doing the Caesar Thing\n\nThe basis of the Caesar cipher is the single-letter key, say A..Z in the\nEnglish alphabet. To each of these letters there is a *shift-value* or\n*index-value* that goes from zero (0) to the amount of letters in the\nalphabet minus one. English has 26 letters (A..Z) so the key would be\nbetween 0..25. Key 'A' corresponds to a shift of *zero* which basically\nresults in no encryption/decryption (try it!).\n\nFirst of all you have to generate your Caesar disk as shown in the instructions\nabove. Make sure the alphabet contains the characters used in your language.\nMost people simplify using the ASCII A..Z, but let's face it, the world is\nnot US-centric, there are many languages in the world. I write code with\nglobality in mind.\n\nThe thing is, the Caesar cipher is certainly not secure by modern standards.\nIt was invented in an era where most people were analphabets. But it is\nstill fun to use these days it. And, most people don't actually know what is\na Caesar cipher unless they read something about cryptography. Therefore,\nby analogy, you could say most people these days are *cryptographically \nanalphabets* and thus, the cipher is not totally useless to hide stuff\nfrom the casual overlooker.\n\nIn any case, for those who know, if you only encode letters then your\ncipher message is suceptible to attacks and could be easy to guess some\nletters and thus derive the *single letter* encryption key.\n\nHow could you improve that? By also encoding digits (0..9), some symbols\nand punctuation that would make it more difficult to guess. That \ntechnique even throws your attacker off-the-path to a good guess. Additionally,\nif you also add the SPACE character to the list of encoded characters,\nit will be even more difficult!\n\nMost people would then add those digits, symbols and spaces to the \nletter set. That is fine but it makes for a very long table or big\ndisk! Additionally, you won't be able to preserve upper/lowercase\nbecause you are mixing letters and non-letters in the same alphabet.\n\nThe recommended method is to use two disks:\n\n* The primary disk for the alphabet letters (A..Z and whatever other\n  special characters are used in your language like ß, Á, Ü, Ñ, etc.)\n* A secondary disk for the space character, the digits and a bunch of\n  useful symbols and punctuation.\n\nTherefore, for encrypting or decrypting a Caesar-encoded message where\nyour set includes characters, digits, symbols, etc. as described, you\nwould need two disk sets:\n\n* A disk set (inner \u0026 outer) for the **Letters**, your primary.\n* A disk set (inner \u0026 outer) for the **non-letters**, your secondary.\n\nThen you would use them to process the message character by character,\nbut using the appropriate *disk set* to encrypt/decrypt. There are\ntwo methods I devised:\n\n## Primary \u0026 Secondary with different lengths\n\nDue to language/letter alphabet limitations, or\nsimply because you choose to use less symbols or punctuation\n(I advise to at least keep digits and space), it is possible that\nyour non-letter disk may be shorter.\n\nIn that situation, for any encryption key from the Primary alphabet,\nyou would need to use a **derived** key for your Secondary alphabet.\nThat is what I do in my `goCaesarX` application suite. For that you\nuse the modulo operation:\n\nIf your *main/primary key* is `M` which corresponds to a *shift value*\nof `12` in the English alphabet (or in the Spanish shown in the next\nalternative). You will do this:\n\n```\n    Alphabet (English): ABCDEFGHIJKLMNOPQRSTUVWXYZ\n    Size of Primary   : 26\n    Secondary Alphabet: #$%*+,-./ 0123456789\n    Size of Secondary : 20\n```\n\nIn the primary you use the main key but you can't in the secondary\nbecause it is shorter. To make it work in this situation you apply\na `modulo N` operation denoted mathematically as `% N`. Look it up\nbecause it is beyond the scope of this tutorial!\n\n```\n    Primary Key    : M\n    Primary Shift  : 12 (count starting from zero for the 1st letter)\n    Secondary Shift: 12 % 20 = 12\n    Plain          : AKZ$12\n    Encoded        : MWL3*+\n```\n\nAs long as the main shift is less than the length of the secondary\nyou are okay. But if you choose a main key/shift that has a shift\nvalue beyond the size of the Secondary alphabet, you will have to\napply the *modulo* operation to get the secondary/derived key. \nFor example:\n\n```\n    Primary Key    : W\n    Primary Shift  : 23\n    Secondary Shift: 23 % 20 = 3\n    Plain          : AKZ$12\n    Encoded        : DNC+45    \n```\n\nThe chosen shift value corresponding to the main key corresponds to\na shift greater than the size of the secondary/auxillary alphabet.\nBut by applying the modulo operation using as modulo the size of \nthe *Secondary/Auxillary* alphabet\n\n## Primary \u0026 Secondary with the same length\n\nFirst of all, this is more practical, though the other is slightly\nharder to break. For this use the `-dual` CLI option with either\nthe default *English* (ASCII) or *Spanish* alphabets.\n\nThis would be optimal because then you can use the same key\n(shift value) in **both** disks. Consider this case:\n\n```\n 0        1         2         3\n 01234567890123456789012345678901\n -------------------------------\n ABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚ\n !\"#$%\u0026'()*+,-./ 0123456789:;\u003c=\u003e?\n ```\n\nThe header has the shift value. Then below you find a row\nwith the Primary alphabet (letters only) and a row with the\nnon-letters, the second disk set or Secondary alphabet. Do\nnotice I included the SPACE between the `/` and `0`.\n\nBecause the amount of characters is the same in both, you \ncan use the same *shift value/key* in both disk sets.\n\nI did the work for the Spanish alphabet. If you have\na different alphabet, you will have to adjust the selection\nof non-letters (secondary disk) so that you achive the\nsame lengths.\n\n```\n    Main Key       : M\n    Main Shift     : 12\n    Main Size      : 32\n    Secondary Size : 32\n    Secondary Shift: 12\n    Plain          : AKZ$12\n    Encoded        : MWL\n```    \n\nTry to decipher this with `-ES -dual`:\n\n\u003e Pmv-Imoa-mc-qeb-Qmb-Ofkdp\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flordofscripts%2Fcaesardisk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flordofscripts%2Fcaesardisk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flordofscripts%2Fcaesardisk/lists"}