{"id":22624345,"url":"https://github.com/leso-kn/aesh","last_synced_at":"2026-04-28T13:34:39.063Z","repository":{"id":57173973,"uuid":"453231781","full_name":"leso-kn/aesh","owner":"leso-kn","description":"Encrypt and share files through IPFS via QR codes or NFC tags.","archived":false,"fork":false,"pushed_at":"2022-01-31T20:50:10.000Z","size":53,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-23T19:06:10.403Z","etag":null,"topics":["aes-256","archiving","file-sharing","ipfs","qrcode"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/leso-kn.png","metadata":{"files":{"readme":"readme.md","changelog":null,"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":"2022-01-28T22:12:52.000Z","updated_at":"2023-08-02T03:28:55.000Z","dependencies_parsed_at":"2022-09-02T11:21:32.498Z","dependency_job_id":null,"html_url":"https://github.com/leso-kn/aesh","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/leso-kn/aesh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leso-kn%2Faesh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leso-kn%2Faesh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leso-kn%2Faesh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leso-kn%2Faesh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leso-kn","download_url":"https://codeload.github.com/leso-kn/aesh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leso-kn%2Faesh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32383410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T11:25:28.583Z","status":"ssl_error","status_checked_at":"2026-04-28T11:25:05.435Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["aes-256","archiving","file-sharing","ipfs","qrcode"],"created_at":"2024-12-09T00:13:38.946Z","updated_at":"2026-04-28T13:34:39.033Z","avatar_url":"https://github.com/leso-kn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://img.shields.io/npm/v/aesh)](https://www.npmjs.com/package/aesh)\n\n# aesh\n\nEncrypt and share files through IPFS via QR codes or NFC tags.\n\n```bash\n\u003e npm i -g aesh\n```\n\n## Requirements\n\n* Nodejs\n* IPFS (daemon running and the `ipfs` command installed in your `PATH`)\n\n## Usage\n\n```bash\n\u003e aesh add \u003cfile.(txt|pdf|mp3|...)\u003e\n```\n\nThe above command will do four things:\n\n1. Encrypt a given (local) file using the `aes-256-cbc` algorithm\n2. Add (upload) the encrypted file to your local IPFS\n3. Register the file in your local [MFS](https://docs.ipfs.io/concepts/file-systems/#mutable-file-system-mfs) (IPFS) using the same path as on your local filesystem\n4. Return a QR code and the plain URL pointing to the file inside IPFS.\n\n   Anyone with the presented link (URL or QR code) can decrypt and view  \n   or download the file through any modern web browser.\n\n\u003e **Disclaimer**: Share the qr code / full link with people you trust only! The text behind the hash (#) in the end of the URL is the single and only thing needed to decrypt the uploaded file and should therefor be treated like a password.\n\n## Example\n\n```bash\n\u003e aesh add hello-world.txt \n\nencryping contents..\nuploading file..\n 1.76 KiB / 1.76 KiB [============] 100.00%\n▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄\n█ ▄▄▄▄▄ █▀▄  ▀██▀ █▀▄  ▄▄▀   ▄▀ ▄▄█ ▄▄▄▄▄ █\n█ █   █ █▀ ▄▄██▄▀▄█▀▄▄▄▄▄█▀▄▀██▄█▀█ █   █ █\n█ █▄▄▄█ █▀██▀ ▀▄▄▄█▀▀▄█▄▄ █▄  ▀██▄█ █▄▄▄█ █\n█▄▄▄▄▄▄▄█▄▀ ▀ █▄█ █▄▀ ▀▄█▄█▄█▄█ █▄█▄▄▄▄▄▄▄█\n█ ▄▄▄ █▄▄ ▄ █▀ ▄▀ ▀█  █ █▄█▄▀▀▄█   ▀ ▀ █ ▀█\n█▀▄ █▄▀▄▀▄▄▀▄█ ▄▄  ▀█▄ ▀▀▀▄█ ▄█▄█▄█ █ ▀█▀▀█\n█  ▀██▄▄█ █▄▄▀▀▄▀▄█▀▄▄▀▀▀█▀▄▄█▄▀  ▀█▀▀▄ █▀█\n████▀▀▀▄▄▀  █▀▄  ▄▄▀█▄▀▄█▀▄▀▄ ▄▄▀▄▀▀▄  ▄▀██\n█  ▄▄  ▄ ▄▀▀▀▄█ ▄▀▄▀█ ▄▄▀▄▄▀    ▀▀█▀ ▀▄████\n███▄ ▄ ▄▀▀█▄█ █▀▄▀█▄▀▀ █▀██ ▄▀█▀▀   ▄▄▀████\n█▀▄ ██ ▄█▀▄▀█▄▀▀ ▀█▄█▀▀▀▀█▄▀▄▄▀█▄ ▀▀  ▄▄█ █\n██▀▄▄  ▄█▀▄▄ ▄▄██▀█▀ ▀ ▀█▀▄ ▄█▄███▄▀▄█▀█▀██\n█▄█ ▄██▄▀▄ ▄ █ ▄▀▀▀█ ▄ ▄▀▀▄ █▀██ █ ▀▀▀██  █\n█▀ ▀█▄█▄▀▀█▀██ ▄ ▄ ▀▀▀ ▄█▀█▀▄▀▄▀▀ █▀ █▄▄█▀█\n█ ▀▀█ ▄▄ █▀██▀▀▄▀▄█▀▄█▀▄ ▀  ▄▀▄█ ▀██▀▀   ▀█\n█ █▀█ ▄▄▀▄  █▀▄  ▄█▀█ ▀▄█▀██▄ █▄█▄▀ █  ▄▀██\n█▄██▄█▄▄█▀▄██▄█▄▄ ▄▀▄▀   █▀▄▄▄▄▀█ ▄▄▄ █▀ ▀█\n█ ▄▄▄▄▄ █▄▀▀█▄█▀▄ █▄█▄▀▄█▀▄█▄▀▄▀  █▄█ █▄ ▀█\n█ █   █ █ ▄▄█▄█▀ ▀█▄ ▄▄▄▀█  ▄▀▀▀▀▄▄▄▄▄▀▄█▀█\n█ █▄▄▄█ █    ▄▄▄█▀▄▄█ ▀█▀▄█▄  ██▀ ▄▄▀▄▀▄▀██\n█▄▄▄▄▄▄▄█▄██▄██▄██▄█▄▄█▄███▄██▄███▄▄▄█▄▄███\n\nShare available at: https://ipfs.io/ipfs/Qmf6fQBPK7xLQy7cFzvAFZyN6YwqVdTcgyFoWboZoFTEpf#mVkPOFpkQoJgV1hSxRQlVvMgj7+O2E1zvy1qt1984fM=\n```\n\n## How does it work?\n\nWhen sharing a new file, aesh first reads its contents and encrypts them using the `aes-256-cbc` algorithm. The key used for encrypting the file is generated randomly and can later be used to decrypt it again.\n\nThe share-link presented later (which is also the link stored inside the QR code) contains this key in the fragment identifier (the # hash) of the URL – this section [never leaves the browser](https://www.rfc-editor.org/rfc/rfc2396#section-4) during HTTP requests.\n\nAfter encrypting your file, aesh embeds the encrypted contents in a small HTML file, that contains a few lines of JavaScript, which is what is actually being uploaded to IPFS.\n\nUtilitizing the [WebCrypto API](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/decrypt), the HTML file takes the fragment identifiert (hash # section) from the URL used to access it to decrypt the baked-in contents of the original file.\n\nAfter successful decryption, a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) is generated from the decrypted contents, which is then either offered for download, or previewed in the browser directly, depending on the mime-type and browser support – as a fallback, a \"download link\" to the blob will be presented to the user.\n\nBy default, the program uses [identify-stream](https://www.npmjs.com/package/identify-stream) to automatically determine the mime-type of the file selected for sharing.\n\n## Supported Mime-Types\n\nAny mime-type [supported by identify-stream](https://www.npmjs.com/package/identify-stream#user-content-supported-file-types).\n\nFurthermore, the following types (based on file extension):\n\n| Extension | Mime-Type              | Presentation |\n| --------- | ---------------------- | ------------ |\n| .iso      | application/x-cd-image | Download     |\n| .htm[l]   | text/html              | Preview      |\n\nThe fallback mime-type is `text/plain`.\n\n## Taking down local shares\n\nShares technically cannot be \"removed\" once they have been [pinned](https://docs.ipfs.io/how-to/pin-files/) by other IPFS nodes. Nevertheless, this is very unlikely to happen in the early stages of a share, or when it's link or QR code has not been distributed yet.\n\nTo conveniently remove the shared file from your local IPFS, use:\n\n```bash\n\u003e aesh del \u003cfile.(txt|pdf|mp3|...)\u003e\n```\n\nwhere the filename corresponds to the source file on your local disk.\n\nLike `add`, the `del`-command works with relative paths just like you were referring to the source file on your disk.\n\n## ae-sh?\n\nIt's \"ash\" [/ɛʃ/](https://itinerarium.github.io/phoneme-synthesis/?w=/ɛʃ/), but the reasonable separation would be aes-sh for AES-share.\n\n## Background\n\nInspired by [dlnet](https://github.com/ovanwijk/dlnet).\n\nCreated to host a digital version of my bachelor thesis – which had to be encrypted – on IPFS. The QR codes were attached to the physical copies.\n\nIt was also planned to store the share-link inside NFC tags, but since the library where the thesis would eventually end up used RFID to identify print media, this was not implemented. Though the thought about an NFC tag, which grants access to a digital copy hosted on the decentralized web is still very fancy~.\n\n---\naesh - Lesosoftware 2022","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleso-kn%2Faesh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleso-kn%2Faesh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleso-kn%2Faesh/lists"}