{"id":21288658,"url":"https://github.com/abdo-essam/diffie-hellman-key-exchange","last_synced_at":"2025-03-15T15:42:32.162Z","repository":{"id":167487106,"uuid":"643118126","full_name":"abdo-essam/Diffie-Hellman-key-exchange","owner":"abdo-essam","description":" The code you provided appears to be an implementation of the Diffie-Hellman key exchange protocol between a client and a server. This protocol allows two parties to establish a shared secret key over an insecure channel.","archived":false,"fork":false,"pushed_at":"2023-05-20T06:47:31.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-22T05:41:22.798Z","etag":null,"topics":["client","client-server","cryptography","diffie-hellman","diffie-hellman-algorithm","diffie-hellman-key","server"],"latest_commit_sha":null,"homepage":"","language":"Java","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/abdo-essam.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":"2023-05-20T06:43:29.000Z","updated_at":"2023-05-20T06:49:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"81d8d5f1-41c3-40a6-a793-e13f5a53b2b0","html_url":"https://github.com/abdo-essam/Diffie-Hellman-key-exchange","commit_stats":null,"previous_names":["abdo-essam/diffie-hellman-key-exchange-"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdo-essam%2FDiffie-Hellman-key-exchange","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdo-essam%2FDiffie-Hellman-key-exchange/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdo-essam%2FDiffie-Hellman-key-exchange/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdo-essam%2FDiffie-Hellman-key-exchange/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abdo-essam","download_url":"https://codeload.github.com/abdo-essam/Diffie-Hellman-key-exchange/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243753995,"owners_count":20342537,"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":["client","client-server","cryptography","diffie-hellman","diffie-hellman-algorithm","diffie-hellman-key","server"],"created_at":"2024-11-21T12:23:52.031Z","updated_at":"2025-03-15T15:42:32.136Z","avatar_url":"https://github.com/abdo-essam.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Diffie-Hellman-key-exchange\n The code you provided appears to be an implementation of the Diffie-Hellman key exchange protocol between a client and a server. This protocol allows two parties to establish a shared secret key over an insecure channel.\n\n\n### Client:\n1.\tThe client establishes a connection to the server.\n2.\tIt sends the values of p, generator, and A (calculated as pow(generator,a) % p) to the server.\n3.\tIt receives the server's public key (serverB) and calculates the shared secret key (kab).\n4.\tThe client prints the private key (a), the server's public key (serverB), and the shared secret key (kab).\n5.\tThe client closes the connection.\n\n\n### Server:\n1.\tThe server listens for incoming connections on port 8088.\n2.\tIt accepts the client's connection.\n3.\tThe server receives the values of p, generator, and A from the client.\n4.\tThe server calculates its own public key (B) as pow(c_generator, server_private) % c_P and sends it back to the client.\n5.\tThe server calculates the shared secret key (Kab) using the client's public key (c_Public) and its private key (server_private).\n6.\tThe server prints its private key (server_private) and the shared secret key (Kab).\n7.\tThe server closes the connection.\n\n#### Note: The code could be further improved by following coding conventions, such as using proper variable naming and separating the client and server code into separate files.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdo-essam%2Fdiffie-hellman-key-exchange","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdo-essam%2Fdiffie-hellman-key-exchange","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdo-essam%2Fdiffie-hellman-key-exchange/lists"}