{"id":31962311,"url":"https://github.com/hn275/file-encryptor","last_synced_at":"2025-10-14T16:51:10.787Z","repository":{"id":231949435,"uuid":"782414380","full_name":"hn275/file-encryptor","owner":"hn275","description":"a small cli tool for file encryption, written in Rust.","archived":false,"fork":false,"pushed_at":"2024-05-05T23:19:21.000Z","size":82,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-06T00:24:42.539Z","etag":null,"topics":["aes-encryption","commandline","cryptography","gcm","key-derivation-function","scrypt","security"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hn275.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-05T08:53:30.000Z","updated_at":"2024-06-19T10:49:10.926Z","dependencies_parsed_at":"2024-04-21T09:05:16.516Z","dependency_job_id":"305bc398-4f10-4643-90cf-fd085add038e","html_url":"https://github.com/hn275/file-encryptor","commit_stats":null,"previous_names":["hn275/file-encryptor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hn275/file-encryptor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hn275%2Ffile-encryptor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hn275%2Ffile-encryptor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hn275%2Ffile-encryptor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hn275%2Ffile-encryptor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hn275","download_url":"https://codeload.github.com/hn275/file-encryptor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hn275%2Ffile-encryptor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019592,"owners_count":26086757,"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-14T02:00:06.444Z","response_time":60,"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":["aes-encryption","commandline","cryptography","gcm","key-derivation-function","scrypt","security"],"created_at":"2025-10-14T16:51:08.245Z","updated_at":"2025-10-14T16:51:10.782Z","avatar_url":"https://github.com/hn275.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# file-encryptor\n\nA small Rust program to stream and encrypt/decrypt files securely using **Advanced Encryption\nStandard-Galois/Counter Mode**, or [AES-GCM](https://en.wikipedia.org/wiki/Galois/Counter_Mode),\nwith a 256-bit key produced by\n[scrypt](https://en.wikipedia.org/wiki/Scrypt) key derivation function (KDF).\n\n## Usage\n\nI wanted a small cli program that would _stream_ the file, and is flexible enough for\nscripting!\n\nNote that the use of additional authenticated data is not supported as of the current version.\n\n### General Usage\n\n```sh\nfile-encryptor --help\nA Rust CLI program that streams files for encryption and decryption\n\nUsage: file-encryptor \u003cCOMMAND\u003e\n\nCommands:\n  keygen  generate a key, from pure random bytes, or from an input password\n  open    open an encrypted file\n  seal    seal a plaintext file\n  help    Print this message or the help of the given subcommand(s)\n\nOptions:\n  -h, --help  Print help\n```\n\n### Cookbook\n\n#### 1. Key generation\n\nTo encrypt a file, first a key must be generated. For example, we are using the entire text of\nFrankenstein in a text file as the cryptographic key, though this may be done with different file\ntypes, since it's all 1's and 0's for computers anyway.\n\n```sh\nfile-encryptor keygen \u003c frankenstein.txt \u003e secret.key\n\n# or -i and -o\nfile-encryptor keygen -i frankenstein.txt -o secret.key\n\n# You can also pass in the option `-p` (or `--password`)\n# to generate key from a certain passphrase.\nfile-encryptor keygen -p \"this is my password\" \u003e secret.key\n\n# and for all pseudoramdom bytes\nfile-encryptor keygen -r \u003e secret.key\n```\n\n#### 2. Encrypting the file `foo.plaintext`\n\nTo seal (encrypt) a file, say `foo.plaintext`:\n\n```sh\n# By default, it will read the first 32 bytes from stdin for as the key,\n# then the rest as plaintext.\nfile-encryptor seal \u003c secret.key \u003c foo.plaintext \u003e foo.ciphertext\n\n# Or passing in the file names from cli\nfile-encryptor seal -k secret.key -i foo.plaintext -o foo.ciphertext\n```\n\n#### 3. Decrypting the ciphertext file `foo.ciphertext`\n\nTo open the `foo.ciphertext` file:\n\n```sh\n# By default, it will read the first 32 bytes from stdin for as the key,\n# then the rest as ciphertext.\nfile-encryptor open \u003c secret.key \u003c foo.ciphertext \u003e foo.plaintext.decrypted\n\n# Or passing in the file names from cli\nfile-encryptor open -k secret.key -i foo.ciphertext -o foo.plaintext.decrypted\n```\n\n## Breaking Changes\n\nThe key generation schema is different, since `file-encryptor` now also streams the\ninput key file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhn275%2Ffile-encryptor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhn275%2Ffile-encryptor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhn275%2Ffile-encryptor/lists"}