{"id":16936488,"url":"https://github.com/jonhoo/go-crypto-examples","last_synced_at":"2025-10-11T10:32:56.234Z","repository":{"id":26386947,"uuid":"29836428","full_name":"jonhoo/go-crypto-examples","owner":"jonhoo","description":"Example code for performing various higher-level operations using the Go crypto primitives","archived":false,"fork":false,"pushed_at":"2015-01-25T23:35:06.000Z","size":164,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-26T14:52:04.803Z","etag":null,"topics":["cryptography","examples","golang"],"latest_commit_sha":null,"homepage":null,"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/jonhoo.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}},"created_at":"2015-01-25T23:33:37.000Z","updated_at":"2023-07-08T17:03:08.000Z","dependencies_parsed_at":"2022-09-01T09:50:24.692Z","dependency_job_id":null,"html_url":"https://github.com/jonhoo/go-crypto-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jonhoo/go-crypto-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Fgo-crypto-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Fgo-crypto-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Fgo-crypto-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Fgo-crypto-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonhoo","download_url":"https://codeload.github.com/jonhoo/go-crypto-examples/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonhoo%2Fgo-crypto-examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006846,"owners_count":26084206,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cryptography","examples","golang"],"created_at":"2024-10-13T20:57:07.945Z","updated_at":"2025-10-11T10:32:56.218Z","avatar_url":"https://github.com/jonhoo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Go has a pretty good cryptography library, but most of the provided\nfunctionality is fairly low-level, and it can sometimes be difficult to\nfigure out exactly how things fit together. This repository gives\nend-to-end example code that uses a number of features that can be\npieced together using `crypto` and `net`. Hopefully, this code will make\nit easier for people trying to do crypto-things in Go to find the piece\nof code they're missing.\n\nIn no particular order, the code here implements:\n\n  - HTTPS server with self-signed certificates.\n  - Generation of signed client certificates.\n  - Optional client-side authentication for HTTPS.\n  - Parsing of public keys submitted through the HTML5 `\u003ckeygen\u003e` tag.\n  - Marshalling and unmarshalling of private keys and certificates to\n    standardized formats supported by browsers, OpenSSL, etc.\n\nTo run, first do `go build keybin/main.go`. Next, open two terminals:\n\n```\nterm1$ ./kb server\nterm2$ ./kb client\n```\n\nIf you list the contents of the current directory, you will see that\nfour files have been generated: `localhost.{crt,rsa.key}`, and\n`alice.{crt,rsa.key}`. These are the server and client certificates and\nkeys, stored in formats that can be imported into browsers, used by\ncURL, or all sorts of other things.\n\nThe code in this repository is meant as example good only, and it should\nnot be used verbatim without additional testing and verification. Code\ntagged with TODO needs to be modified before use.\n\nAlso note that this code was carved out from a much larger software\nsystem, and some errors may have snuck in during the transition. If you\nfind any errors, do not hesitate to file an issue using the GitHub issue\ntracker; or even better, fix the problem yourself and send a Pull\nRequest. If you have ideas for improvements, extensions or clean-up that\nshould be done, please also submit those too!\n\nHappy hacking!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonhoo%2Fgo-crypto-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonhoo%2Fgo-crypto-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonhoo%2Fgo-crypto-examples/lists"}