{"id":20459582,"url":"https://github.com/ticesoftware/androiddoubleratchet","last_synced_at":"2026-06-06T19:32:02.245Z","repository":{"id":143710721,"uuid":"252442125","full_name":"TICESoftware/AndroidDoubleRatchet","owner":"TICESoftware","description":null,"archived":false,"fork":false,"pushed_at":"2023-08-24T11:56:06.000Z","size":203,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-16T00:24:14.629Z","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-04-02T11:57:17.000Z","updated_at":"2024-02-11T17:51:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"fa670f6b-8161-4f6a-9834-7f6c7f8f947e","html_url":"https://github.com/TICESoftware/AndroidDoubleRatchet","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TICESoftware%2FAndroidDoubleRatchet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TICESoftware%2FAndroidDoubleRatchet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TICESoftware%2FAndroidDoubleRatchet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TICESoftware%2FAndroidDoubleRatchet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TICESoftware","download_url":"https://codeload.github.com/TICESoftware/AndroidDoubleRatchet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242014715,"owners_count":20057879,"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":["kotlin","tice-app","tice-crypto"],"created_at":"2024-11-15T12:16:41.349Z","updated_at":"2025-12-01T19:06:45.917Z","avatar_url":"https://github.com/TICESoftware.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AndroidDoubleRatchet\n\nImplementation of the \u003ca href=\"https://www.signal.org/docs/specifications/doubleratchet/#external-functions\"\u003eDouble Ratchet\u003c/a\u003e protocol in Kotlin for Android. The cryptographic operations are provided by \u003ca href=\"https://github.com/terl/lazysodium-android.git\"\u003eLazysodium\u003c/a\u003e entirely.\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:AndroidDoubleRatchet:$VERSION'\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\n## Usage\n\nAlice and Bob calculate a shared secret using a secure channel. After that one party can start the conversation as soon as she gets to know the public key of the other one.\n\n```kotlin\nimport com.ticeapp.androiddoubleratchet.DoubleRatchet\n\nval sharedSecret: ByteArray = ...\nval info = \"DoubleRatchetExample\"\n\nval bob = DoubleRatchet(keyPair = null, remotePublicKey = null, sharedSecret = sharedSecret, maxSkip = 20, maxCache = 20, info = info)\n\n// Bob sends his public key to Alice using another channel\n// sendToAlice(bob.publicKey)\n\nval alice = DoubleRatchet(keyPair = null, remotePublicKey = bob.publicKey, sharedSecret = sharedSecret, maxSkip = 20, maxCache = 20, info = info)\n\n// Now the conversation begins\nval message = \"Hello, Bob!\".encodeToByteArray()\nval encryptedMessage = alice.encrypt(message)\nval decryptedMessage = bob.decrypt(encryptedMessage)\n\nprintln(decryptedMessage.decodeToString()) // Hello, Bob!\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fticesoftware%2Fandroiddoubleratchet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fticesoftware%2Fandroiddoubleratchet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fticesoftware%2Fandroiddoubleratchet/lists"}