{"id":15725006,"url":"https://github.com/ecto/otter","last_synced_at":"2026-02-14T07:32:49.689Z","repository":{"id":29879622,"uuid":"33424950","full_name":"ecto/otter","owner":"ecto","description":":see_no_evil: one time pad lisp toy","archived":false,"fork":false,"pushed_at":"2015-04-05T02:19:27.000Z","size":140,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-07T12:56:15.885Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Common Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ecto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-05T00:17:02.000Z","updated_at":"2024-11-12T12:04:30.000Z","dependencies_parsed_at":"2022-07-24T16:32:07.691Z","dependency_job_id":null,"html_url":"https://github.com/ecto/otter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ecto/otter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecto%2Fotter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecto%2Fotter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecto%2Fotter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecto%2Fotter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ecto","download_url":"https://codeload.github.com/ecto/otter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ecto%2Fotter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29439506,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T07:24:13.446Z","status":"ssl_error","status_checked_at":"2026-02-14T07:23:58.969Z","response_time":53,"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":"2024-10-03T22:18:51.079Z","updated_at":"2026-02-14T07:32:49.674Z","avatar_url":"https://github.com/ecto.png","language":"Common Lisp","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://github.com/ecto/otter\"\u003e\u003cimg src=\"https://i.imgur.com/cFLjG6A.png\" width=\"400\" alt=\"a majestic otter\" /\u003e\u003c/a\u003e\n\n## intro\n\nI decided I wanted to try my hand at lisp. I couldn't think of a good first project, but I remembered something from my childhood. When I was a kid, I \"helped\" my dad write a chapter in a C++ book, meaning I mostly sat on his lap and asked dumb questions. Our chapter was on crypto, and he wrote a [one-time pad](https://en.wikipedia.org/wiki/One-time_pad) program for one of the examples. I figured it would be fun to do it on my own! So.. that's why this exists. You probably shouldn't use it for anything important.\n\n## install\n\nAparently there are a million different lisp implementations (I guess polish notation is easy to write interpreters for?). I use OSX and I chose `clisp` because it was the first in a `brew search lisp`. So on OSX:\n\n````bash\nbrew install clisp\n````\n\nDownload my code:\n\n````\ngit clone https://github.com/ecto/otter.git\ncd otter\n````\n\nand run it:\n\n````\n./otter\n\nUsage: otter [command]\n\nCommands:\n  help                           display this message\n  gen [bytes=4096]               generate [bytes] of random data\n  enc [input] [pad] [offset=0]   encrypt [input] file with [pad] file starting at [offset] bytes of [pad] file\n  dec [input] [pad] [offset=0]   decrypt [input] file with [pad] file starting at [offset] bytes of [pad] file\n````\n\nIf you want, you can symlink it:\n\n````bash\nln -s $(echo `pwd`/otter) /usr/local/bin/otter\n````\n\n## use\n\nCreate a file you'd like to encrypt:\n\n````bash\necho \"hello, world\" \u003e in\ncat in\n# hello, world\n````\n\nCreate a pad:\n\n````bash\notter gen \u003e pad\n````\n\n**Send the pad to your friend on a secure medium (not the Internet)**\n\nEncrypt the file:\n\n````bash\notter enc in pad \u003e out\ncat out\n# L\\}hd2\u003e\u003c`\n# yours will be different, because the pad is different\n````\n\n**Send the file to your friend however you want!**\n\nDecrypt the file:\n\n````bash\notter dec out pad \u003e message\ncat message\n# hello, world\n````\n\n## considerations\n\nThe security of one time pads relies on the key material not being used more than once, and that it remains secret (hopefully this is obvious). A common OTP practice is to generate a very large pad, and share it ahead of time.\n\nIf you'd like to generate a 10 megabyte pad, you can do so by adding the pad size to the `gen` command:\n\n````bash\notter gen 10000000 \u003e pad\n````\n\nWhen you encrypt or decrypt something, keep a running count of the bytes you've traversed, and pass them to the `enc`/`dec` commands.\n\nFor example, we can find the size of the message we encrypted earlier:\n\n````bash\nls -l in\n-rw-r--r--  1 ecto  staff  13 Apr  4 18:51 in\n````\n\nSo we've used 13 bytes of the pad. The next time we want to encrypt something, we use 13 for the offset:\n\n````bash\necho \"hope all is well\" \u003e second-in\notter enc second-in pad 13 \u003e second-out\n````\n\nNow when our friend decrypts the message, they will also need to specify the pad output:\n\n````bash\notter dec second-out pad 13 \u003e second-message\n````\n\n## license\n\n````\n        DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n                    Version 2, December 2004\n\n Copyright (C) 2004 Sam Hocevar \u003csam@hocevar.net\u003e\n\n Everyone is permitted to copy and distribute verbatim or modified\n copies of this license document, and changing it is allowed as long\n as the name is changed.\n\n            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE\n   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n\n  0. You just DO WHAT THE FUCK YOU WANT TO.\n````\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecto%2Fotter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fecto%2Fotter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fecto%2Fotter/lists"}