{"id":32161526,"url":"https://github.com/orome/crypto-enigma-hs","last_synced_at":"2025-10-21T13:55:25.727Z","repository":{"id":56843288,"uuid":"43088600","full_name":"orome/crypto-enigma-hs","owner":"orome","description":"A Haskell Enigma machine simulator with rich display and machine state details.","archived":false,"fork":false,"pushed_at":"2022-12-02T16:29:13.000Z","size":825,"stargazers_count":23,"open_issues_count":20,"forks_count":1,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-10-21T13:55:12.674Z","etag":null,"topics":["cryptography","enigma-machine","haskell","simulator"],"latest_commit_sha":null,"homepage":"","language":"Haskell","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/orome.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-24T19:35:19.000Z","updated_at":"2023-05-31T13:56:34.000Z","dependencies_parsed_at":"2023-01-22T13:30:20.098Z","dependency_job_id":null,"html_url":"https://github.com/orome/crypto-enigma-hs","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/orome/crypto-enigma-hs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orome%2Fcrypto-enigma-hs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orome%2Fcrypto-enigma-hs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orome%2Fcrypto-enigma-hs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orome%2Fcrypto-enigma-hs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orome","download_url":"https://codeload.github.com/orome/crypto-enigma-hs/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orome%2Fcrypto-enigma-hs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280272337,"owners_count":26302260,"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","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cryptography","enigma-machine","haskell","simulator"],"created_at":"2025-10-21T13:55:22.521Z","updated_at":"2025-10-21T13:55:25.723Z","avatar_url":"https://github.com/orome.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## crypto-enigma\n\n[![Haskell Programming Language](https://img.shields.io/badge/language-Haskell-blue.svg)](https://www.haskell.org)\n[![Hackage](https://img.shields.io/hackage/v/crypto-enigma.svg)](https://hackage.haskell.org/package/crypto-enigma)\n[![Stackage](https://www.stackage.org/package/crypto-enigma/badge/lts?label=lts)](https://www.stackage.org/lts/package/crypto-enigma)\n![Hackage Dependencies](https://img.shields.io/hackage-deps/v/crypto-enigma.svg)\n[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B26691%2Fgithub.com%2Forome%2Fcrypto-enigma-hs.svg?type=shield)](https://app.fossa.com/projects/custom%2B26691%2Fgithub.com%2Forome%2Fcrypto-enigma-hs?ref=badge_shield)\n[![BSD3 License](http://img.shields.io/badge/license-BSD3-brightgreen.svg)](https://github.com/orome/crypto-enigma-hs/blob/hackage/LICENSE)\n[![Tests](https://github.com/orome/crypto-enigma-hs/actions/workflows/run-tests.yml/badge.svg?branch=hackage)](https://github.com/orome/crypto-enigma-hs/actions/workflows/run-tests.yml)\n[![Gitter](https://img.shields.io/gitter/room/badges/shields.svg)](https://gitter.im/orome/crypto-enigma-hs)\n\nAn Enigma machine simulator with state and encoding display.\n\nCurrently support is only provided for those [machine models] in most widespread general use during the war years: the\n[I], [M3], and [M4].\n\nThis is adapted, as an exercise in learning Haskell, from an earlier learning project written in Mathematica. It is my\nfirst Haskell program. A [Python version] with substantially the same API and command line interface, is also\navailable.\n\n### Functionality: package API\n\nPerform [message encoding]:\n\n    \u003e\u003e\u003e enigmaEncoding (configEnigma \"b-γ-V-VIII-II\" \"LFAP\" \"UX.MO.KZ.AY.EF.PL\" \"03.17.04.11\") \"KRIEG\"\n    \"GOWNW\"\n\n    \u003e\u003e\u003e let cfg = configEnigma \"c-β-V-VI-VIII\" \"CDTJ\" \"AE.BF.CM.DQ.HU.JN.LX.PR.SZ.VW\" \"05.16.05.12\"\n    \u003e\u003e\u003e putStr $ showEnigmaEncoding cfg \"FOLGENDES IST SOFORT BEKANNTZUGEBEN\"\n    RBBF PMHP HGCZ XTDY GAHG UFXG EWKB LKGJ\n\nShow [configuration details]:\n\n    \u003e\u003e\u003e let cfg = configEnigma \"b-γ-V-VIII-II\" \"LFAQ\" \"UX.MO.KZ.AY.EF.PL\" \"03.17.04.11\"\n    \u003e\u003e\u003e putStr $ displayEnigmaConfig cfg 'K' displayOpts{format=\"internal\"}\n    K \u003e ABCDEFGHIJK̲̅LMNOPQRSTUVWXYZ            \n      P YBCDFEGHIJZ̲̅PONMLQRSTXVWUAK         UX.MO.KZ.AY.EF.PL\n      1 LORVFBQNGWKATHJSZPIYUDXEMC̲̅  Q  07  II\n      2 BJY̲̅INTKWOARFEMVSGCUDPHZQLX  A  24  VIII\n      3 ILHXUBZQPNVGKMCRTEJFADOYS̲̅W  F  16  V\n      4 YDSKZPTNCHGQOMXAUWJ̲̅FBRELVI  L  10  γ\n      R ENKQAUYWJI̲̅COPBLMDXZVFTHRGS         b\n      4 PUIBWTKJZ̲̅SDXNHMFLVCGQYROAE         γ\n      3 UFOVRTLCASMBNJWIHPYQEKZDXG̲̅         V\n      2 JARTMLQ̲̅VDBGYNEIUXKPFSOHZCW         VIII\n      1 LFZVXEINSOKAYHBRG̲̅CPMUDJWTQ         II\n      P YBCDFEG̲̅HIJZPONMLQRSTXVWUAK         UX.MO.KZ.AY.EF.PL\n    G \u003c CMAWFEKLNVG̲̅HBIUYTXZQOJDRPS\nSimulate [machine operation]:\n\n    \u003e\u003e\u003e let cfg = configEnigma \"b-γ-V-VIII-II\" \"LFAP\" \"UX.MO.KZ.AY.EF.PL\" \"03.17.04.11\"\n    \u003e\u003e\u003e putStr $ displayEnigmaOperation cfg \"KRIEG\" displayOpts\n        OHNKJYSBTEDMLCARWPGIXZQUFV  LFAP  10 16 24 06\n    K \u003e CMAWFEKLNVG̲̅HBIUYTXZQOJDRPS  LFAQ  10 16 24 07\n    R \u003e HXETCUMASQNZGKRYJO̲̅IDFWVBPL  LFAR  10 16 24 08\n    I \u003e FGRJUABYW̲̅DZSXVQTOCLPENIMHK  LFAS  10 16 24 09\n    E \u003e SJWYN̲̅UZPQBVXRETHIMAOFKCLDG  LFAT  10 16 24 10\n    G \u003e EOKPAQW̲̅JLHCISTBDFVMNXRGUZY  LFAU  10 16 24 11\n\n## Functionality: command line\n\nA command line executable, `enigma` (accessible if installed on the path or through `stack exec -- enigma`) for local\nHaskell installations, provides almost all the functionality of the API.\n\nEncode messages:\n\n    $ enigma encode \"B-I-III-I EMO UX.MO.AY 13.04.11\" \"TESTINGXTESTINGUD\"\n    OZQK PFLP YZRP YTFV U\n\n    $ enigma encode \"B-I-III-I EMO UX.MO.AY 13.04.11\" \"OZQKPFLPYZRPYTFVU\"\n    TEST INGX TEST INGU D\n\nShow configuration details (explained in more detail in the command line help):\n\n    $ enigma show \"B-I-III-I EMO UX.MO.AY 13.04.11\" -l 'X' -H'()' -f internal\n    X \u003e ABCDEFGHIJKLMNOPQRSTUVW(X)YZ\n      P YBCDEFGHIJKLONMPQRSTXVW(U)AZ         UX.MO.AY\n      1 HCZMRVJPKSUDTQOLWEXN(Y)FAGIB  O  05  I\n      2 KOMQEPVZNXRBDLJHFSUWYACT(G)I  M  10  III\n      3 AXIQJZ(K)RMSUNTOLYDHVBWEGPFC  E  19  I\n      R YRUHQSLDPX(N)GOKMIEBFZCWVJAT         B\n      3 ATZQVYWRCEGOI(L)NXDHJMKSUBPF         I\n      2 VLWMEQYPZOA(N)CIBFDKRXSGTJUH         III\n      1 WZBLRVXAYGIPD(T)OHNEJMKFQSUC         I\n      P YBCDEFGHIJKLONMPQRS(T)XVWUAZ         UX.MO.AY\n    T \u003c CNAUJVQSLEMIKBZRGPHXDFY(T)WO\n\nSimulate machine operation (explained in more detail command line help):\n\n    $ enigma run \"B-I-III-I EMO UX.MO.AY 13.04.11\" -m \"TESTING\" -t -H'()'\n    0000       CNAUJVQSLEMIKBZRGPHXDFYTWO   EMO  19 10 05\n    0001  T \u003e UNXKGVERLYDIQBTWMHZ(O)AFPCJS  EMP  19 10 06\n    0002  E \u003e QTYJ(Z)XUPKDIMLSWHAVNBGROFCE  EMQ  19 10 07\n    0003  S \u003e DMXAPTRWKYINBLUESG(Q)FOZHCJV  ENR  19 11 08\n    0004  T \u003e IUSMHRPEAQTVDYWGJFC(K)BLOZNX  ENS  19 11 09\n    0005  I \u003e WMVXQRLS(P)YOGBTKIEFHNZCADJU  ENT  19 11 10\n    0006  N \u003e WKIQXNRSCVBOY(F)LUDGHZPJAEMT  ENU  19 11 11\n    0007  G \u003e RVPTWS(L)KYXHGNMQCOAFDZBEJIU  ENV  19 11 12\n\nWatch the machine as it runs for 500 steps:\n\n    $ enigma run \"c-β-VIII-VII-VI QMLI UX.MO.AY 01.13.04.11\" -s 500 -t -f internal -o\n\n### Limitations\n\nNote that the correct display of some characters used to represent components (thin Naval rotors) assumes support for\nUnicode, while some aspects of the display of machine state depend on support for combining Unicode. This is a\n[known limitation](https://github.com/orome/crypto-enigma-hs/issues/10) that will be addressed in a future release.\n\n### Compatability\n\n[Versions](https://www.stackage.org/package/crypto-enigma/snapshots) of this package have been part of [Stackage] LTS\nHaskell since LTS 7.24, and the current version will work with LTS since 3.2.2. For information on which GHC versions\nare supported by each release, see the\n[package's Hackage Matrix](https://matrix.hackage.haskell.org/package/crypto-enigma).\n\n### Documentation\n\nFull [documentation] — for the latest [release version] — is available on Hackage.\n[Documentation](https://www.stackage.org/haddock/lts/crypto-enigma/Crypto-Enigma.html) for the [current Stackage\nLTS version](https://hackage.haskell.org/package/crypto-enigma) — generally identical to the latest release version —\nis avalable on Stackage.\n\n### Alternatives\n\nFor other Haskell Enigma machines see:\n\n* [enigma-hs](https://github.com/kc1212/enigma-hs)\n* [crypto-classical](https://github.com/fosskers/crypto-classical)\n* [enigma.lhs](https://gist.github.com/erantapaa/f071bc3f58d017f9280a)\n* [henigma](https://github.com/erantapaa/henigma)\n\nThis package served as the basis for a [Python version], with essentially the same API, though more active maintenance\nof this verson has resulted in some minor divergence.\n\n### Development status\n\n[![Tests](https://github.com/orome/crypto-enigma-hs/actions/workflows/run-tests.yml/badge.svg?branch=develop)](https://github.com/orome/crypto-enigma-hs/actions/workflows/run-tests.yml)\n\nI'm currently learning and experimenting with some Haskell language features and can't promise the [development version]\nwill work. More detail about planned releases and activities can be found the list of scheduled [milestones] and in the\nlist of [open issues]. Some recent activity includes:\n\n* [changes since](https://github.com/orome/crypto-enigma-hs/compare/hackage...develop#files_bucket) the latest Hackage\n  release version;\n* the [addition of a command line interface](https://github.com/orome/crypto-enigma-hs/issues/13)\n  which incorporates [extensive changes](https://github.com/orome/crypto-enigma-hs/compare/1d303d3d...eb249974)\n  [including](https://github.com/orome/crypto-enigma-hs/blob/develop/CHANGELOG.md#0031) refactoring of display\n  functions; and\n* [breaking API changes](https://github.com/orome/crypto-enigma-hs/blob/develop/CHANGELOG.md#0111)\n  [including](https://github.com/orome/crypto-enigma-hs/compare/ef97f8ac..62d0ff59) removal of deprecated display\n  functions and change to handling of errors with `Either`.\n\n[Python version]: https://pypi.python.org/pypi/crypto-enigma\n[documentation]: https://hackage.haskell.org/package/crypto-enigma\n[release version]: https://github.com/orome/crypto-enigma-hs/tree/hackage\n[development version]: https://github.com/orome/crypto-enigma-hs/tree/develop\n[milestones]: https://github.com/orome/crypto-enigma-hs/milestones\n[open issues]: https://github.com/orome/crypto-enigma-hs/issues\n\n[message encoding]: https://hackage.haskell.org/package/crypto-enigma/docs/Crypto-Enigma.html#v:enigmaEncoding\n[configuration details]: https://hackage.haskell.org/package/crypto-enigma/docs/Crypto-Enigma-Display.html#v:showEnigmaConfigInternal\n[machine operation]: https://hackage.haskell.org/package/crypto-enigma/docs/Crypto-Enigma-Display.html#v:showEnigmaOperation\n\n[machine models]: http://www.cryptomuseum.com/crypto/enigma/tree.htm\n[I]: http://www.cryptomuseum.com/crypto/enigma/i/index.htm\n[M3]: http://www.cryptomuseum.com/crypto/enigma/m3/index.htm\n[M4]: http://www.cryptomuseum.com/crypto/enigma/m4/index.htm\n\n[Stackage]: https://www.stackage.org","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forome%2Fcrypto-enigma-hs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forome%2Fcrypto-enigma-hs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forome%2Fcrypto-enigma-hs/lists"}