{"id":19684227,"url":"https://github.com/elliotwutingfeng/aegis-backup-decryptor","last_synced_at":"2025-04-29T05:32:26.724Z","repository":{"id":217246640,"uuid":"743376580","full_name":"elliotwutingfeng/aegis-backup-decryptor","owner":"elliotwutingfeng","description":"CLI tool to decrypt backup files exported from the Aegis Authenticator app. This application is neither affiliated with Beem Development nor Aegis Authenticator.","archived":false,"fork":false,"pushed_at":"2024-09-07T17:01:44.000Z","size":106,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-07T18:24:24.893Z","etag":null,"topics":["2fa","aes","aes-gcm","android","backup","cryptography","cybersecurity","decryption","encrypt","encrypted","encryption","linux","macos","openssl","otp","privacy","scrypt","security","totp","windows"],"latest_commit_sha":null,"homepage":"https://github.com/beemdevelopment/Aegis/blob/master/FAQ.md#what-is-the-difference-between-exporting-and-backing-up","language":"Ruby","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/elliotwutingfeng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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-01-15T05:13:09.000Z","updated_at":"2024-09-07T17:01:46.000Z","dependencies_parsed_at":"2024-02-06T05:29:30.144Z","dependency_job_id":"8fb35d0e-220e-4537-8c96-aed67b6b591b","html_url":"https://github.com/elliotwutingfeng/aegis-backup-decryptor","commit_stats":null,"previous_names":["elliotwutingfeng/aegis-backup-decryptor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliotwutingfeng%2Faegis-backup-decryptor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliotwutingfeng%2Faegis-backup-decryptor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliotwutingfeng%2Faegis-backup-decryptor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliotwutingfeng%2Faegis-backup-decryptor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elliotwutingfeng","download_url":"https://codeload.github.com/elliotwutingfeng/aegis-backup-decryptor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224151083,"owners_count":17264436,"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":["2fa","aes","aes-gcm","android","backup","cryptography","cybersecurity","decryption","encrypt","encrypted","encryption","linux","macos","openssl","otp","privacy","scrypt","security","totp","windows"],"created_at":"2024-11-11T18:17:10.658Z","updated_at":"2025-04-29T05:32:26.718Z","avatar_url":"https://github.com/elliotwutingfeng.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aegis Backup Decryptor\n\n[![Ruby](https://img.shields.io/badge/Ruby-CC342D?style=for-the-badge\u0026logo=ruby\u0026logoColor=white)](https://ruby-lang.org)\n[![Coveralls](https://img.shields.io/coverallsCoverage/github/elliotwutingfeng/aegis-backup-decryptor?logo=coveralls\u0026style=for-the-badge)](https://coveralls.io/github/elliotwutingfeng/aegis-backup-decryptor?branch=main)\n[![GitHub license](https://img.shields.io/badge/LICENSE-GPLv3-GREEN?style=for-the-badge)](LICENSE)\n\nCLI tool to decrypt backup files exported from the [Aegis Authenticator app](https://getaegis.app).\n\nThis application is neither affiliated with Beem Development nor Aegis Authenticator.\n\n## Requirements\n\n- **Ruby:** 2.5+/3.0+, no external gems needed\n- **OpenSSL:** 1.1+/3.0+\n  - In the terminal, run the following to view your Ruby interpreter's [OpenSSL](https://openssl.org) version\n\n    ```bash\n    ruby -e \"require 'openssl'; puts OpenSSL::OPENSSL_LIBRARY_VERSION\"\n    # Example output\n    # OpenSSL 3.4.0 22 Oct 2024\n    ```\n\n  - [LibreSSL](https://libressl.org) is not supported\n\n- **OS:** Either Windows, macOS, or Linux\n\n### Safety\n\n\u003e [!CAUTION]\n\u003e This program writes the backup file content to stdout in plaintext. By default, this means the content will be displayed on the screen.\n\u003e\n\u003e **Recommended precautions:**\n\u003e\n\u003e - Do NOT decrypt your backup file in public areas, or in the presence of untrusted persons and surveillance cameras.\n\u003e - Do NOT decrypt your backup file on a machine that you suspect to be infected by malware.\n\u003e - ENSURE that your terminal session output is not being unintentionally saved or recorded.\n\n## Example\n\n**File:** `test/encrypted_test.json`\n\n**Password:** `test`\n\n```bash\n# Enter the above password when prompted\nruby lib/decrypt.rb test/encrypted_test.json\n```\n\nYou should get the following plaintext JSON output.\n\n```json\n{\n    \"version\": 1,\n    \"entries\": [\n        {\n            \"type\": \"totp\",\n            \"uuid\": \"3ae6f1ad-2e65-4ed2-a953-1ec0dff2386d\",\n            \"name\": \"Mason\",\n            \"issuer\": \"Deno\",\n            \"icon\": null,\n            \"info\": {\n                \"secret\": \"4SJHB4GSD43FZBAI7C2HLRJGPQ\",\n                \"algo\": \"SHA1\",\n                \"digits\": 6,\n                \"period\": 30\n            }\n        },\n        {\n            \"type\": \"totp\",\n            \"uuid\": \"84b55971-a3d2-4173-a5bb-0aea113dbc17\",\n            \"name\": \"James\",\n            \"issuer\": \"SPDX\",\n            \"icon\": null,\n            \"info\": {\n                \"secret\": \"5OM4WOOGPLQEF6UGN3CPEOOLWU\",\n                \"algo\": \"SHA256\",\n                \"digits\": 7,\n                \"period\": 20\n            }\n        },\n        {\n            \"type\": \"totp\",\n            \"uuid\": \"3deaff2e-f181-4837-80e1-fdf0c54e9363\",\n            \"name\": \"Elijah\",\n            \"issuer\": \"Airbnb\",\n            \"icon\": null,\n            \"info\": {\n                \"secret\": \"7ELGJSGXNCCTV3O6LKJWYFV2RA\",\n                \"algo\": \"SHA512\",\n                \"digits\": 8,\n                \"period\": 50\n            }\n        },\n        {\n            \"type\": \"hotp\",\n            \"uuid\": \"0a8c0571-ff6f-4b02-aa4b-50553b4fb4fe\",\n            \"name\": \"James\",\n            \"issuer\": \"Issuu\",\n            \"icon\": null,\n            \"info\": {\n                \"secret\": \"YOOMIXWS5GN6RTBPUFFWKTW5M4\",\n                \"algo\": \"SHA1\",\n                \"digits\": 6,\n                \"counter\": 1\n            }\n        },\n        {\n            \"type\": \"hotp\",\n            \"uuid\": \"03e572f2-8ebd-44b0-a57e-e958af74815d\",\n            \"name\": \"Benjamin\",\n            \"issuer\": \"Air Canada\",\n            \"icon\": null,\n            \"info\": {\n                \"secret\": \"KUVJJOM753IHTNDSZVCNKL7GII\",\n                \"algo\": \"SHA256\",\n                \"digits\": 7,\n                \"counter\": 50\n            }\n        },\n        {\n            \"type\": \"hotp\",\n            \"uuid\": \"b25f8815-007f-40f7-a700-ce058ac05435\",\n            \"name\": \"Mason\",\n            \"issuer\": \"WWE\",\n            \"icon\": null,\n            \"info\": {\n                \"secret\": \"5VAML3X35THCEBVRLV24CGBKOY\",\n                \"algo\": \"SHA512\",\n                \"digits\": 8,\n                \"counter\": 10300\n            }\n        },\n        {\n            \"type\": \"steam\",\n            \"uuid\": \"5b11ae3b-6fc3-4d46-8ca7-cf0aea7de920\",\n            \"name\": \"Sophia\",\n            \"issuer\": \"Boeing\",\n            \"icon\": null,\n            \"info\": {\n                \"secret\": \"JRZCL47CMXVOQMNPZR2F7J4RGI\",\n                \"algo\": \"SHA1\",\n                \"digits\": 5,\n                \"period\": 30\n            }\n        }\n    ]\n}\n```\n\n### Other formats\n\nYou can also add the `-f / --format` option to print the plaintext output as `csv` or as a `pretty` CSV-like String padded with spaces.\n\n#### csv\n\n```bash\n# Enter the above password when prompted\nruby lib/decrypt.rb test/encrypted_test.json -f csv\n```\n\n```csv\nuuid,type,name,issuer,info.secret,info.period,info.digits,info.counter,info.algo,icon\n3ae6f1ad-2e65-4ed2-a953-1ec0dff2386d,totp,Mason,Deno,4SJHB4GSD43FZBAI7C2HLRJGPQ,30,6,,SHA1,\n84b55971-a3d2-4173-a5bb-0aea113dbc17,totp,James,SPDX,5OM4WOOGPLQEF6UGN3CPEOOLWU,20,7,,SHA256,\n3deaff2e-f181-4837-80e1-fdf0c54e9363,totp,Elijah,Airbnb,7ELGJSGXNCCTV3O6LKJWYFV2RA,50,8,,SHA512,\n0a8c0571-ff6f-4b02-aa4b-50553b4fb4fe,hotp,James,Issuu,YOOMIXWS5GN6RTBPUFFWKTW5M4,,6,1,SHA1,\n03e572f2-8ebd-44b0-a57e-e958af74815d,hotp,Benjamin,Air Canada,KUVJJOM753IHTNDSZVCNKL7GII,,7,50,SHA256,\nb25f8815-007f-40f7-a700-ce058ac05435,hotp,Mason,WWE,5VAML3X35THCEBVRLV24CGBKOY,,8,10300,SHA512,\n5b11ae3b-6fc3-4d46-8ca7-cf0aea7de920,steam,Sophia,Boeing,JRZCL47CMXVOQMNPZR2F7J4RGI,30,5,,SHA1,\n```\n\n#### pretty\n\n```bash\n# Enter the above password when prompted\nruby lib/decrypt.rb test/encrypted_test.json -f pretty\n```\n\n```csv\nuuid                                  type   name      issuer      info.secret                 info.period  info.digits  info.counter  info.algo  icon\n3ae6f1ad-2e65-4ed2-a953-1ec0dff2386d  totp   Mason     Deno        4SJHB4GSD43FZBAI7C2HLRJGPQ  30           6                          SHA1\n84b55971-a3d2-4173-a5bb-0aea113dbc17  totp   James     SPDX        5OM4WOOGPLQEF6UGN3CPEOOLWU  20           7                          SHA256\n3deaff2e-f181-4837-80e1-fdf0c54e9363  totp   Elijah    Airbnb      7ELGJSGXNCCTV3O6LKJWYFV2RA  50           8                          SHA512\n0a8c0571-ff6f-4b02-aa4b-50553b4fb4fe  hotp   James     Issuu       YOOMIXWS5GN6RTBPUFFWKTW5M4               6            1             SHA1\n03e572f2-8ebd-44b0-a57e-e958af74815d  hotp   Benjamin  Air Canada  KUVJJOM753IHTNDSZVCNKL7GII               7            50            SHA256\nb25f8815-007f-40f7-a700-ce058ac05435  hotp   Mason     WWE         5VAML3X35THCEBVRLV24CGBKOY               8            10300         SHA512\n5b11ae3b-6fc3-4d46-8ca7-cf0aea7de920  steam  Sophia    Boeing      JRZCL47CMXVOQMNPZR2F7J4RGI  30           5                          SHA1\n```\n\n### Hiding unwanted fields\n\nWhen the `-f / --format` option is set to `csv` or `pretty`, you can use the `-e / --except` option to hide unwanted fields. Non-existent fields are silently ignored.\n\n```bash\n# Enter the above password when prompted\nruby lib/decrypt.rb test/encrypted_test.json -f pretty -e icon,icon_mime,icon_hash,favorite,note,uuid\n```\n\n```csv\ntype   name      issuer      info.secret                 info.period  info.digits  info.counter  info.algo\ntotp   Mason     Deno        4SJHB4GSD43FZBAI7C2HLRJGPQ  30           6                          SHA1\ntotp   James     SPDX        5OM4WOOGPLQEF6UGN3CPEOOLWU  20           7                          SHA256\ntotp   Elijah    Airbnb      7ELGJSGXNCCTV3O6LKJWYFV2RA  50           8                          SHA512\nhotp   James     Issuu       YOOMIXWS5GN6RTBPUFFWKTW5M4               6            1             SHA1\nhotp   Benjamin  Air Canada  KUVJJOM753IHTNDSZVCNKL7GII               7            50            SHA256\nhotp   Mason     WWE         5VAML3X35THCEBVRLV24CGBKOY               8            10300         SHA512\nsteam  Sophia    Boeing      JRZCL47CMXVOQMNPZR2F7J4RGI  30           5                          SHA1\n```\n\n## Testing\n\n```bash\ngem install bundler\nbundle install\nbundle exec rspec -r spec_helper\n```\n\n## Vendoring Bundled Gems\n\n```bash\nrm -rf vendor/\ngem unpack csv --target=vendor/gems/\n```\n\nThen update gem versions in Gemfile, and run `bundle install`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felliotwutingfeng%2Faegis-backup-decryptor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felliotwutingfeng%2Faegis-backup-decryptor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felliotwutingfeng%2Faegis-backup-decryptor/lists"}