Questions tagged [libsodium]

Sodium is a portable, cross-compilable, installable, packageable fork of the NaCl Cryptography & Networking library, with a compatible API.

Sources & Resources:

322 questions
2
votes
1 answer

Android NDK: Two prebuilt shared libraries, but one of them depends on the other

I'm writing an Android application that relies on two prebuilt shared libraries (A and B). Both libraries are configured to work with the armeabi and armeabi-v7a architectures. The first prebuilt library, A, is libsodium. The second prebuilt…
Raed M
  • 63
  • 7
2
votes
1 answer

What's the best way to install a PECL extension (libsodium) for unit testing with Travis CI?

I'm trying to add continuous integration to a project called Halite, which uses libsodium to encrypt cookies before storing them on the end-user's device. However, I can't seem to get my travis.yml right. These were the issues I encountered: Adding…
Scott Arciszewski
  • 33,610
  • 16
  • 89
  • 206
2
votes
1 answer

Build a simple project using libsodium

I created a very simple Qt project that's using libsodium. (I can create a same project and build well with Visual Studio 2010/2013.) But Qt Creator cannot build: main.obj:-1: error: LNK2019: unresolved external symbol sodium_init referenced in…
aviit
  • 1,957
  • 1
  • 27
  • 50
2
votes
1 answer

How to use NaCl with Java under Windows

I recently found the library Libsodium and was glad that there are also Bindings for Java. Unfortunately, the libraries don't appear to work with Windows because they were developed for other systems. How can I use the libraries under Windows (if…
Mattias
2
votes
2 answers

Using NaCl/libsodium crypto in Objective-C

I try to find out, what's the right way to use the NaCl library in Objective-C. Keygeneration seems easy: - (void) generateKeypair { unsigned char pk[crypto_box_PUBLICKEYBYTES]; unsigned char sk[crypto_box_SECRETKEYBYTES]; …
max
  • 29,122
  • 12
  • 52
  • 79
1
vote
1 answer

Is it easy to retrieve message and encryption key from several encryptions of the same message?

Let's suppose the following context in php: A string: $string= "my beautiful and unique string" An encoding key: $key= "mybinaryencodingkey" Encryption of the string several times, for example in a php function like this: $encrypted_1 =…
1
vote
0 answers

Decrypt ChaCha20-Poly1305 (8 Byte Nonce) in Dart

Poly1305 encrypted UDP-Stream from a web server with a 8 Byte Nonce. Is there a way to decrypt this in dart? I tried these packages: sodium_libs (accepted only XChaCha20-Poly1305-IETF / 24 Byte Nonce) pointycastle (accepted only…
Takrem
  • 41
  • 6
1
vote
1 answer

Use of zeromq@6.0.0-beta.16 package for a web server (undefined symbol: sodium_init)

I am running RHEL9 with node v20.1.0. Zeromq installs without problems, but when I run the command: npm start an error occurs: node: symbol lookup error: /home/fcampion/COMINT/comint-stub/node_modules/zeromq/build/Release/zeromq.node: undefined…
1
vote
1 answer

php-sodium on Amazon Linux 2023

php-sodium is absent on Amazon Linux 2023 and can't be easilly installed. So I'll put the solution here as an answer. Expected to install php-sodium/libsodium on Amazon Linux 2023, but there is no the simple way, because amazon-linux-extras not…
1
vote
0 answers

Why is volatile used in this libsodium function?

I'm trying to understand this function sodium_is_zero from the cryptography library libsodium (https://github.com/jedisct1/libsodium): https://github.com/jedisct1/libsodium/blob/master/src/libsodium/sodium/utils.c#L256-L266 int sodium_is_zero(const…
Ryan Burn
  • 2,126
  • 1
  • 14
  • 35
1
vote
1 answer

Libsodium - use crypto_box_easy where receiver and sender are the same

I would like to use libsodium to encrypt little messages/secrets and share them among different users. The API is straightforward in case the receiver and sender are different. But what happens, when I want to allow as well, that the user encrypts…
Trafo
  • 71
  • 7
1
vote
1 answer

Javascript is not returning objects as expected

Javascript (or Node.js) is not returning objects as expected. The following code logs an empty array. const _sodium = require('libsodium-wrappers'); const sodium = (async () => { await _sodium.ready; return…
user20079009
1
vote
1 answer

Can I insert C code into a C++ project (without Bugs or memory leaks)?

In my project, realised in c++ I make use of 2 libraries: Libsodium (for encrypting and decrypting) SFML (for the graphics part) I know that Libsodium is realised in pure C code, while SFML in C++, whereas my project is in C++. So, Can I mix C…
Adam
  • 11
  • 4
1
vote
1 answer

why isn't this base64 string decoding?

My code:
neubert
  • 15,947
  • 24
  • 120
  • 212
1
vote
1 answer

Check if pubkey belongs to twisted Edwards25519

I want to check if some pubkey belongs to twisted edwards25519 (I guess this is used for ed25519 ?) The problem is that I have in theory some valid pubkeys like: hash_hex =…
bladzio
  • 414
  • 3
  • 15