user8786545
user8786545

Reputation: 21

Using libsodium across platforms

I am using libsodium on an embedded device. I would like to interact with mobile devices for keygen/encryption/decryption.

Is it necessary to use libsodium on all devices taking part in the encrypted communication?

To put it another way: libsodium wraps NaCl, so Is it then possible to use the native encryption functionality wrapped by libsodium or included in NaCl on the remote platform (Android or iOS) without actually including the libsodium libraries, or is this just asking for trouble?

I also have mbed TLS available on the embedded device. Is there a basic common encryption method that could be recommended for encrypted communication between device <--> Android and device <--> iOS ?

Thanks!

Upvotes: 2

Views: 1554

Answers (2)

Jarvis
Jarvis

Reputation: 1792

Lib-sodium is good library to communication encryption. Eventually you are calling NaCl method.

If you comfortable with native calling like c or c++ you can use.

I had used lib sodium library in Android application for server and device to device communication.

#Update Android library git link Libsodium Android

Gradle plugin implementation 'com.github.joshjdevl.libsodiumjni:libsodium-jni-aar:1.0.8'

Upvotes: 1

Frank Denis
Frank Denis

Reputation: 1501

Libsodium is a standalone library. It doesn't wrap any other libraries.

It is cross-platforms, so you can use it to communicate between your embedded device and iOS/Android. Everything it supports on one system will work the same way on another system.

If you are looking for something with a smaller memory footprint, you may want to use libhydrogen instead.

Upvotes: 2

Related Questions