{"id":22412988,"url":"https://github.com/deeper-x/lincryption","last_synced_at":"2025-10-14T08:35:54.087Z","repository":{"id":97570039,"uuid":"349091715","full_name":"deeper-x/lincryption","owner":"deeper-x","description":"AES256  symmetric file encryption. Built as a ready-to-use tool on every linux server and workstation, out there.","archived":false,"fork":false,"pushed_at":"2021-03-23T18:52:48.000Z","size":64,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T03:27:19.484Z","etag":null,"topics":["backup","coreutils","decryption","devops","encryption","gpg"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/deeper-x.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":"2021-03-18T13:50:48.000Z","updated_at":"2023-12-21T19:22:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"c33db479-8a46-408c-a53d-b48391e3f130","html_url":"https://github.com/deeper-x/lincryption","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/deeper-x/lincryption","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeper-x%2Flincryption","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeper-x%2Flincryption/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeper-x%2Flincryption/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeper-x%2Flincryption/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deeper-x","download_url":"https://codeload.github.com/deeper-x/lincryption/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deeper-x%2Flincryption/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018306,"owners_count":26086342,"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":["backup","coreutils","decryption","devops","encryption","gpg"],"created_at":"2024-12-05T14:11:35.265Z","updated_at":"2025-10-14T08:35:54.057Z","avatar_url":"https://github.com/deeper-x.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lin Cryption - AES256\n\nBash utility for AES256 symmetric file encryption. Based on GnuPG (GPG) and shred (coreutils), has been built to be a ready-to-use tool on every Linux server and workstation out there.\n\nIt's as simple as:\n```sh\n# ENCRYPT: it returns the encrypted myfile.txt.gpg \n$ fencrypt myfile.txt\n\n# DECRYPT: it returns the original myfile.txt file\n$ fdecrypt myfile.txt.gpg\n```\nNo esoterics flags, no low-level complications: just 2 commands, ```fencrypt``` \u0026 ```fdecrypt```.\n\nIt can be used in:\n1. DevOps / batch scripts\n2. external software, consuming its interfaces ```fencrypt \u003cfilename\u003e``` and ```fdecrypt \u003cfilename\u003e``` \n3. CLI interactive sessions (e.g. handling docs with private/sensitive data stored in non-secure directories)\n4. GUIs / Desktop Environments, e.g. setting file associations or \"Open with...\" (extension .gpg -\u003e fdecrypt, etc..)  \n\nSystem requirements:\n```sh\n$ bash --version\nGNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)\n\n$ gpg --version\ngpg (GnuPG) 2.2.20\nlibgcrypt 1.8.5\n\n$ shred --version\nshred (GNU coreutils) 8.32\n```\n\nFirst setup:\n```sh\n#STEP 1: configuring key, we're about to use symmetric encryption\necho \"DUMMYP4SSWD\" \u003e ${HOME}/.linpass\nchmod 0400 ${HOME}/.linpass\n\n#STEP 2: making bins executable\nchmod +x bin/fencrypt\nchmod +x bin/fdecrypt\n\n#STEP 3: making bins available\nexport PATH=${PATH}:$(pwd)/bin\n```\n\nUsage - Encryption:\n```sh\n#ENCRYPTION:\n$ fencrypt assets/demo.txt \nReading assets/demo.txt...\nFile encryption...success\nCleanin up...success\nResult: assets/demo.txt.gpg.\n```\n\nUsage - Decryption:\n```sh\n#DECRYPTION\n$ fdecrypt assets/demo.txt.gpg \nReading assets/demo.txt.gpg...\nDecrypting file...\ngpg: AES256 encrypted data\ngpg: encrypted with 1 passphrase\nCleaning up...\nResult: assets/demo.txt\n\n#READING DECRYPTED DATA\n$ ls assets/\ndemo.txt\n$ cat assets/demo.txt \nhello, my secret data!\n```\n\nTest:\n```sh\n$ bash test.sh \n+ set -o nounset\n+ declare -r PASSFILE=/home/deeper-x/.linpass\n+ declare -r SUCCESS_MSG=success\n+ declare -r FAILURE_MSG=failed\n++ command -v gpg\n+ declare -r GPG=/usr/bin/gpg\n++ command -v shred\n+ declare -r SHRED=/usr/bin/shred\n+ declare -i EXIT_OK=0\n+ declare -i PASSFILE_ERR=101\n+ declare -i GPGMISSING_ERR=102\n+ declare -i FILEMISSING_ERR=103\n+ declare -i INPUTNOTAFILE_ERR=104\n+ declare -i SHREDMISSING_ERR=105\n+ declare -i ENC_GENERIC_ERR=106\n+ declare -i DEL_GENERIC_ERR=107\n+ main ./assets/28887.txt\n+ '[' '!' -x /usr/bin/gpg ']'\n+ '[' '!' -x /usr/bin/shred ']'\n+ '[' 1 -eq 0 ']'\n+ i_file=./assets/28887.txt\n+ o_file=./assets/28887.txt.gpg\n+ echo 'Reading ./assets/28887.txt...'\nReading ./assets/28887.txt...\n+ '[' '!' -f ./assets/28887.txt ']'\n+ '[' '!' -f /home/deeper-x/.linpass ']'\n+ echo -n 'File encryption...'\nFile encryption...++ cat /home/deeper-x/.linpass\n+ /usr/bin/gpg --batch --output ./assets/28887.txt.gpg --passphrase DUMMYP4SSWD --symmetric ./assets/28887.txt\n+ '[' 0 -eq 0 ']'\n+ echo success\nsuccess\n+ echo -n 'Cleaning up...'\nCleaning up...+ /usr/bin/shred -zu -n 3 ./assets/28887.txt\n+ '[' 0 -eq 0 ']'\n+ echo success\nsuccess\n+ echo 'Encrypted file: ./assets/28887.txt.gpg.'\nEncrypted file: ./assets/28887.txt.gpg.\n+ return 0\n+ set -o nounset\n+ declare -r PASSFILE=/home/deeper-x/.linpass\n+ declare -r SUCCESS_MSG=success\n+ declare -r FAILURE_MSG=failed\n++ command -v gpg\n+ declare -r GPG=/usr/bin/gpg\n++ command -v shred\n+ declare -r SHRED=/usr/bin/shred\n+ declare -i EXIT_OK=0\n+ declare -i PASSFILE_ERR=101\n+ declare -i GPGMISSING_ERR=102\n+ declare -i FILEMISSING_ERR=103\n+ declare -i INPUTNOTAFILE_ERR=104\n+ declare -i SHREDMISSING_ERR=105\n+ declare -i DEC_GENERIC_ERR=106\n+ declare -i DEL_GENERIC_ERR=107\n+ main ./assets/28887.txt.gpg\n+ '[' '!' -x /usr/bin/gpg ']'\n+ '[' 1 -eq 0 ']'\n+ i_file=./assets/28887.txt.gpg\n+ o_file=./assets/28887.txt\n+ echo 'Reading ./assets/28887.txt.gpg...'\nReading ./assets/28887.txt.gpg...\n+ '[' '!' -f ./assets/28887.txt.gpg ']'\n+ '[' '!' -f /home/deeper-x/.linpass ']'\n+ echo 'Decrypting file...'\nDecrypting file...\n++ cat /home/deeper-x/.linpass\n+ /usr/bin/gpg --output ./assets/28887.txt --passphrase DUMMYP4SSWD --decrypt --batch ./assets/28887.txt.gpg\ngpg: AES256 encrypted data\ngpg: encrypted with 1 passphrase\n+ '[' 0 -eq 0 ']'\n+ echo success\nsuccess\n+ echo -n 'Cleaning up...'\nCleaning up...+ /usr/bin/shred -zu -n 3 ./assets/28887.txt.gpg\n+ '[' 0 -eq 0 ']'\n+ echo success\nsuccess\n+ echo 'Decrypted file: ./assets/28887.txt'\nDecrypted file: ./assets/28887.txt\n+ return 0\nTest result:SUCCESS\n```\n\n### TODO\n1. scan for all files in input directory\n2. check for input file extensions\n\n\n\nRef:\n1. https://www.gnu.org/software/bash/\n2. https://man7.org/linux/man-pages/man1/shred.1.html\n3. https://linux.die.net/man/1/gpg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeeper-x%2Flincryption","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeeper-x%2Flincryption","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeeper-x%2Flincryption/lists"}