{"id":21689113,"url":"https://github.com/tinram/gpgit","last_synced_at":"2025-06-19T16:36:17.169Z","repository":{"id":83639920,"uuid":"58568197","full_name":"Tinram/GPGit","owner":"Tinram","description":"GPG file encryption wrapper, using GPG's strongest command-line options.","archived":false,"fork":false,"pushed_at":"2020-11-16T19:04:13.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-20T12:48:32.980Z","etag":null,"topics":["cascade-encryption","cipher","encryption","gnupg","gpg","gpg-encryption"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/Tinram.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":"2016-05-11T17:57:40.000Z","updated_at":"2020-11-16T19:04:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"3150fddd-dcf0-40c0-9585-a5c15aca21a1","html_url":"https://github.com/Tinram/GPGit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Tinram/GPGit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinram%2FGPGit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinram%2FGPGit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinram%2FGPGit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinram%2FGPGit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tinram","download_url":"https://codeload.github.com/Tinram/GPGit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tinram%2FGPGit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260787679,"owners_count":23063177,"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","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":["cascade-encryption","cipher","encryption","gnupg","gpg","gpg-encryption"],"created_at":"2024-11-25T17:21:15.913Z","updated_at":"2025-06-19T16:36:12.155Z","avatar_url":"https://github.com/Tinram.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\r\n# GPGit\r\n\r\n#### GPG file encryption wrapper, using GPG's strongest command-line encryption options.\r\n\r\n\r\n## Purpose\r\n\r\nEncrypt a file with *GNU Privacy Guard (GPG)* using the strongest cipher and key-strengthening options offered by GPG.\r\n\r\nThe default GPG symmetric file encryption settings (CAST5 and SHA-1 on older GPG versions) are weaker choices compared to other options available.\r\n\r\nAnd the command-line switches to enable the stronger GPG options are verbose, not easily-remembered, and inconvenient.\r\n\r\nGPGit provides a single command to call GPG with its strongest file encryption options.\r\n\r\n\r\n## Requirements\r\n\r\n+ GPG installed.\r\n\r\n+ GPGit script placed in a directory location in *$PATH*.\r\n\r\nGPG is present by default on most Linux distros (`whereis gpg` or `whereis gpg2`), else it is available from the distro repos.\r\n\r\n(GPG2 is to be preferred, if it is installed on the machine, as it is more resistant to attack. Replace `gpg` with `gpg2` in the *gpgit* script.)\r\n\r\nGPG for Windows is available from websites such as [GPG4Win](https://www.gpg4win.org/), or the standalone command-line executable can be extracted from a Git installation.\r\n\r\n\r\n## Files\r\n\r\n### Linux\r\n\r\n+ *gpgit*\r\n\r\n### Windows\r\n\r\n+ *gpgit.bat*\r\n\r\n\r\n## Set-up\r\n\r\n### Linux\r\n\r\nAs your preferred user:\r\n\r\n```bash\r\n    chmod 700 gpgit\r\n```\r\n\r\n```bash\r\n    sudo mv gpgit /usr/local/bin\r\n```\r\n\r\n*/usr/local/bin* is just an example of a *$PATH* location.\r\n\r\n### Windows\r\n\r\nMove *gpgit.bat* to a suitable directory. Ensure that directory is in the *$PATH* variable. If not add the directory: *Windows/Super key + Break \u003e Advanced tab \u003e Environmental Variables button \u003e click Path line \u003e Edit button \u003e Variable value* - append at the end of existing line info: *C:\\directory path\\to gpgit.bat\\;*\r\n\r\n\r\n## Usage\r\n\r\n### Linux and Windows\r\n\r\n```bash\r\n    gpgit \u003cfilename\u003e\r\n```\r\n\r\nGPG asks for a passphrase (and confirmation) and then creates an encrypted copy of the original file with the file extension *.gpg*\r\n\r\nDecrypt the encrypted file with:\r\n\r\n```bash\r\n    gpg \u003cfilename\u003e.gpg\r\n```\r\n\r\n#### Apply Cascade Encryption\r\n\r\n```bash\r\n    gpgit \u003cfilename\u003e -c\r\n```\r\n\r\nGPG asks for two passphrases (passphrase one, confirmation; gpgit message: *applying cascade encryption [...]*; passphrase two, confirmation), and creates two files. The file with the double extension *.gpg.gpg* is the cascade-encrypted file.\r\n\r\nTwo steps of decryption will be required, e.g. for *secret.txt.gpg.gpg*\r\n\r\n```bash\r\n    gpg secret.txt.gpg.gpg\r\n```\r\n\r\nthen\r\n\r\n```bash\r\n    gpg secret.txt.gpg\r\n```\r\n\r\nresulting in *secret.txt*\r\n\r\n\r\n## Ciphers\r\n\r\nThe default AES256 cipher call used in GPGit can be replaced with other ciphers offered by GPG.\r\n\r\nTWOFISH is probably the strongest cipher alternative to AES256.\r\n\r\n\r\n## GPG / GPGit File Comparisons\r\n\r\n    gpg --version\r\n    gpg (GnuPG) 1.4.20\r\n    Copyright (C) 2015 Free Software Foundation, Inc.\r\n\r\n        pgpdump default.txt.gpg\r\n\r\n            Sym alg - AES with 128-bit key(sym 7)\r\n            Iterated and salted string-to-key(s2k 3):\r\n            Hash alg - SHA1(hash 2)\r\n            Salt - 8f c8 6b 9a b0 b8 c2 10\r\n            Count - 65536(coded count 96)\r\n\r\n        pgpdump gpgit.txt.gpg\r\n\r\n            Sym alg - AES with 256-bit key(sym 9)\r\n            Iterated and salted string-to-key(s2k 3):\r\n            Hash alg - SHA512(hash 10)\r\n            Salt - a6 60 04 ad f3 e8 09 43\r\n            Count - 65011712(coded count 255)\r\n\r\n\r\n    gpg2 --version\r\n    gpg (GnuPG) 2.1.11\r\n    libgcrypt 1.6.5\r\n    Copyright (C) 2016 Free Software Foundation, Inc.\r\n\r\n        pgpdump default2.txt.gpg\r\n\r\n            Sym alg - AES with 128-bit key(sym 7)\r\n            Iterated and salted string-to-key(s2k 3):\r\n            Hash alg - SHA1(hash 2)\r\n            Salt - 9c 2f ca 1f 9e 19 e5 eb\r\n            Count - 31457280(coded count 238)\r\n\r\n        pgpdump gpgit2.txt.gpg\r\n\r\n            Sym alg - AES with 256-bit key(sym 9)\r\n            Iterated and salted string-to-key(s2k 3):\r\n            Hash alg - SHA512(hash 10)\r\n            Salt - 31 13 57 9c 49 54 d2 f8\r\n            Count - 65011712(coded count 255)\r\n\r\n\r\n## License\r\n\r\nGPGit is released under the [GPL v.3](https://www.gnu.org/licenses/gpl-3.0.html).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinram%2Fgpgit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinram%2Fgpgit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinram%2Fgpgit/lists"}