{"id":17637884,"url":"https://github.com/liangjfblue/go-keyserver","last_synced_at":"2025-05-06T11:43:26.279Z","repository":{"id":132708918,"uuid":"209472924","full_name":"liangjfblue/go-keyServer","owner":"liangjfblue","description":"动态密钥服务器。带client端，server端使用demo","archived":false,"fork":false,"pushed_at":"2023-02-09T20:35:17.000Z","size":34,"stargazers_count":7,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-31T01:23:49.898Z","etag":null,"topics":["gin","golang","redis","security"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/liangjfblue.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":"2019-09-19T05:53:56.000Z","updated_at":"2021-04-23T12:37:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"ebc791b8-484d-48bb-bf2f-10db65b8967f","html_url":"https://github.com/liangjfblue/go-keyServer","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/liangjfblue%2Fgo-keyServer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liangjfblue%2Fgo-keyServer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liangjfblue%2Fgo-keyServer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liangjfblue%2Fgo-keyServer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liangjfblue","download_url":"https://codeload.github.com/liangjfblue/go-keyServer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252676665,"owners_count":21786981,"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":["gin","golang","redis","security"],"created_at":"2024-10-23T03:06:43.703Z","updated_at":"2025-05-06T11:43:26.257Z","avatar_url":"https://github.com/liangjfblue.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 动态密钥服务器（aes128+base64 动态加密方案）\n\n## 技术栈\n- go\n- gin\n- redis\n\n## 密钥保管方案\n\n### 密钥1（本地保管）\n    REQ_KEY = \"HKIH931JELFJ91RJ\"\n    REQ_IV  = \"NOSU2398Y578TGFU\"\n\n### 密钥2（动态变化）\n外部（数据库update触发写入/手工set）写进reidis，redis定时刷新\n\n## 处理流程\n- 1、客户端保存一对密钥1（用于加密），请求密钥服务器获得密钥2（用于解密）\n- 2、后台服务端保存一对密钥1（用于解密），从redis中读取密钥2（用于加密）。\n- 3、密钥服务器保存一对密钥1（用于**解密**客户端密钥1加密请求，**加密**动态密钥2返回给客户端），并且定时更新一对密钥2（从redis中读取密钥2）\n\n## 更新密钥2\n当想更新动态密钥，需要外部设置redis：\n\n```set pub_key \"{\\\"id\\\": \\\"9g1\\\", \\\"key\\\": \\\"hg92g02fewh7qk11\\\", \\\"iv\\\": \\\"546d4t546tw32e1f\\\"}\"```\n\n字段说明：\n\n- id。密码盐，字符位数改变，客户端和应用后台的密码盐位数也需要改变。统一修改CodeSaltLen变量\n- key。aes加密的key\n- iv。aes加密的iv\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliangjfblue%2Fgo-keyserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliangjfblue%2Fgo-keyserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliangjfblue%2Fgo-keyserver/lists"}