{"id":20459595,"url":"https://github.com/ticesoftware/androidx3dh","last_synced_at":"2026-05-27T20:32:23.947Z","repository":{"id":143710723,"uuid":"251255529","full_name":"TICESoftware/AndroidX3DH","owner":"TICESoftware","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-24T07:47:17.000Z","size":163,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-05T11:16:13.111Z","etag":null,"topics":["kotlin","tice-app","tice-crypto"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/TICESoftware.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":"2020-03-30T09:13:03.000Z","updated_at":"2024-02-11T17:51:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"e94f785d-e412-4fdd-918f-1414684e95ce","html_url":"https://github.com/TICESoftware/AndroidX3DH","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/TICESoftware/AndroidX3DH","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TICESoftware%2FAndroidX3DH","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TICESoftware%2FAndroidX3DH/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TICESoftware%2FAndroidX3DH/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TICESoftware%2FAndroidX3DH/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TICESoftware","download_url":"https://codeload.github.com/TICESoftware/AndroidX3DH/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TICESoftware%2FAndroidX3DH/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33583394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"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":["kotlin","tice-app","tice-crypto"],"created_at":"2024-11-15T12:16:44.696Z","updated_at":"2026-05-27T20:32:23.931Z","avatar_url":"https://github.com/TICESoftware.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AndroidX3DH\n\nThis package implements the \u003ca href=\"https://signal.org/docs/specifications/x3dh/\"\u003eX3DH\u003c/a\u003e key agreement protocol in Swift. The cryptographic operations are provided by \u003ca href=\"https://github.com/jedisct1/libsodium\"\u003elibsodium\u003c/a\u003e entirely. Libsodium is integrated via \u003ca href=\"https://github.com/terl/lazysodium-android.git\"\u003eLazysodium\u003c/a\u003e.\n\n## Installation\n\n### Jitpack\nTo integrate the library via jitpack add the jitpack repository to your root `build.gradle` file:\n\n```\nallprojects {\n  repositories {\n    ...\n    maven { url  \"https://dl.bintray.com/terl/lazysodium-maven\" }\n    maven { url 'https://jitpack.io' }\n  }\n}\n```\n\nYou can then add the dependency to your app's `build.gradle` file where `$VERSION` specifies the specific version of the library:\n\n```\ndependencies {\n  implementation 'com.github.TICESoftware:AndroidX3DH:$VERSION'\n  implementation 'com.github.TICESoftware:AndroidHKDF:1.0.0'\n  implementation \"com.goterl:lazysodium-android:4.1.0@aar\"\n  implementation 'net.java.dev.jna:jna:5.5.0@aar'\n}\n ```\n\n# Usage\n\nAlice needs to retrieve some public keys from Bob that he has made public previously. She then calculates a shared secret and sends some information to Bob so that he can calculcate the shared secret on his side as well.\n\n```kotlin\nval preKeySigner = // ... Signing the key is not part of this library\nval prekeySignatureVerifier = // ... and neither is verification\n\nval bob = X3DH()\nval bobIdentityKeyPair = bob.generateIdentityKeyPair()\nval bobSignedPrekeyPair = bob.generateSignedPrekeyPair { /* Signer */ }\nval bobOneTimePrekeyPairs = bob.generateOneTimePrekeyPairs(2)\n\nval alice = X3DH()\nval aliceIdentityKeyPair = alice.generateIdentityKeyPair()\nval aliceSignedPrekey = alice.generateSignedPrekeyPair { /* Signer */ }\n\n// [Alice fetches bob's prekey bundle ...]\n\nval keyAgreementInitiation = alice.initiateKeyAgreement(bobIdentityKeyPair.publicKey, bobSignedPrekeyPair.keyPair.publicKey, bobSignedPrekeyPair.signature, bobOneTimePrekeyPairs.first().publicKey, aliceIdentityKeyPair, aliceSignedPrekey.keyPair.publicKey, { /* Verifier */ }, info)\n\n// [Alice sends identity key, ephemeral key and used one-time prekey to bob ...]\n\nval sharedSecret = bob.sharedSecretFromKeyAgreement(aliceIdentityKeyPair.publicKey, keyAgreementInitiation.ephemeralPublicKey, bobOneTimePrekeyPairs.first(), bobIdentityKeyPair, bobSignedPrekeyPair.keyPair, info)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fticesoftware%2Fandroidx3dh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fticesoftware%2Fandroidx3dh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fticesoftware%2Fandroidx3dh/lists"}