{"id":22642704,"url":"https://github.com/bit-nation/x3dh","last_synced_at":"2025-04-11T23:22:44.514Z","repository":{"id":57540876,"uuid":"135277219","full_name":"Bit-Nation/x3dh","owner":"Bit-Nation","description":null,"archived":false,"fork":false,"pushed_at":"2018-07-21T08:02:31.000Z","size":30,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-25T19:13:50.309Z","etag":null,"topics":["key-exchanges","signal"],"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/Bit-Nation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"security-bitnation.co.key.pub","support":null}},"created_at":"2018-05-29T10:04:07.000Z","updated_at":"2024-12-10T12:31:04.000Z","dependencies_parsed_at":"2022-09-17T23:22:31.814Z","dependency_job_id":null,"html_url":"https://github.com/Bit-Nation/x3dh","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/Bit-Nation%2Fx3dh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bit-Nation%2Fx3dh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bit-Nation%2Fx3dh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bit-Nation%2Fx3dh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bit-Nation","download_url":"https://codeload.github.com/Bit-Nation/x3dh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248493348,"owners_count":21113239,"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":["key-exchanges","signal"],"created_at":"2024-12-09T05:08:10.699Z","updated_at":"2025-04-11T23:22:44.491Z","avatar_url":"https://github.com/Bit-Nation.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# x3dh\n\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![Build Status (master)](https://travis-ci.org/Bit-Nation/x3dh.svg?branch=master)](https://travis-ci.org/Bit-Nation/x3dh)\n\n\u003e An x3dh implementation.\n\nThis is an almost complete implementation of the [x3dh](https://signal.org/docs/specifications/x3dh/) key agreement protocol. However, there are a few things that you need to take care of yourself:\n1. If you fetch a preKeyBundle (holds information about the person you would like to chat with, like the identity key, etc) you have to check the signature yourself. It's not built into the code. We only \"ask you\" IF the key is valid. You can then say yes/no. If you say no, the protocol will be aborted.\n2. You are responsible for handling the initial message (and the encoding), we only give you the calculated secret + the ephemeral key generated during the protocol run.\n3. Currently we only support curve25519 (but you can implement the `Curve` interface in order to use another curve).\n\n## Table of Contents\n\n- [Security](#security)\n- [Install](#install)\n- [Usage](#usage)\n- [API](#api)\n- [Maintainers](#maintainers)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Security\nIf you find a security bug/ vulnerability please DO NOT open an issue. Write to security@bitnation.co PLEASE use [this](security-bitnation.co.key.pub) PGP key to encrypt your report / email.\n\n## Install\n\n```\ngo get github.com/Bit-Nation/x3dh\n```\nIt might make sense to chose a dependency manager of your choise to pin the version to a specific commit.\n\n## Usage\n\n```\n// create an instance of the curve util\nc := \u0026Curve25519{}\n\n// make sure ot save this somewhere\nmyKeyPair, err := c.GenerateKeyPair()\n\nx := x3dh.New(c, sha256.New(), \"test\", myKeyPair)\n\n```\n\n## API\nThe following methods are available:\n- `CalculateSecret` calculate a secret based on your Idkey and a received PreKeyBundle.\n- `SecretFromRemote` create a secret based on the received intial data.\n\n## Maintainers\n\n[@florianlenz](https://github.com/florianlenz)\n\n## Contribute\n\nPull requests are accepted.\n\nSmall note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specifications.\n\n## License\n\nMIT © 2018 Bitnation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbit-nation%2Fx3dh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbit-nation%2Fx3dh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbit-nation%2Fx3dh/lists"}