{"id":25220394,"url":"https://github.com/adridevelopsthings/diffie-hellman-golang","last_synced_at":"2025-04-05T11:21:08.068Z","repository":{"id":109343571,"uuid":"453700706","full_name":"AdriDevelopsThings/diffie-hellman-golang","owner":"AdriDevelopsThings","description":"A diffie-hellman socket implementation in golang.","archived":false,"fork":false,"pushed_at":"2023-01-22T17:47:11.000Z","size":19,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T21:53:10.303Z","etag":null,"topics":["diffie-helman","go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AdriDevelopsThings.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":"2022-01-30T14:21:37.000Z","updated_at":"2022-08-09T13:33:32.000Z","dependencies_parsed_at":"2023-04-26T14:41:06.850Z","dependency_job_id":null,"html_url":"https://github.com/AdriDevelopsThings/diffie-hellman-golang","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/AdriDevelopsThings%2Fdiffie-hellman-golang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdriDevelopsThings%2Fdiffie-hellman-golang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdriDevelopsThings%2Fdiffie-hellman-golang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdriDevelopsThings%2Fdiffie-hellman-golang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AdriDevelopsThings","download_url":"https://codeload.github.com/AdriDevelopsThings/diffie-hellman-golang/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247326582,"owners_count":20920871,"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":["diffie-helman","go"],"created_at":"2025-02-10T21:53:11.541Z","updated_at":"2025-04-05T11:21:08.039Z","avatar_url":"https://github.com/AdriDevelopsThings.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# diffie-hellman-golang\n\nI tried to implement the diffie hellman key exchange in golang with the use of sockets to understand how this protocol works and to learn golang. So its a development project: obviously don't use it in production.\n\n## Installation\n\nRun ``go get`` to download the needed dependencies.\n\n## Run\n\nRun this with ``go run .``\nYou need to set the following command arguments:\n\n| Name            | Help                                        |\n| --------------- | ------------------------------------------- |\n| -m or --mode    | mode of diffie hellman `server` or `client` |\n| -a or --address | the listen address or address of the server |\n\n## How it works\n\nAfter the connection between the server and client is established the client will generate the public numbers p and g. p is a primnumber and g is lower than p. The client also generates/calculates his secret `s` and public key. The secret is smaller than p and the public key is g ^ s mod p. After the server received the public information he generates/calculates his secret and public key as well. He sends his public key to the client and the client sends his back. Both sides calculate the shared secret: The public key of the other partner ^ the own secret `s` mod p. The clients generated a shared secret asymmetricaly.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadridevelopsthings%2Fdiffie-hellman-golang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadridevelopsthings%2Fdiffie-hellman-golang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadridevelopsthings%2Fdiffie-hellman-golang/lists"}