{"id":22100743,"url":"https://github.com/secnex/pwexchange-api","last_synced_at":"2025-03-24T02:15:54.555Z","repository":{"id":254620593,"uuid":"847074040","full_name":"SecNex/pwexchange-api","owner":"SecNex","description":"PwExchange is a simple password exchange tool that allows you to share passwords with your friends or colleagues in a secure way. ","archived":false,"fork":false,"pushed_at":"2024-11-11T09:19:20.000Z","size":12,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-02-05T08:51:56.028Z","etag":null,"topics":["aes-encryption","api","encryption-decryption","exchange","password"],"latest_commit_sha":null,"homepage":"https://docs.secnex.io/solutions/pwexchange/api","language":"Go","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/SecNex.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-24T19:15:21.000Z","updated_at":"2024-08-24T19:37:32.000Z","dependencies_parsed_at":"2024-08-24T20:29:41.498Z","dependency_job_id":"eca51354-2fd0-4b9d-9f5c-bee2bbc184e0","html_url":"https://github.com/SecNex/pwexchange-api","commit_stats":null,"previous_names":["secnex/pwexchange-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SecNex%2Fpwexchange-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SecNex%2Fpwexchange-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SecNex%2Fpwexchange-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SecNex%2Fpwexchange-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SecNex","download_url":"https://codeload.github.com/SecNex/pwexchange-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245195965,"owners_count":20575937,"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":["aes-encryption","api","encryption-decryption","exchange","password"],"created_at":"2024-12-01T05:15:38.096Z","updated_at":"2025-03-24T02:15:54.403Z","avatar_url":"https://github.com/SecNex.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SecNex - Password Exchange\n\n**PwExchange** is a simple password exchange tool that allows you to share passwords with your friends or colleagues in a secure way. The tool uses a symmetric encryption algorithm to encrypt the password and then sends it to the recipient. The recipient can then decrypt the password using the same tool for one-time use.\n\n## Encryption Algorithm\n\nThe tool uses `argon2` for key derivation and `AES` for encryption. Each secret is encrypted with a unique key. We use a server side key, a random client secret, and a random salt to derive the key. The key is then used to encrypt the secret.\n\n**Only with this three keys, the secret can be decrypted.**\n\n## Usage\n\n### Installation\n\n```bash\ngit clone https://github.com/secnex/pwexchange-api.git pwexchange\ncd pwexchange\n\n# Build the tool\ndocker build -t pwexchange:local .\n\nSERVER_SECRET=$(openssl rand -hex 32)\nAUTH_TOKEN=$(openssl rand -hex 32)\n\n# Run the tool\ndocker run -p 3030:8080 -e SERVER_SECRET=$SERVER_SECRET -e AUTH_TOKEN=$AUTH_TOKEN pwexchange:local\n```\n\n### API\n\n#### Create a new secret\n\n```bash\ncurl -X POST http://localhost:3030/api/store/encrypt -d '{\"password\": \"my-secret\"}' -H \"Authorization : Bearer $AUTH_TOKEN\"\n```\n\n#### Decrypt a secret\n\n```bash\ncurl -X POST http://localhost:3030/api/store/decrypt?id=00000000-0000-0000-0000-000000000000 -d '{\"secret\": \"encryption-key\"}' -H \"Authorization : Bearer $AUTH_TOKEN\"\n```\n\n#### List all secrets\n\n```bash\ncurl -X GET http://localhost:3030/api/store -H \"Authorization : Bearer $AUTH_TOKEN\"\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecnex%2Fpwexchange-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsecnex%2Fpwexchange-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecnex%2Fpwexchange-api/lists"}