{"id":25531897,"url":"https://github.com/robert-van-engelen/enigma","last_synced_at":"2026-02-07T14:02:32.399Z","repository":{"id":118111082,"uuid":"402851624","full_name":"Robert-van-Engelen/Enigma","owner":"Robert-van-Engelen","description":"A historically accurate Enigma machine in your pocket to encode and decode secret messages","archived":false,"fork":false,"pushed_at":"2023-07-11T20:32:21.000Z","size":185,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-21T11:45:37.452Z","etag":null,"topics":["enigma-simulator","pocketcomputer"],"latest_commit_sha":null,"homepage":"","language":"BASIC","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Robert-van-Engelen.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,"zenodo":null}},"created_at":"2021-09-03T17:37:46.000Z","updated_at":"2024-11-16T14:55:42.000Z","dependencies_parsed_at":"2025-05-22T11:47:28.119Z","dependency_job_id":null,"html_url":"https://github.com/Robert-van-Engelen/Enigma","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Robert-van-Engelen/Enigma","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robert-van-Engelen%2FEnigma","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robert-van-Engelen%2FEnigma/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robert-van-Engelen%2FEnigma/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robert-van-Engelen%2FEnigma/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Robert-van-Engelen","download_url":"https://codeload.github.com/Robert-van-Engelen/Enigma/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Robert-van-Engelen%2FEnigma/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29196623,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T12:38:28.597Z","status":"ssl_error","status_checked_at":"2026-02-07T12:38:23.888Z","response_time":63,"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":["enigma-simulator","pocketcomputer"],"created_at":"2025-02-20T01:42:10.830Z","updated_at":"2026-02-07T14:02:32.382Z","avatar_url":"https://github.com/Robert-van-Engelen.png","language":"BASIC","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Enigma\n\nAn Enigma machine for SHARP pocket computers.\n\n![PC-2500](PC-2500.jpeg)\n\nThis program was written as a result of a class project on cyber security.\nI thought it would be fun to rewrite in BASIC to run on SHARP pocket computers.\n\nRecommended reading:\n\n- [The code book](https://simonsingh.net/books/the-code-book) (Simon Singh)\n- [Enigma machine](https://en.wikipedia.org/wiki/Enigma_machine) (wikipedia)\n- [Enigma cipher machine simulator](https://math.dartmouth.edu/~jvoight/Fa2012-295/EnigmaSimManual.pdf) (Darthmouth)\n\nThe program is written from scratch and does not use any code from any existing\nEnigma simulators.\n\nThe program accurately simulates the Enigma I machine UKW B and C with 5\nrotors I to V.  It has been tested with real WW2 secret messages.\n\nThe program runs on SHARP PC-1350/1360/2500.  A slimmed-down version runs on\nSHARP PC-126x/1475.\n\n## Instructions\n\n`RUN` initializes the system, which takes a few seconds.  Then it will ask\nif you want to print the output `PRINT (y/N)`.  If you reply `Y[ENTER]` then\nthe system will ask `PRINT KEYS (Y/n)`.  Reply `Y[ENTER]` to print secret keys,\nwhich is not recommended if you want to keep your secret keys a secret.\nOptionally you can print a heading text `HEADING TEXT TO PRINT?` by typing it\nin followed by `[ENTER]`, which will be printed as a heading.  You can use this\nto add information for the recipient.\n\nNext you will need to specify the Enigma UKW, enter `B` (default) or `C`.\n\nThere are five steps that can be executed in order, or individually selected\nfrom the menu, or selected at any time with a DEF key:\n\n1. DEF-A: select plugboard settings by entering pairs of letters\n2. DEF-B: select scramblers, left-to-right, specified by three numbers 1 to 5\n3. DEF-C: specify ring settings, left-to-right, enter three letters\n4. DEF-D: specify starting position, left-to-right, enter three letters\n5. DEF-X: enter the text to encode or decode\n\nDEF-SPACE returns to the menu.\n\n## Example decryption\n\nThis message deciphering example follows the operating procedure performed by\nan Enigma operator (the full deciphering is not shown but replaced with\n`.....`).  Each value input is followed by `[ENTER]`.   Text to decipher can be\nentered with spaces to group letters, but spacing is ignored and is not\nrequired.\n\n    ENIGMA UKW (B/C) B                   (Enigma B type)\n    STECKERVERBINDUNG PO                 (plugboard settings)\n    STECKERVERBINDUNG ML\n    STECKERVERBINDUNG IU\n    STECKERVERBINDUNG KJ\n    STECKERVERBINDUNG NH\n    STECKERVERBINDUNG YT\n    STECKERVERBINDUNG GB\n    STECKERVERBINDUNG VF\n    STECKERVERBINDUNG RE\n    STECKERVERBINDUNG DC\n    STECKERVERBINDUNG [ENTER]\n    WALZENLAGE 125                       (scrambler arrangement)\n    RINGSTELLUNG FVN                     (scrambler orientation)\n    GRUNDSTELLUNG EHZ                    (start position to retrieve message key)\n    ?TBS                                 (decrypt the message key)\n    XWB                                  (the message key to decrypt text)\n    [DEF-D]\n    GRUNDSTELLUNG XWB                    (start position to decrypt text)\n    ?QBLTW LDAHH YEOEF PTWYB\n    DERFU ..... ..... .....\n    ?LENDP MKOXL DFAMU DWIJD\n    KAMPF ..... ..... .....\n    ?XRJZ\n    ITZX\n    ?[ENTER]\n    END\n\n## Example encryption\n\nThis message encoding example follows the operating procedure performed by an\nEnigma operato (the full ciphertext is not shown).  Each value input is\nfollowed by `[ENTER]`.   Text to decipher can be entered with spaces to group\nletters, but spacing is ignored and is not required.\n\nNote that the random start position key and encrypted message key are shared\nwith the receiver by including `EHZ TBS` in the message sent.  To do so, enable\nprint and include `EHZ` in the print heading text.  `TBS` is printed as the\ncipher of the plain message key `XWB` entered as text to encrypt.  The heading\ntext may also be used to send the key identification group of five letters.\n\n    ENIGMA UKW (B/C) B                   (Enigma B type)\n    STECKERVERBINDUNG PO                 (plugboard settings)\n    STECKERVERBINDUNG ML\n    STECKERVERBINDUNG IU\n    STECKERVERBINDUNG KJ\n    STECKERVERBINDUNG NH\n    STECKERVERBINDUNG YT\n    STECKERVERBINDUNG GB\n    STECKERVERBINDUNG VF\n    STECKERVERBINDUNG RE\n    STECKERVERBINDUNG DC\n    STECKERVERBINDUNG [ENTER]\n    WALZENLAGE 125                       (scrambler arrangement)\n    RINGSTELLUNG FVN                     (scrambler orientation)\n    GRUNDSTELLUNG EHZ                    (randomly selected start position key to share)\n    ?XWB                                 (randomly selected message key)\n    TBS                                  (encrypted message key to share)\n    [DEF-D]\n    GRUNDSTELLUNG XWB                    (start position to encrypt text)\n    ?.....\n    ?[ENTER]\n    END\n\n## A challenge\n\nTo learn how to use an Enigma machine in general, try the \"Authentic Wartime\nMessage from the Russian Front\" published in the [Enigma cipher machine\nsimulator](https://math.dartmouth.edu/~jvoight/Fa2012-295/EnigmaSimManual.pdf)\nmanual.\n\n## How to load\n\nPlay the wav file to `CLOAD` on your pocket computer.\n\nThe excellent [PocketTools](https://www.peil-partner.de/ifhe.de/sharp/)\nare used to convert BASIC source code to wav files:\n\n    bas2img --pc=1350 --level=8 enigma.bas\n    bin2wav --pc=1350 enigma.img\n\nAuthor: Dr. Robert A. van Engelen\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobert-van-engelen%2Fenigma","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobert-van-engelen%2Fenigma","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobert-van-engelen%2Fenigma/lists"}