{"id":13563034,"url":"https://github.com/pion/dtls","last_synced_at":"2025-12-12T02:38:42.736Z","repository":{"id":37951824,"uuid":"153731687","full_name":"pion/dtls","owner":"pion","description":"DTLS 1.2 Server/Client implementation for Go","archived":false,"fork":false,"pushed_at":"2025-04-23T15:01:21.000Z","size":1449,"stargazers_count":627,"open_issues_count":9,"forks_count":165,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-04-23T16:21:37.339Z","etag":null,"topics":["dtls","encryption","go","golang","pion","pion-dtls","psk","tls-ecdhe-ecdsa","tls-ecdhe-rsa","udp"],"latest_commit_sha":null,"homepage":"https://pion.ly/","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/pion.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":"2018-10-19T05:38:21.000Z","updated_at":"2025-04-23T15:00:49.000Z","dependencies_parsed_at":"2023-07-13T09:46:56.493Z","dependency_job_id":"a40a8d8e-c6b9-4e8f-887d-c1c19d061d15","html_url":"https://github.com/pion/dtls","commit_stats":{"total_commits":668,"total_committers":59,"mean_commits":"11.322033898305085","dds":0.7619760479041916,"last_synced_commit":"edc7ad02205ffc42622cdff7d04eba4970116eee"},"previous_names":["pions/dtls"],"tags_count":72,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pion%2Fdtls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pion%2Fdtls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pion%2Fdtls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pion%2Fdtls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pion","download_url":"https://codeload.github.com/pion/dtls/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250513429,"owners_count":21443201,"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":["dtls","encryption","go","golang","pion","pion-dtls","psk","tls-ecdhe-ecdsa","tls-ecdhe-rsa","udp"],"created_at":"2024-08-01T13:01:14.507Z","updated_at":"2025-12-12T02:38:42.700Z","avatar_url":"https://github.com/pion.png","language":"Go","funding_links":[],"categories":["Go","Protocols"],"sub_categories":["DTLS"],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cbr\u003e\n  Pion DTLS\n  \u003cbr\u003e\n\u003c/h1\u003e\n\u003ch4 align=\"center\"\u003eA Go implementation of DTLS\u003c/h4\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://pion.ly\"\u003e\u003cimg src=\"https://img.shields.io/badge/pion-dtls-gray.svg?longCache=true\u0026colorB=brightgreen\" alt=\"Pion DTLS\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://sourcegraph.com/github.com/pion/dtls\"\u003e\u003cimg src=\"https://sourcegraph.com/github.com/pion/dtls/-/badge.svg\" alt=\"Sourcegraph Widget\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://discord.gg/PngbdqpFbt\"\u003e\u003cimg src=\"https://img.shields.io/badge/join-us%20on%20discord-gray.svg?longCache=true\u0026logo=discord\u0026colorB=brightblue\" alt=\"join us on Discord\"\u003e\u003c/a\u003e \u003ca href=\"https://bsky.app/profile/pion.ly\"\u003e\u003cimg src=\"https://img.shields.io/badge/follow-us%20on%20bluesky-gray.svg?longCache=true\u0026logo=bluesky\u0026colorB=brightblue\" alt=\"Follow us on Bluesky\"\u003e\u003c/a\u003e\n  \u003cbr\u003e\n  \u003cimg alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/pion/dtls/test.yaml\"\u003e\n  \u003ca href=\"https://pkg.go.dev/github.com/pion/dtls/v3\"\u003e\u003cimg src=\"https://pkg.go.dev/badge/github.com/pion/dtls/v3.svg\" alt=\"Go Reference\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/pion/dtls\"\u003e\u003cimg src=\"https://codecov.io/gh/pion/dtls/branch/master/graph/badge.svg\" alt=\"Coverage Status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/pion/dtls/v3\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/pion/dtls/v3\" alt=\"Go Report Card\"\u003e\u003c/a\u003e\n  \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" alt=\"License: MIT\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\nNative [DTLS 1.2][rfc6347] implementation in the Go programming language.\n\nA long term goal is a professional security review, and maybe an inclusion in stdlib.\n\n### RFCs\n#### Implemented\n- **RFC 6347**: [Datagram Transport Layer Security Version 1.2][rfc6347]\n- **RFC 5705**: [Keying Material Exporters for Transport Layer Security (TLS)][rfc5705]\n- **RFC 7627**: [Transport Layer Security (TLS) - Session Hash and Extended Master Secret Extension][rfc7627]\n- **RFC 7301**: [Transport Layer Security (TLS) - Application-Layer Protocol Negotiation Extension][rfc7301]\n\n[rfc5289]: https://tools.ietf.org/html/rfc5289\n[rfc5487]: https://tools.ietf.org/html/rfc5487\n[rfc5489]: https://tools.ietf.org/html/rfc5489\n[rfc5705]: https://tools.ietf.org/html/rfc5705\n[rfc6347]: https://tools.ietf.org/html/rfc6347\n[rfc6655]: https://tools.ietf.org/html/rfc6655\n[rfc7301]: https://tools.ietf.org/html/rfc7301\n[rfc7627]: https://tools.ietf.org/html/rfc7627\n[rfc8422]: https://tools.ietf.org/html/rfc8422\n\n### Goals/Progress\nThis will only be targeting DTLS 1.2, and the most modern/common cipher suites.\nWe would love contributions that fall under the 'Planned Features' and any bug fixes!\n\n#### Current features\n* DTLS 1.2 Client/Server\n* Key Exchange via ECDHE(curve25519, nistp256, nistp384) and PSK\n* Packet loss and re-ordering is handled during handshaking\n* Key export ([RFC 5705][rfc5705])\n* Serialization and Resumption of sessions\n* Extended Master Secret extension ([RFC 7627][rfc7627])\n* ALPN extension ([RFC 7301][rfc7301])\n\n#### Supported ciphers\n\n##### ECDHE\n\n* TLS_ECDHE_ECDSA_WITH_AES_128_CCM ([RFC 6655][rfc6655])\n* TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 ([RFC 6655][rfc6655])\n* TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 ([RFC 5289][rfc5289])\n* TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 ([RFC 5289][rfc5289])\n* TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 ([RFC 5289][rfc5289])\n* TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 ([RFC 5289][rfc5289])\n* TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA ([RFC 8422][rfc8422])\n* TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA ([RFC 8422][rfc8422])\n\n##### PSK\n\n* TLS_PSK_WITH_AES_128_CCM ([RFC 6655][rfc6655])\n* TLS_PSK_WITH_AES_128_CCM_8 ([RFC 6655][rfc6655])\n* TLS_PSK_WITH_AES_256_CCM_8 ([RFC 6655][rfc6655])\n* TLS_PSK_WITH_AES_128_GCM_SHA256 ([RFC 5487][rfc5487])\n* TLS_PSK_WITH_AES_128_CBC_SHA256 ([RFC 5487][rfc5487])\n\n##### ECDHE \u0026 PSK\n\n* TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 ([RFC 5489][rfc5489])\n\n#### Planned Features\n* Chacha20Poly1305\n\n#### Excluded Features\n* DTLS 1.0\n* Renegotiation\n* Compression\n\n### Using\n\nThis library needs at least Go 1.13, and you should have [Go modules\nenabled](https://github.com/golang/go/wiki/Modules).\n\n#### Pion DTLS\nFor a DTLS 1.2 Server that listens on 127.0.0.1:4444\n```sh\ngo run examples/listen/selfsign/main.go\n```\n\nFor a DTLS 1.2 Client that connects to 127.0.0.1:4444\n```sh\ngo run examples/dial/selfsign/main.go\n```\n\n#### OpenSSL\nPion DTLS can connect to itself and OpenSSL.\n```\n  // Generate a certificate\n  openssl ecparam -out key.pem -name prime256v1 -genkey\n  openssl req -new -sha256 -key key.pem -out server.csr\n  openssl x509 -req -sha256 -days 365 -in server.csr -signkey key.pem -out cert.pem\n\n  // Use with examples/dial/selfsign/main.go\n  openssl s_server -dtls1_2 -cert cert.pem -key key.pem -accept 4444\n\n  // Use with examples/listen/selfsign/main.go\n  openssl s_client -dtls1_2 -connect 127.0.0.1:4444 -debug -cert cert.pem -key key.pem\n```\n\n### Using with PSK\nPion DTLS also comes with examples that do key exchange via PSK\n\n#### Pion DTLS\n```sh\ngo run examples/listen/psk/main.go\n```\n\n```sh\ngo run examples/dial/psk/main.go\n```\n\n#### OpenSSL\n```\n  // Use with examples/dial/psk/main.go\n  openssl s_server -dtls1_2 -accept 4444 -nocert -psk abc123 -cipher PSK-AES128-CCM8\n\n  // Use with examples/listen/psk/main.go\n  openssl s_client -dtls1_2 -connect 127.0.0.1:4444 -psk abc123 -cipher PSK-AES128-CCM8\n```\n\n### Community\nPion has an active community on the [Discord](https://discord.gg/PngbdqpFbt).\n\nFollow the [Pion Bluesky](https://bsky.app/profile/pion.ly) or [Pion Twitter](https://twitter.com/_pion) for project updates and important WebRTC news.\n\nWe are always looking to support **your projects**. Please reach out if you have something to build!\nIf you need commercial support or don't want to use public methods you can contact us at [team@pion.ly](mailto:team@pion.ly)\n\n### Contributing\nCheck out the [contributing wiki](https://github.com/pion/webrtc/wiki/Contributing) to join the group of amazing people making this project possible\n\n### License\nMIT License - see [LICENSE](LICENSE) for full text\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpion%2Fdtls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpion%2Fdtls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpion%2Fdtls/lists"}