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
6
votes
2 answers

Build zeromq on Windows 10 with CMake

In the past I’ve used the Visual Studio solution files to build zeromq (libzmq) on Windows. I just noticed that the Visual Studio solutions have been deprecated because they are too difficult to maintain. The alternative is to use CMake; trouble…
GoFaster
  • 835
  • 1
  • 12
  • 23
6
votes
3 answers

Unable to load dynamic library 'php_libsodium'

I'm trying to install the libsodium php extension (https://pecl.php.net/package/libsodium/1.0.6/windows). When I run php -m, libsodium shows up in the list. However, when I go to phpinfo, it is not listed. I also noticed that apache is giving me…
ChrCar627
  • 63
  • 1
  • 1
  • 3
6
votes
1 answer

secure key exchange with libsodium

I want to do a test application which uses libsodium to communicate from a client to a server. There are many ports for many languages: C#, PHP,... and there is always an example with "bob" and "alice". Thats fine, but they never show how to…
user3445253
  • 63
  • 1
  • 4
6
votes
2 answers

Encryption using libsodium

I have been struggling to encrypt/decrypt some data using crypto_secretbox_easy() in libsodium. I can't seem to find any good documentation on the usage. I want to get a password from the user, use that to somehow make a key, then encrypt/decrypt…
kevinlindkvist
  • 183
  • 1
  • 8
5
votes
2 answers

Problem installing Sodium package in R on an Ubuntu system

I am trying to install a package called sodium in R on an Ubuntu system but I'm getting an error message like the following: install.packages("sodium", dependencies = T) ... * installing *source* package ‘sodium’ ... ** package ‘sodium’…
johnny
  • 571
  • 4
  • 14
5
votes
0 answers

Has Curve25519 been replaced in NaCL library?

I am using NaCL library and I like it but I wonder what is required to replace Curve25519 with different, stronger curve if stronger encryption is needed. I do understand that new library would be incompatible with NaCL.
user3130782
  • 841
  • 1
  • 6
  • 15
5
votes
1 answer

Install libsodium on macOS

I am trying to incorporate libsodium into my C++ project in Xcode. I am following the Installation instructions here: https://libsodium.gitbook.io/doc/installation However, I'm not sure where the "installed" files go on my machine or how to then…
user1922718
  • 149
  • 1
  • 9
5
votes
5 answers

Simple Javascript encryption using Libsodium.js in this sandbox demo

I've spent an embarrasing number of hours trying to get Libsodium.js to work. See my fiddle demo (and code pasted below too). I keep getting Error: wrong secret key for the given ciphertext. What I would prefer is to replicate this PHP example of…
Ryan
  • 22,332
  • 31
  • 176
  • 357
5
votes
1 answer

libsodium PHP storing private key in file

I have been using the openssl libraries in PHP to generate keypairs for RSA encryption, and have seen that in the latest version of PHP, 7.2, libsodium has now been integrated. I would like to update to the newer library, and can generate the…
Itergator
  • 299
  • 3
  • 16
5
votes
1 answer

When using libsodium-net do I not need to generate and store salts?

n.b. I am not a crypto expert (which is why I'm using a library like NaCl). From what I have read on the subject, the most secure way to store user passwords in a database is to store the hash and the salt used to generate that hash. I decided to…
Lex
  • 6,758
  • 2
  • 27
  • 42
5
votes
1 answer

Using libsodium in an android studio project

I am trying to utilize the libsodium library in an android studio project. However, I am having trouble figuring out how to do this. I have the library downloaded from the libsodium website, but do not understand how to create the library files…
user3684980
  • 269
  • 1
  • 5
  • 13
4
votes
1 answer

LibSodium dependency in CMake doesn't resolve in Docker container

I'm trying to build my C project using Docker and CMake. CMake'ing using cmake . && cmake --build . works fine on my system (MacOS), using the following CMakeLists.txt: cmake_minimum_required (VERSION 3.0) project (PROJECTNAME) # Include…
Yuri van Geffen
  • 853
  • 1
  • 7
  • 21
4
votes
3 answers

Installing PHP on Amazon Linux 2 with Argon2 Enabled

I am having a problem with enabling Argon2 for password hashing. I am building PHP from source of Amazon Linux 2 but once the build have finishing and PHP is compiled, the PASSWORD_ARGON2I constant is undefined and the algorithm is not available. I…
Robert Hucks
  • 80
  • 1
  • 7
4
votes
1 answer

Which key-pair type to use in libsodium? What are the different capabilities of each?

I want to use a suitable libsodium keypair as user identity but I don't know yet what cryptography features I'll provide. There seems to be 3 types of keypair generation in…
4
votes
1 answer

libsodium - Use crypto_box_easy to encrypt files?

I want to encrypt a large file (100 MB) with the a public-private-key method in libsodium. For small messages, I use crypto_box_easy(), but this does not work for large files. What is the best approach to use crypto_box_easy() for files? I cannot…
Chris R.
  • 415
  • 2
  • 5
  • 15
1
2
3
21 22