{"id":21317094,"url":"https://github.com/duskybomb/hill-cipher","last_synced_at":"2025-10-27T09:38:04.192Z","repository":{"id":107698263,"uuid":"109306144","full_name":"duskybomb/Hill-Cipher","owner":"duskybomb","description":"Improved version of Hill Cipher algorithm which now accepts alphanumeric and special characters.","archived":false,"fork":false,"pushed_at":"2018-03-30T15:48:40.000Z","size":15,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T10:47:00.019Z","etag":null,"topics":["algorithm","hillcipher"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/duskybomb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-11-02T18:55:11.000Z","updated_at":"2018-03-30T15:48:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"ae714bb3-4705-44d0-863a-365b1829f075","html_url":"https://github.com/duskybomb/Hill-Cipher","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duskybomb%2FHill-Cipher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duskybomb%2FHill-Cipher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duskybomb%2FHill-Cipher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/duskybomb%2FHill-Cipher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/duskybomb","download_url":"https://codeload.github.com/duskybomb/Hill-Cipher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243796647,"owners_count":20349252,"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":["algorithm","hillcipher"],"created_at":"2024-11-21T18:41:54.336Z","updated_at":"2025-10-27T09:37:59.144Z","avatar_url":"https://github.com/duskybomb.png","language":"C++","readme":"# Hill-Cipher\n\u003cp\u003eHow often we need to send someone a message and make sure no one else reads it. To encounter this problem the messages sent across to others are encoded more often than not. The algorithms used are as complex as Nazi’s Enigma and as simple as Caesar Cipher. \nHill Cipher, invented by Lester S Hill in 1029, is a polygraphic substitution cipher based on Linear Algebra and particular requires the user to have an elementary understanding of the matrices. In this project, we have developed an extended algorithm for Hill Cipher (both for encryption and decryption) and implement it on MATLAB and C++.\u003c/p\u003e\n\n\u003ch2\u003eSource Code Files\u003c/h2\u003e\n\t\u003ch5\u003eCPP\u003c/h5\u003e\n\t\u003cb\u003emainhillcipher.cpp\u003c/b\u003e: this file contains 'main' function\u003cbr\u003e\n\t\u003cb\u003eencrypt.cpp\u003c/b\u003e: this is to write the algorithm of encrypting text using hill cipher\u003cbr\u003e\n\t\u003cb\u003edecrypt.cpp\u003c/b\u003e: this is to write the algorithm of decrypting text using hill cipher\u003cbr\u003e\n\t\u003cb\u003elinearalgebra.cpp\u003c/b\u003e: this file contains the basic operations implemented on the matrix\u003cbr\u003e\n\t\u003cb\u003ehillcipher.h\u003c/b\u003e: this is the header file which binds all the files\u003cbr\u003e\n\t\u003ch5\u003eMATLAB\u003c/h5\u003e\n\t\u003cb\u003eHill_Cipher.m\u003c/b\u003e : this file contains 'main' function\u003cbr\u003e\n\t\u003cb\u003eEncrypt.m\u003c/b\u003e: this is to write the algorithm of encrypting text using hill cipher\u003cbr\u003e\n\t\u003cb\u003eDecrypt.m\u003c/b\u003e: this is to write the algorithm of decrypting text using hill cipher\u003cbr\u003e\n\u003ch2\u003eMethodology\u003c/h2\u003e\n\u003ch3\u003eEncrypt()\u003c/h3\u003e\n\u003cb\u003eInput\u003c/b\u003e\n\u003col\u003e\n\t\u003cli\u003eA 3x3 matrix which works as a key matrix, key[3][3]\u003c/li\u003e\n\t\u003cli\u003eA plaintext string message\u003c/li\u003e\n\u003c/ol\u003e\n\n\u003cb\u003eOutput\u003c/b\u003e\n\u003col\u003e\n\t\u003cli\u003eAn encoded string\u003c/li\u003e\n\u003c/ol\u003e\n\n\u003cb\u003eConstrains\u003c/b\u003e\n\u003col\u003e\n\t\u003cli\u003e-32,000 ≤ key ≤ 32,000\u003c/li\u003e\n\t\u003cli\u003emessage ∈ {A, B, C …, Y, Z}\u003c/li\u003e\n\u003c/ol\u003e\n\n\u003cb\u003eWorking\u003c/b\u003e\n\u003col\u003e\n\t\u003cli\u003eConvert plaintext to ASCII number then subtract 33.\u003c/li\u003e\n\t\u003cli\u003eMultiply key matrix with the plain text and mod92 operator\u003c/li\u003e\n\t\u003cli\u003eAdd 33 to the resultant matrix to get the ASCII code of respective elements in the matrix\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch3\u003eDecrypt()\u003c/h3\u003e\n\u003cb\u003eOutput\u003c/b\u003e\n\u003col\u003e\n\t\u003cli\u003eDecoded message same as the initial input message\u003c/li\u003e\n\u003c/ol\u003e\n\u003cb\u003eWorking\u003c/b\u003e\n\u003col\u003e\n\u003cli\u003eFinding inverse of key\u003c/li\u003e\n\u003cli\u003eMultiply the inverse of key matrix with the ASCII matrix\u003c/li\u003e\n\u003cli\u003eUse mod92 operator on the matrix and add 33 to get elements in ASCII form.\u003c/li\u003e\n\u003c/ol\u003e\n\n## Authors\n\n\u003ca href=\"http://ducic.ac.in/\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/16596327/30467922-9d4985ce-9a05-11e7-81aa-9f5348eb40de.png\" align=\"right\" width=\"300\"/\u003e\u003c/a\u003e\n\n* **[Harshit Joshi](https://github.com/duskybomb)** \n* **[Manas Awasthi](https://github.com/the-marvex)** \n* **[Mayank Malik](https://github.com/MayankMalikk)**\n\t\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduskybomb%2Fhill-cipher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduskybomb%2Fhill-cipher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduskybomb%2Fhill-cipher/lists"}