{"id":23964513,"url":"https://github.com/codyverse/basex64","last_synced_at":"2026-02-04T06:03:19.866Z","repository":{"id":270944418,"uuid":"911905739","full_name":"codyverse/basex64","owner":"codyverse","description":"A simple cryptographic tool for storing data in distributed version control systems like Git.","archived":false,"fork":false,"pushed_at":"2025-01-04T09:07:11.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T00:43:35.844Z","etag":null,"topics":["ascii-encryption","ascii-encryption-python","base64","base64-encryption","cipher","cryptography","cypher","encryption","encryption-decryption","python","python-3","python-cypher","python-encryption","python-script","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","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/codyverse.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2025-01-04T06:36:58.000Z","updated_at":"2025-02-20T11:56:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"6b2a042e-90d1-4100-8c90-12774cf50ff1","html_url":"https://github.com/codyverse/basex64","commit_stats":null,"previous_names":["codyverse/basex64"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/codyverse/basex64","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codyverse%2Fbasex64","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codyverse%2Fbasex64/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codyverse%2Fbasex64/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codyverse%2Fbasex64/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codyverse","download_url":"https://codeload.github.com/codyverse/basex64/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codyverse%2Fbasex64/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29072473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T03:31:03.593Z","status":"ssl_error","status_checked_at":"2026-02-04T03:29:50.742Z","response_time":62,"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":["ascii-encryption","ascii-encryption-python","base64","base64-encryption","cipher","cryptography","cypher","encryption","encryption-decryption","python","python-3","python-cypher","python-encryption","python-script","python3"],"created_at":"2025-01-06T21:39:04.899Z","updated_at":"2026-02-04T06:03:19.861Z","avatar_url":"https://github.com/codyverse.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BaseX64\n\n## What is it?\n\nThe **BaseX64** script is a simple cryptographic tool that uses dynamic `XOR` for encryption, combined with a `Base64`-like encoding scheme, ensuring that only printable `ASCII` characters are used. Additionally, it supports line-by-line ciphering, which ensures that only the corresponding lines in the ciphertext are updated after changes in the original data and re-encryption.\n\nWhy reinvent the wheel? I needed a `Python` tool that would allow storing encrypted data on distributed version control systems such as `Git`, while meeting the following criteria:\n\n  - Using only `ASCII` characters.\n  - Ensuring that small changes in the source do not cause a total change in the ciphertext.\n\nWhile `AES-CTR` could fulfill these requirements, `Python` does not have native `AES` support in its standard library. To avoid relying on third-party libraries, I decided to implement a custom solution.\n\n## Main features\n\n  - Encrypt and decrypt files using a Base64-like scheme with dynamic XOR shifts.\n  - Customizable initialization vector (IV) length and divided store mode.\n  - Handling for both inline data and file input/output.\n  - Ability to handle IV-based dynamic shifts for encryption/decryption.\n  - Command-line interface (CLI) for simple usage.\n\n## Installation\n\n- from GitHub\n  ```bash\n  git clone https://github.com/codyverse/basex64.git\n  cd basex64\n  ```\n\n- via PIP\n  ```bash\n  pip install basex64\n  ```\n\n## Usage\n\n### Options:\n\n```\n  -h, --help          Show this help message and exit.\n  -i, --input         Path to the input file.\n  -o, --output        Path to the output file.\n      --inline        Inline data to encrypt/decrypt.\n  -e, --encrypt       Encrypt the input file or data.\n  -d, --decrypt       Decrypt the input file or data.\n  -k, --key           Encryption/Decryption key.\n  -l, --vector-length Length of the initialization vector (IV). Default: 16.\n  -s, --vector-slice  Slice n symbols from the IV and prepend them to the ciphertext. Default: 0.\n  -f, --force         Force rewrite of output file if it exists.\n      --self-test     Self-test mode to verify encryption/decryption integrity with random data.\n```\n\n### Examples\n\n- Encrypt the `input.txt` file and save the output as `output.enc`:\n  ```\n  python3 basex64.py -e -k your_secret_key -i input.txt -o output.enc\n  ```\n\n- Decrypt the `output.enc` file and save the decrypted data to `output.txt`:\n  ```\n  python3 basex64.py -d -k your_secret_key -i output.enc -o output.txt\n  ```\n\n- Encrypt inline data:\n  ```\n  python3 basex64.py -e -k your_secret_key --inline \"Hello, World!\"\n  ```\n\n- Decrypt inline data:\n  ```\n  python3 basex64.py -d -k your_secret_key --inline \"20c+U4QAm0AjyUhe3F374d794a95cdcfd8\"\n  ```\n\n- Perform self-testing (generating random data):\n  ```\n  python3 basex64.py --self-test 100\n  ```\n  This will run 100 iterations of random data encryption and decryption with random parameters to ensure the integrity of the cipher.\n\n- Encrypt inline data with the IV slicing using, for example, `--vector-slice 8`:\n  ```\n  python3 basex64.py -e -k your_secret_key --inline \"Hello, World!\" -s 8\n  ```\n  The encryption result will be `374d794a20c+U4QAm0AjyUhe3F95cdcfd8`. In this case, `8` IV characters (`374d794a`) are added at the beginning, and the remainder (`95cdcfd8`) is left at the end of the data ciphertext (`20c+U4QAm0AjyUhe3F`). Obviously, if specify `--vector-length 16` and `--vector-slice 16`, the entire IV (`374d794a95cdcfd8`) will be moved to the beginning of the ciphertext and the result will be `20c+U4QAm0AjyUhe3F374d794a95cdcfd8`.\n\n  This changes the structure of the ciphertext and adds an additional layer of security, since without knowing the encryption parameters, an attacker cannot directly recover the IV from the ciphertext.\n  **Important**: To decrypt the ciphertext, you must specify the same `--vector-slice` value used during encryption.\n\n## Contributing\n\nFeel free to contribute by submitting issues or pull requests!\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodyverse%2Fbasex64","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodyverse%2Fbasex64","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodyverse%2Fbasex64/lists"}