{"id":17815618,"url":"https://github.com/ridwanmsharif/prsa","last_synced_at":"2025-12-14T12:46:16.358Z","repository":{"id":57455239,"uuid":"74636888","full_name":"ridwanmsharif/prsa","owner":"ridwanmsharif","description":"RSA Public Key Encryption","archived":false,"fork":false,"pushed_at":"2017-01-02T16:49:53.000Z","size":12,"stargazers_count":18,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-22T22:39:14.394Z","etag":null,"topics":["cryptosystem","decryption-key","encryption-key","public-key-cryptography","rsa","rsa-scheme"],"latest_commit_sha":null,"homepage":null,"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/ridwanmsharif.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}},"created_at":"2016-11-24T04:06:32.000Z","updated_at":"2024-12-01T23:06:54.000Z","dependencies_parsed_at":"2022-08-26T06:01:16.250Z","dependency_job_id":null,"html_url":"https://github.com/ridwanmsharif/prsa","commit_stats":null,"previous_names":["ridwanmsharif/rsa"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ridwanmsharif/prsa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ridwanmsharif%2Fprsa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ridwanmsharif%2Fprsa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ridwanmsharif%2Fprsa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ridwanmsharif%2Fprsa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ridwanmsharif","download_url":"https://codeload.github.com/ridwanmsharif/prsa/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ridwanmsharif%2Fprsa/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268629566,"owners_count":24281170,"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","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"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":["cryptosystem","decryption-key","encryption-key","public-key-cryptography","rsa","rsa-scheme"],"created_at":"2024-10-27T16:14:27.183Z","updated_at":"2025-12-14T12:46:11.319Z","avatar_url":"https://github.com/ridwanmsharif.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RSA implementation (Python)\n\nImplementation of the algorithms defined by the RSA scheme as a Command Line Utility.\nComputes ciphertext from message and Computes message from ciphertext granted access to secret \ndecryption key by using Extended Euclidean Algorithm, Unicode Points,\nModular Arithmetic  and [Modular Exponentiation](https://en.wikipedia.org/wiki/Modular_exponentiation)\n\n## Setup\n```sh\npip install primesieve\npip install prsa\n```\n\n## What is the RSA Scheme?\n\n[RSA](https://en.wikipedia.org/wiki/RSA_(cryptosystem)) is one of the first practical public-key \ncryptosystems and is widely used for secure data transmission. In this cryptosystem, the encryption key \nis public and differs from the decryption key which is kept secret. In RSA, this asymmetry is based on \nthe practical difficulty of factoring the product of two large prime numbers, the factoring problem. \nRSA is made of the initial letters of the surnames of Ron Rivest, Adi Shamir, and Leonard Adleman - The minds behind\nthe RSA Scheme.\n\n## Usage\n\n**Help**\n\n```sh\n~$ prsa -h\nusage: PRSA [-h] {decrypt,encrypt,generate} ...\n\nImplementation of the algorithms defined by the RSA scheme in Python3.\nComputes ciphertext from message and Computes message from ciphertext granted\naccess to secret decryption key by using Extended Euclidean Algorithm, Unicode\nPoints, Modular Arithmetic and Modular Exponentiation\n\npositional arguments:\n  {decrypt,encrypt,generate}\n    decrypt             Decrypt ciphertext using RSA\n    encrypt             Encrypt message using RSA\n    generate            Find a key pair given the two natural numbers\n\noptional arguments:\n  -h, --help            show this help message and exit\n```\n\n**Generate Help**\n\n```sh\n~$ prsa generate -h\nusage: PRSA generate [-h] p q\n\npositional arguments:\n  p           An integer for setting a prime (p)\n  q           An integer for setting a prime (q)\n\noptional arguments:\n  -h, --help  show this help message and exit\n```\n\n**Encrypt Help**\n\n```\n~$ prsa encrypt -h\nusage: PRSA encrypt [-h] M e n\n\npositional arguments:\n  M           Message to be encrypted\n  e           A natural number that serves as the first element of the public\n              key\n  n           A natural number that serves as the second element of the\n              private key\n\noptional arguments:\n  -h, --help  show this help message and exit\n```\n**Decrypt Help**\n\n```\n~$ prsa decrypt -h\nusage: PRSA decrypt [-h] C d n\n\npositional arguments:\n  C           Encoded ciphertext to be decrypted\n  d           A natural number that serves as the first element of the private\n              key\n  n           A natural number that serves as the second element of the\n              private key\n\noptional arguments:\n  -h, --help  show this help message and exit\n```\n\n## Example\n\n**Generate Keys, Encrypt 'msg' and then Decrypt**\n \n```sh\n~$ prsa generate 31974198 84197413\n   {\n\t'Public': [579312365, 1042765315429168511L], \n\t'Private': [802880348865349973L, 1042765315429168511L],\n   }\n\n~$ prsa encrypt \"msg\" 579312365 1042765315429168511\n   585349761260265530\n\n~$ prsa decrypt 585349761260265530 802880348865349973 1042765315429168511\n   msg\n```\n\n## Disclaimer\n\nPurely experimental project. Designed for learning purposes not production use.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at [@ridwanmsharif](https://www.github.com/ridwanmsharif)\n\n## Author\n\nRidwan M. Sharif: [E-mail](ridwanmsharif@hotmail.com), [@ridwanmsharif](https://www.github.com/ridwanmsharif)\n\n## License\n\nThe command line utility is available as open source under the terms of\nthe [MIT License](https://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fridwanmsharif%2Fprsa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fridwanmsharif%2Fprsa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fridwanmsharif%2Fprsa/lists"}