https://github.com/simplito/privmx-endpoint-kotlin
Kotlin wrappers for the native C++ library used by PrivMX to handle end-to-end (e2e) encryption.
https://github.com/simplito/privmx-endpoint-kotlin
communication encryption end-to-end-encryption kotlin kotlin-android kotlin-ios kotlin-jvm kotlin-multiplatform-library mobile privmx security
Last synced: 13 days ago
JSON representation
Kotlin wrappers for the native C++ library used by PrivMX to handle end-to-end (e2e) encryption.
- Host: GitHub
- URL: https://github.com/simplito/privmx-endpoint-kotlin
- Owner: simplito
- License: mit
- Created: 2024-12-20T08:00:18.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-26T10:17:03.000Z (12 months ago)
- Last Synced: 2025-06-26T11:18:32.170Z (12 months ago)
- Topics: communication, encryption, end-to-end-encryption, kotlin, kotlin-android, kotlin-ios, kotlin-jvm, kotlin-multiplatform-library, mobile, privmx, security
- Language: Kotlin
- Homepage: https://privmx.dev
- Size: 115 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# PrivMX Endpoint Kotlin
This repository provides Kotlin wrappers for the native C++ library used by PrivMX to handle
end-to-end (e2e) encryption.
PrivMX is a privacy-focused platform designed to offer secure collaboration solutions by integrating
robust encryption across various data types and communication methods. This project enables seamless
integration of PrivMX’s encryption functionalities in Java/Kotlin applications, preserving the
security and performance of the original C++ library while making its capabilities accessible in the
Kotlin multiplatform projects.
## About PrivMX
[PrivMX](https://privmx.dev) allows developers to build end-to-end encrypted apps used for
communication. The Platform works according to privacy-by-design mindset, so all of our solutions
are based on Zero-Knowledge architecture. This project extends PrivMX’s commitment to security by
making its encryption features accessible to developers using Java/Kotlin.
### Key Features
- **End-to-End Encryption:** Ensures that data is encrypted at the source and can only be decrypted
by the intended recipient.
- **Native C++ Library Integration:** Leverages the performance and security of C++ while making it
accessible in Java/Kotlin applications.
- **Cross-Platform Compatibility:** Designed to support PrivMX on multiple operating systems and
environments.
- **Simple API:** Easy-to-use interface for Java/Kotlin developers without compromising security.
## Modules
### 1. PrivMX Endpoint Kotlin Extra
PrivMX Endpoint Kotlin Extra is the fundamental **recommended library** for using the platform
in the majority of cases. It encompasses all the essential logic that simplifies and secures the
usage of our libraries.
This library implements:
- Enums and static fields to minimize errors while invoking the methods.
- `PrivMXEndpoint` for managing the connection and registering callbacks for any events.
- `PrivMXEndpointContainer` for managing the global session with an implemented event loop.
- Classes to simplify reading and writing to files using byte arrays, InputStream/OutputStream or
Source/Sink (kotlinx.io), depending on the platform and use case.
### 2. PrivMX Endpoint Kotlin
PrivMX Endpoint Kotlin is the minimal wrapper library, essential for the platform’s operational
functionality. It declares native functions in Kotlin using JNI. As the most minimalist library
available, it provides the highest degree of flexibility in customizing the platform to meet your
specific requirements.
This library implements models, exception catching, and the following modules:
- `CryptoApi` - Cryptographic methods used to encrypt/decrypt and sign your data or generate keys to
work with PrivMX Bridge.
- `Connection` - Methods for managing connection with PrivMX Bridge.
- `ThreadApi` - Methods for managing Threads and sending/reading messages.
- `StoreApi` - Methods for managing Stores and sending/reading files.
- `InboxApi` - Methods for managing Inboxes and entries.
## Supported Platforms
* JVM (minimum JDK 8)
* Android
* arm64-v8a
* armeabi-v7a
* x86
* x86_64
* Darwin
* arm64
* Linux
* x86_64 (comming soon)
* Windows
* x86_64 (comming soon)
* iOS
* arm64
* arm64Simulator
## Usage
### Add Dependencies
1. Add `mavenCentral()` repository to your `settings.gradle.kts`:
```groovy
pluginManagement {
repositories {
mavenCentral()
}
}
dependencyResolutionManagement {
repositories {
mavenCentral()
}
}
```
2. Add dependency to `build.gradle.kts`:
```groovy
kotlin {
sourceSets {
val commonMain by getting {
dependencies {
implementation("com.simplito.kotlin:privmx-endpoint:$privmxLibVersion")
// optionally you can add privmx-endpoint-extra dependency
// implementation("com.simplito.kotlin:privmx-endpoint-extra:$privmxLibVersion")
}
}
}
}
```
3. Add PrivMX plugin to `build.gradle`:
```groovy
plugins {
id("com.simplito.privmx-endpoint-install-native") version "2.0.0"
}
```
## JVM
### Native Libraries
The plugin automatically adds the necessary native libraries to the runtime in your **Java**, **Android**,
or **Kotlin** project. For Java applications, it includes libraries for all supported desktop platforms.
The source code of the plugin is available on [GitHub](https://github.com/simplito/privmx-endpoint-java-tools).
When you first use the API, the PrivMX wrapper unpacks and loads these native libraries.
They are unpacked to your working directory if your `java.library.path` includes `.`.
Otherwise, they are unpacked to the last path specified in the `java.library.path`.
## Android
### Native Libraries
The plugin automatically adds the necessary native libraries to the runtime in your **Java**, **Android**,
or **Kotlin** project. For Android applications, it includes Android-specific binaries.
The source code of the plugin is available on [GitHub](https://github.com/simplito/privmx-endpoint-java-tools).
On Android, the native libraries are extracted by the installer and then the PrivMX wrapper loads them in the runtime.
### Required Permissions
PrivMX Endpoint requires to add the following permissions to your AndroidManifest.xml:
* ``
## License Information
**PrivMX Endpoint Kotlin**\
Copyright © 2025 Simplito sp. z o.o.
This project is part of the PrivMX Platform (https://privmx.dev). \
This project is Licensed under the MIT License.
PrivMX Endpoint and PrivMX Bridge are licensed under the PrivMX Free License.\
See the License for the specific language governing permissions and limitations under the License.