{"id":24435398,"url":"https://github.com/cr2007/f20cn-cw2","last_synced_at":"2026-02-07T23:33:35.925Z","repository":{"id":271544800,"uuid":"712981377","full_name":"cr2007/F20CN-CW2","owner":"cr2007","description":"Group Coursework which concepts in asymmetric cryptography, and firewall rules maintenance","archived":false,"fork":false,"pushed_at":"2025-01-17T09:54:06.000Z","size":146,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-30T08:47:49.557Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/cr2007.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,"zenodo":null}},"created_at":"2023-11-01T15:45:40.000Z","updated_at":"2025-01-17T09:54:07.000Z","dependencies_parsed_at":"2025-01-08T12:29:35.967Z","dependency_job_id":"9afcd557-6cde-4109-8c31-7f765d2dc1d8","html_url":"https://github.com/cr2007/F20CN-CW2","commit_stats":null,"previous_names":["cr2007/f20cn-cw2"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cr2007/F20CN-CW2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cr2007%2FF20CN-CW2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cr2007%2FF20CN-CW2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cr2007%2FF20CN-CW2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cr2007%2FF20CN-CW2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cr2007","download_url":"https://codeload.github.com/cr2007/F20CN-CW2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cr2007%2FF20CN-CW2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29212651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T23:14:30.912Z","status":"ssl_error","status_checked_at":"2026-02-07T23:14:17.253Z","response_time":63,"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":[],"created_at":"2025-01-20T17:20:07.277Z","updated_at":"2026-02-07T23:33:35.909Z","avatar_url":"https://github.com/cr2007.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# F20CN CW2\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/cr2007/F20CN-CW2)\n\n## [Computer Network Security (F20CN)](https://curriculum.hw.ac.uk/coursedetails/F20CN?termcode=202425\u0026programmeCode=F291-COS)\n\n### Asymmetric Cryptography, Firewall Rules Maintenance\n\nTeam Members:\n- Chandrashekhar Ramaprasad (cr2007)\n- Oluwadolabomi Faith Muraino (fm2020)\n\n---\n\n1. **Task 1 - Alternative Method of Public-Key Encryption**\nDevelops an asymmetric cryptography system with custom methods for generating public and private keys, encryption, and decryption of messages.\n\n2. **Task 2 - Firewall Rules Application**\nImplements tools to validate and process IP addresses and ranges, ensuring compliance with firewall rules and configurations.\n\n---\n\n## Requirements\n\n- Python 3.8+\n- Dependencies\n  - [`ipaddress`](https://docs.python.org/3/library/ipaddress.html) (Standard library module for IP validation)\n  - (Optional) [`pytest`](https://docs.pytest.org/en/stable) for running Task 1 tests\n\n---\n\n## Setup Instructions\n\n### Clone the Repository\n\n```bash\ngit clone https://github.com/cr2007/F20CN-CW2\ncd F20CN-CW2\n```\n\n### Run the Scripts\n\n#### Task 1: Public-Key Encryption\n\n```bash\npython task1-g14.py\n```\n\nThis script includes:\n- Key generation (private and public keys)\n- Encryption and decryption functionalities\n\n#### Task 2: Firewall Rules Maintenance\n\n```bash\n# Add new rule to the list of firewall rules\npython task2-g14.py add [rule] [-in | -out] addr\n\n# Remove existing rule from the list of firewall rules\npython task2-g14.py remove [rule] [-in | -out]\n\n# Lists existing firewall rules\npython task2-g14.py list [rule] [-in | -out] [affr]\n```\n\nThis script includes:\n- Validating IP addresses\n- Checking if an IP falls within a given range\n- JSON-based input for easy testing of rules\n\n---\n\n## Project Contributors\n\nThis project was completed as part of the [F20CN: Computer Network Security](https://curriculum.hw.ac.uk/coursedetails/F20CN?termcode=202425\u0026programmeCode=F291-COS) module at Heriot-Watt University.\u003cbr\u003eContributions were made by [@cr2007](https://github.com/cr2007) and [@faithm2020](https://github.com/faithm2020).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcr2007%2Ff20cn-cw2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcr2007%2Ff20cn-cw2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcr2007%2Ff20cn-cw2/lists"}