{"id":28331829,"url":"https://github.com/irtsa-dev/grsa","last_synced_at":"2026-02-26T08:38:56.031Z","repository":{"id":268174839,"uuid":"871528843","full_name":"irtsa-dev/grsa","owner":"irtsa-dev","description":"A simple implementation of RSA Key Generation in greyscript for the game Grey Hack. Comes with included encryption and decryption functions.","archived":false,"fork":false,"pushed_at":"2024-10-13T00:33:13.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-25T05:42:15.537Z","etag":null,"topics":["greyhack","greyscript","module","rsa","rsa-cryptography","scripting"],"latest_commit_sha":null,"homepage":"","language":null,"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/irtsa-dev.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":"2024-10-12T08:02:42.000Z","updated_at":"2025-05-29T23:31:18.000Z","dependencies_parsed_at":"2024-12-14T22:40:18.832Z","dependency_job_id":"2c81559a-7a2f-44b5-8565-9ab49cae657b","html_url":"https://github.com/irtsa-dev/grsa","commit_stats":null,"previous_names":["irtsa-dev/grsa"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/irtsa-dev/grsa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irtsa-dev%2Fgrsa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irtsa-dev%2Fgrsa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irtsa-dev%2Fgrsa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irtsa-dev%2Fgrsa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/irtsa-dev","download_url":"https://codeload.github.com/irtsa-dev/grsa/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/irtsa-dev%2Fgrsa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29854025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T22:37:40.667Z","status":"online","status_checked_at":"2026-02-26T02:00:06.774Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["greyhack","greyscript","module","rsa","rsa-cryptography","scripting"],"created_at":"2025-05-26T18:57:27.388Z","updated_at":"2026-02-26T08:38:56.026Z","avatar_url":"https://github.com/irtsa-dev.png","language":null,"readme":"\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/user-attachments/assets/cec56db6-eecb-44ea-9cab-1c7f8ed59575\"\n        height=\"280\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/irtsa-dev/grsa/releases/tag/v1.0.0\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/release-1.0.0-brightgreen\"\n            alt=\"release\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/irtsa-dev/grsa/issues\"\u003e\n        \u003cimg src=\"https://custom-icon-badges.demolab.com/github/issues-raw/irtsa-dev/grsa?logo=issue\"\n            alt=\"issues\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/irtsa-dev/grsa/pulls\"\u003e\n        \u003cimg src=\"https://custom-icon-badges.demolab.com/github/issues-pr/irtsa-dev/grsa?logo=git-pull-request\"\n            alt=\"pulls\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003cbr /\u003e\n\u003cb\u003eGRSA\u003c/b\u003e is a simple implementation of \u003cb\u003e\u003ca href=\"https://en.wikipedia.org/wiki/RSA_(cryptosystem)\"\u003eRSA\u003c/a\u003e Key Generation\u003c/b\u003e in \u003ca href=\"https://codedocs.ghtools.xyz\"\u003egreyscript\u003c/a\u003e for the game \u003ca href=\"https://store.steampowered.com/app/605230/Grey_Hack\"\u003eGrey Hack\u003c/a\u003e. Comes with included encryption and decryption functions.\n\u003c/p\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003ch2 align=\"center\"\u003eInstallation\u003c/h2\u003e\n\u003cp align=\"center\"\u003e\nTo install, first copy the code of \u003cb\u003egrsa.src\u003c/b\u003e file found \u003ca href=\"https://github.com/irtsa-dev/grsa/blob/main/grsa/grsa.src\"\u003ehere\u003c/a\u003e and paste it into an open \u003cb\u003eCode Editor\u003c/b\u003e process in-game. Afterwards, you must save this to \u003ccode\u003e/bin\u003c/code\u003e as \u003ccode\u003egrsa\u003c/code\u003e \u003ci\u003e(or optionally any path and name you will later rememeber)\u003c/i\u003e making sure to enable \u003cb\u003eAllow import\u003c/b\u003e. Once you have done this, you may not utilize \u003ccode\u003eimport_code(\"/bin/grsa\")\u003c/code\u003e or if you hadn't saved it as recommended then \u003ccode\u003eimport_code(\"(path-to-file)\"\u003c/code\u003e at the top of any file that you wish to use \u003cb\u003eGRSA\u003c/b\u003e in.\n\u003c/p\u003e\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\nOptionally, you can simply copy the code of \u003cb\u003egrsa.src\u003c/b\u003e file found \u003ca href=\"https://github.com/irtsa-dev/grsa/blob/main/grsa/grsa.src\"\u003ehere\u003c/a\u003e and paste it at the top of any file you wish to use \u003cb\u003eGRSA\u003c/b\u003e in.\n\u003c/p\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003ch2 align=\"center\"\u003eUsage\u003c/h2\u003e\n\u003cp align=\"center\"\u003e\nPrimary usage utilizes \u003cb\u003ethree\u003c/b\u003e functions in the \u003ccode\u003egrsa.src\u003c/code\u003e file with \u003cb\u003etwo\u003c/b\u003e additional functions for secondary usage.\n\u003c/p\u003e\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\nThe first function you must utilize is the \u003ccode\u003egenKeyPair()\u003c/code\u003e function which takes an argument \u003ccode\u003eprimeLength\u003c/code\u003e which dictates how many digits long the prime numbers \u003ccode\u003ep\u003c/code\u003e and \u003ccode\u003eq\u003c/code\u003e are. This function will return a type \u003cb\u003eList\u003c/b\u003e where the first element is the \u003ccode\u003epublickey\u003c/code\u003e and the second element is the \u003ccode\u003eprivatekey\u003c/code\u003e. Do note that the larger the \u003ccode\u003eprimeLength\u003c/code\u003e value, the longer it will take to generate the \u003cb\u003ekeys\u003c/b\u003e.\n\u003c/p\u003e\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\nAfterwards, you will primarily utilize \u003ccode\u003efullencrypt()\u003c/code\u003e and \u003ccode\u003efulldecrypt()\u003c/code\u003e functions. The encryption function takes in the arguments of \u003ccode\u003etext\u003c/code\u003e and \u003ccode\u003epublickey\u003c/code\u003e and will return the given text encrypted using the publickey. The decryption function takes in the arguments of \u003ccode\u003etext\u003c/code\u003e and \u003ccode\u003eprivatekey\u003c/code\u003e and will return the given text decrypted using the privatekey.\n\u003c/p\u003e\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\nOptionally, if you do not want the characters of the encrypted text to be returned, you can utilize the \u003ccode\u003eencrypt()\u003c/code\u003e function which takes the same arguments of the \u003ccode\u003efullencrypt()\u003c/code\u003e function but will return the unicode representations of the encrypted text instead of the characters. You can also optionally utilize the \u003ccode\u003edecrypt()\u003c/code\u003e function which takes the list of unicode numbers from the \u003ccode\u003eencrypt()\u003c/code\u003e function instead as an argument (\u003ccode\u003enums\u003c/code\u003e) along with the \u003ccode\u003eprivatekey\u003c/code\u003e and will return the decrypted text.\n\u003c/p\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\nBelow are examples of the functions in use:\n\u003c/p\u003e\n\n```js\nKeys = genKeyPair(4)\npuk = Keys[0]\npik = Keys[1]\n\n\ntext = \"This is sample text.\"\nencryptedText = fullencrypt(text, puk)\nprint(encryptedText) // Will print off the encrypted text.\n\ndecryptedText = fulldecrypt(encryptedText, pik)\nprint(decryptedText) // Will print off the decrypted text which should be the same as the original text.\n```\n```js\nKeys = genKeyPair(4)\npuk = Keys[0]\npik = Keys[1]\n\n\ntext = \"This is sample text.\"\nencryptedText = encrypt(text, puk)\nprint(encryptedText) // Will print off the unicode values of the encrypted text\n\ndecryptedText = decrypt(encryptedText, pik)\nprint(decryptedText) // Will print off the decrypted text which should be the same as the original text.\n```\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003ch2 align=\"center\"\u003eAdditional Notes\u003c/h2\u003e\n\u003cp align=\"center\"\u003e\nNote that functions may be added, removed, changed, or even renamed in future updates. Functions may also have their functionality changed in future updates by request or if it seems to work better another way. You may utilize the \u003ca href=\"https://github.com/irtsa-dev/grsa/discussions\"\u003eDiscussions\u003c/a\u003e tab to request changes or additions and the \u003ca href=\"https://github.com/irtsa-dev/grsa/issues\"\u003eIssues\u003c/a\u003e tab to report issues/bugs you find.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firtsa-dev%2Fgrsa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firtsa-dev%2Fgrsa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firtsa-dev%2Fgrsa/lists"}