{"id":17223837,"url":"https://github.com/bartobri/mrrcrypt","last_synced_at":"2025-04-14T00:25:11.069Z","repository":{"id":82434664,"uuid":"69059675","full_name":"bartobri/mrrcrypt","owner":"bartobri","description":"A command line encryption/decryption tool using an adaptive mirror field algorithm.","archived":false,"fork":false,"pushed_at":"2024-12-18T03:51:16.000Z","size":224,"stargazers_count":48,"open_issues_count":0,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-27T14:47:08.273Z","etag":null,"topics":["crypto","cryptography","encryption"],"latest_commit_sha":null,"homepage":"","language":"C","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/bartobri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"bartobri"}},"created_at":"2016-09-23T20:48:54.000Z","updated_at":"2024-12-18T03:51:20.000Z","dependencies_parsed_at":"2023-06-15T16:30:13.009Z","dependency_job_id":null,"html_url":"https://github.com/bartobri/mrrcrypt","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartobri%2Fmrrcrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartobri%2Fmrrcrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartobri%2Fmrrcrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bartobri%2Fmrrcrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bartobri","download_url":"https://codeload.github.com/bartobri/mrrcrypt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248800104,"owners_count":21163404,"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":["crypto","cryptography","encryption"],"created_at":"2024-10-15T04:09:23.120Z","updated_at":"2025-04-14T00:25:11.041Z","avatar_url":"https://github.com/bartobri.png","language":"C","funding_links":["https://github.com/sponsors/bartobri"],"categories":[],"sub_categories":[],"readme":"![Version](https://img.shields.io/badge/Version-0.2.0-green.svg)\n\nLike this project? Consider sponsoring me: [https://github.com/sponsors/bartobri](https://github.com/sponsors/bartobri)\n\nMrrCrypt\n========\n\nThe goal of this project is to provide a simple and robust command-line tool\nfor encrypting and decrypting data using an adaptive mirror field algorithm.\n\n**WARNING** - While the results of this program pass almost all cryptographic\ntests for randomness (see below), it has not undergone an official peer\nreview process. Use at your own risk.\n\nEncrypted output passes almost all tests for randmoness using the\n[Statistical Test Suite](http://csrc.nist.gov/groups/ST/toolkit/rng/stats_tests.html)\ndeveloped by the National Institute for Standards and Technology (NIST),\nand the [diehard test suite](https://en.wikipedia.org/wiki/Diehard_tests).\nSee [RANDOMNESS_TEST](RANDOMNESS_TEST.md) for test results.\n\nA 4352 byte key is used for encryption and decryption, and is highly resilient to\nbrute force attacks. The total number of key permutations is: 256!\\*3^(64\\*64) ≈ 1.66e+2461\n\nThe adaptive mirror field algorithm implemented in this project is the first\nof it's kind, though it may have some similar attributes to a block cypher.\nFor more information on how it works, see [ADAPTIVE_MIRROR_FIELD](ADAPTIVE_MIRROR_FIELD.md).\n\n*MrrCrypt in debug mode shows how encryption/decryption occurs:*\n\n![MrrCrypt's Adaptve Mirror Field](http://www.brianbarto.info/static/mrrcrypt/mrrcrypt.gif)\n\nTable of Contents\n-----------------\n\n1. [Quick Examples](#quick-examples)\n2. [Download and Install](#download-and-install)\n3. [Usage](#usage)\n4. [Key Management](#key-management)\n5. [License](#license)\n\nQuick Examples\n--------------\n\n**Encrypting/Decrypting a Short String**\n\n```\n# Encrypt\n$ printf \"Attack at Dawn\" | mrrcrypt \u003e string.encrypted\n\n# Decrypt\n$ cat string.encrypted | mrrcrypt\nAttack at Dawn\n\n```\n\n**Encrypting/Decrypting the Contents of a File**\n\n```\n# Encrypt\n$ cat secret.jpg | mrrcrypt \u003e secret.jpg.encrypted\n\n# Decrypt\n$ cat secret.jpg.encrypted | mrrcrypt \u003e secret.jpg\n```\n\n**Dual Key Encryption/Decryption**\n\nSuppose Bob and John want to encrypt a file so that they each hold a\ndistinct key required for decryption. MrrCrypt can easily accomplish this.\n\n```\n# Encrypt\n$ cat secret.txt | mrrcrypt -a -k bobs_key | mrrcrypt -a -k johns_key \u003e secret.txt.encrypted\n\n# Decrypt\n$ cat secret.txt.encrypted | mrrcrypt -k johns_key | mrrcrypt -k bobs_key \u003e secret.txt\n```\n\nThe `-k \u003cname\u003e` option specifies a key file to use, and the `-a`\noption auto-creates it if it doesn't exist. After performing the first\ncommand to create two new keys and encrypt the file, they each copy\ntheir respective key files for themselves (see [Key Management](#key-management))\nand delete the originals. To decrypt, they each copy their key files back\nto the original location and perform the second command.\n\nDownload and Install\n--------------------\n\nIn order to download and build this program, you will need to have `git`,\n`gcc`, and `make` installed. Install them from your package manager if not\nalready installed.\n\n```\n$ which make\n/usr/bin/make\n\n$ which gcc\n/usr/bin/gcc\n\n$ which git\n/usr/bin/git\n```\n\nDownload and Build:\n\n```\n$ git clone https://github.com/bartobri/mrrcrypt.git\n$ cd mrrcrypt\n$ make\n```\n\nInstall:\n\n```\n$ sudo make install\n```\n\nUninstall:\n\n```\n$ sudo make uninstall\n```\n\nUsage\n-----\n\n`mrrcrypt` processes data from stdin and writes the results to stdout.\nUse I/O redirection for generating input and capturing output.\n\n**Basic Encryption**\n\n```\n# Encrypt a string\n$ echo \"This is my secret\" | mrrcrypt \u003e secret_string.encrypted\n\n# Encrypt a file\n$ cat secret_photo.jpg | mrrcrypt \u003e secret_photo.jpg.encrypted\n```\n\n**Basic Decryption**\n\n```\n# Decrypt a string\n$ cat secret_string.encrypted | mrrcrypt\nThis is my secret\n\n# Decrypt a file\n$ cat secret_photo.jpg.encrypted | mrrcrypt \u003e secret_photo.jpg\n```\n\n**Command Line Options**\n\n`-k key_file`\n\nSpecify a key to use. An argument is required. The argument can be the name\nof a key file that exists in the default key directory, or it can be a full\npath to a key file that exists elsewhere on disk. Note that when this option\nis not used, mrrcrypt uses the default key. See [Key Management](#key-management)\nfor more info.\n\n`-a`\n\nAuto-create a new key if the one specified by `-k key_file` does not exist.\n\n`-d ms`\n\nDebug mode. This draws the mirror field and animates the decryption process\nfor debugging purposes. You will need a minimum terminal size of 132x68.\n\"ms\" specifies the time in milliseconds for each step through the mirror\nfield. Values around the mirror field perimeter are shown in hexadecimal.\nThere are a total of 256 values represented in the 64x64 grid, one for every\npossible arrangement of bits in a single byte.\n\nKey Management\n--------------\n\nKeys are stored in `$HOME/.config/mrrcrypt/`\n\nThe first time you run `mrrcrypt` it will automatically generate a unique\ndefault key. The default key will be used when no key is specified.\n\nYou may wish to share your default key (or any other key) with others so\nthey can decrypt your messages. Keys that are shared by other individuals\ncan be used with the `-k key_file` option.\n\nNote that \"key_file\" corresponds to the name of the key file. If John\nencrypts messages using his \"default\" key file, and gives a copy to Bob so he\ncan decrypt them, Bob should rename the file to \"johns_key\" so he does not\noverwrite his own default key file. Then Bob can then use `-k johns_key` when\ndecrypting data sent from John.\n\nKeys are stored in Base64 encoded format.\n\nLicense\n-------\n\nThis program is free software; you can redistribute it and/or modify it under the terms of the the\nGNU General Public License. See [LICENSE](LICENSE) for more details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartobri%2Fmrrcrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbartobri%2Fmrrcrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbartobri%2Fmrrcrypt/lists"}