{"id":17823876,"url":"https://github.com/ffraenz/bomm","last_synced_at":"2025-08-13T19:30:58.577Z","repository":{"id":212173208,"uuid":"613433664","full_name":"ffraenz/bomm","owner":"ffraenz","description":"C-based command-line program designed to break Enigma ciphertext in a ciphertext-only scenario","archived":false,"fork":false,"pushed_at":"2023-07-13T10:13:17.000Z","size":686,"stargazers_count":6,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-27T19:43:40.934Z","etag":null,"topics":["c","cryptanalysis","enigma","enigma-machine"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ffraenz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2023-03-13T15:02:47.000Z","updated_at":"2024-10-14T21:29:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"395ebba7-d8b8-409b-b978-b3f939b47271","html_url":"https://github.com/ffraenz/bomm","commit_stats":null,"previous_names":["ffraenz/bomm"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffraenz%2Fbomm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffraenz%2Fbomm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffraenz%2Fbomm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ffraenz%2Fbomm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ffraenz","download_url":"https://codeload.github.com/ffraenz/bomm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229777216,"owners_count":18122466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["c","cryptanalysis","enigma","enigma-machine"],"created_at":"2024-10-27T17:59:41.581Z","updated_at":"2024-12-15T03:12:29.772Z","avatar_url":"https://github.com/ffraenz.png","language":"C","readme":"\n# bomm\n\nbomm, initiated as part of the Bachelor thesis *Breaking Enigma ciphertext in 2023* by Fränz Friederes, is a C-based command-line program designed to break Enigma ciphertext in a ciphertext-only scenario.\n\nThe thesis script will be made available, soon.\n\n## Getting started\n\nFirst, download the [latest stable release](https://github.com/ffraenz/bomm/releases/latest) or build the program from source (see instructions below).\n\nCommand line usage:\n\n```\nUsage: bomm data/queries/kr-blitz.json\nOptions:\n  -h, --help        display this help message\n  -n, --num-hold    number of hold elements to collect\n  -t, --num-threads number of concurrent threads to use\n  -q, --quiet       quiet mode\n  -v, --verbose     verbose mode\n```\n\nTo evaluate a ciphertext messages with bomm, a query needs to be composed and passed as the only argument. It contains the ciphertext itself, the key space to be searched (referencing known or custom wheels and wirings), and a set of passes that describe the strategies (e.g. hill climbing) to be applied. A schema for such query files can be found at `data/schemas/query.json`. Example queries are stored in `data/queries`.\n\nExemplary, the following command and query can be used to run an attack against the KR Blitz message, targeting the practical key space of Enigma I with UKW-B using the E-Stecker technique.\n\n```bash\nbomm data/queries/kr-blitz.json\n```\n\nThis will result in the following view that is kept up-to-date while processing the query, displaying the top scoring keys accompanied by a preview of the putative plaintext:\n\n```\n┌──────┬───────────────────────────────────────────────────────────────────────┐\n│ Bomm │ Progress      0.228 % │ Elapsed      00:03:44 │ Remaining    26:06:54 │\n├──────┴───────────────────────────────────────────────────────────┬───────────┤\n│ tgenpjnrjdqubenahrbefohsamtjnenexsiesgalieldninsnptcqssenidfqxan   -8.702661 │\n│ UKW-B,III,IV,V aaaa aber bf ch dt in kv or ps qz wy                          │\n├──────────────────────────────────────────────────────────────────┬───────────┤\n│ rlverarmxplinsxjerpisjdsixfeheiarvifuetentxschxefojaxungthxeutha   -8.737875 │\n│ UKW-B,II,III,V aaaa abjt bz cy dp fv hi jm lt ou qr                          │\n├──────────────────────────────────────────────────────────────────┬───────────┤\n│ rderdsjxsseliseilunidpbenidxzhlqhtbeqnafkorprexrgvniniweantbenix   -8.739881 │\n│ UKW-B,V,II,IV aaaa aadj ad bj cq es fo iy kt lr mz nx pw uv                  │\n├──────────────────────────────────────────────────────────────────┬───────────┤\n│ eciemxkztpyxejhmlerkxdiesierregsieigfaratewfgarkyhydjzbnhoilonss   -8.745330 │\n│ UKW-B,II,III,V aaaa aapy ad bt ek fq gu ir jy lw ns oz pv                    │\n├──────────────────────────────────────────────────────────────────┬───────────┤\n│ rlgsigezeodnfstaurmitgensexonfcsienenssgewapxximnrkxsonsaangreit   -8.756366 │\n│ UKW-B,V,III,IV aaaa aaxo am do ip lz nw qt rx vy                             │\n├──────────────────────────────────────────────────────────────────┬───────────┤\n│ tgenpjnrjdqubenahrbefobsartjnenexsiesialieldninsnptqqssenuqfqxan   -8.762827 │\n│ UKW-B,III,IV,V aaaa aber bf ch dt in or ps qz vy                             │\n╞══════════════════════════════════════════════════════════════════╤═══════════╡\n│ hitlutsunqrtliabftqrnuwlqvnitrsctnqipklmaheefdcabcuworubswyrbggf   -10.09713 │\n│ Unchanged ciphertext (97 letters)                                            │\n└──────────────────────────────────────────────────────────────────────────────┘\n```\n\nBy default, half the number of detected CPU cores is used as the number of parallel threads spawned. This may be overridden by the `-t` flag.\n\nWhen the query completes or the program is terminated by the SIGINT (pressing `Ctrl+C`) or SIGTERM signal, the full hold is printed out before exiting.\n\n## Wheels\n\nIn a query key space, wheels can be referenced by their name. The following options are available:\n\n- Entry wheels (all models)\u003cbr\u003e\n  `ETW-ABC`, `ETW-QWE`\n- Enigma I, M1, M2, M3, and Enigma M4\u003cbr\u003e\n  `I`, `II`, `III`, `IV`, `V`, `VI`, `VII`, `VIII`, `beta`, `gamma`, `UKW-A`, `UKW-B`, `UKW-C`, `UKW-B-thin` `UKW-C-thin`\n- Enigma B 207\u003cbr\u003e\n  `B207-I`, `B207-II`, `B207-III`, `B207-UKW`\n- Enigma S “Sondermaschine”\u003cbr\u003e\n  `S-I`, `S-II`, `S-III`, `S-UKW`\n- “Spanish Enigma”\u003cbr\u003e\n  `ES-I`, `ES-II`, `ES-III`, `ES-IV`, `ES-V`, `ES-UKW`\n- Enigma “Zagreb Delta”\u003cbr\u003e\n  `ZD-I`, `ZD-II`, `ZD-III`, `ZD-IV`, `ZD-V`, `ZD-UKW`\n\nIf a wheel is missing in the built-in library, it can be specified in the `wheels` array in the query object:\n\n```json\n{\n  \"name\": \"B207-I\",\n  \"wiring\": \"iqynwgavkozscpfbumlextjdhr\",\n  \"turnovers\": \"q\"\n}\n```\n\n## Measures\n\nIn the query, built-in measures (or scoring functions) are referenced by string tokens like `ic` or `sinkov_trigram`. The following options are available:\n\n- [Sinkov statistic](https://en.wikipedia.org/wiki/Sinkov_statistic) or log-weight statistic for n-grams; Requires a frequency map\u003cbr\u003e\n  Available options: `sinkov_monogram`, `sinkov_bigram`, `sinkov_trigram`, `sinkov_quadgram`, `sinkov_pentagram`, `sinkov_hexagram`\n- [Index of coincidence](https://en.wikipedia.org/wiki/Index_of_coincidence) measure\u003cbr\u003e\n  Available options: `ic`, `ic_bigram`, `ic_trigram`, `ic_quadgram`, `ic_pentagram`, `ic_hexagram`\n- [Shannon entropy](https://en.wikipedia.org/wiki/Entropy_(information_theory)) measure\u003cbr\u003e\n  Available options: `entropy`, `entropy_bigram`, `entropy_trigram`, `entropy_quadgram`, `entropy_pentagram`, `entropy_hexagram`\n\n## Build from source\n\nFirst, make sure the libraries [jansson](https://github.com/akheron/jansson) and [criterion](https://github.com/Snaipe/Criterion) are available to the compiler.\n\nBuild and test the program using make:\n\n```bash\nmake clean \u0026\u0026 make test\n# Creates build/bomm\n```\n\nA non-Latin alphabet may be used with an especially compiled version of the program:\n\n```bash\nmake clean \u0026\u0026 make test ALPHABET=0123456789\n# Creates build/bomm-0123456789\n```\n\nNote, that as of now, only path-safe ASCII alphabets are allowed here.\n\n## Data sources\n\n- The frequency tables for English text `en-bigram.txt` and `en-trigram.txt` were generated by [Practical Cryptography](http://practicalcryptography.com/cryptanalysis/letter-frequencies-various-languages/english-letter-frequencies/) from around 4.5 billion characters of English text, sourced from [Wortschatz](https://wortschatz-leipzig.de/en).\n- The frequency tables for raw 1941 Enigma message decrypts `enigma1941-bigram.txt` and `enigma1941-trigram.txt` have been published on [Frode Weierud's CryptoCellar](https://cryptocellar.org/bgac/keyofE.html).\n\n## License\n\nThe source code in this repository is published under the MIT license. See [LICENSE.txt](LICENSE.txt).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fffraenz%2Fbomm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fffraenz%2Fbomm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fffraenz%2Fbomm/lists"}