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
3
votes
1 answer

Is libsodium xchacha20poly1305 header sensitive?

I'm using libsodium to encrypt files with xchacha20poly1305 construct. I got everything working correctly by following documentation (https://download.libsodium.org/doc/secret-key_cryptography/secretstream.html) but now I'm wondering about the role…
jimmy
  • 1,413
  • 2
  • 13
  • 23
3
votes
1 answer

libsodium compatibility PHP vs Javascript

I have a PHP code that uses the RSA encryption via libsodium (sodium_compat) library. My script is as below: //https://packagist.org/packages/paragonie/sodium_compat //composer require paragonie/sodium_compat require_once…
oussama kamal
  • 1,027
  • 2
  • 20
  • 44
3
votes
1 answer

Unable to create same scrypt digest between Ruby-s and Go-s implementations

I'm having a problem of calculating the same scrypt digest between RbNaCl and Go's implementation. Here's how I'm generating key with rbnacl: opslimit = 2**20 memlimit = 2**24 digest_size = 32 digest = RbNaCl::PasswordHash.scrypt( …
Jarmo Pertman
  • 1,905
  • 1
  • 12
  • 19
3
votes
2 answers

data encryption/decryption for PHP 7.1 and higher

I currently have a PHP application that uses data-at-rest encryption to store sensitive information onto a database that I can later decrypt for use in my application. Here is the current code I'm using. I kno...i kno...it's not very secure at all…
Austin
  • 1,619
  • 7
  • 25
  • 51
3
votes
1 answer

Libsodium "Call to undefined function sodium_randombytes_buf"

Trying to follow the examples here, but it gives me Fatal error: Uncaught Error: Call to undefined function sodium_randombytes_buf() On top of that, the key pairs seems to be generating weird strings like: kÿòjƒFDú{î—4]F◊î¸˜ßˆu…®_•A∞+. Is that…
AFwcxx
  • 467
  • 1
  • 4
  • 15
3
votes
3 answers

libsodium "Call to undefined function" error

I have installed libsodium and libsodium-php on ubuntu 16.04 but when I run: `
T. Doe
  • 43
  • 1
  • 4
3
votes
2 answers

How to store encrypted documents for multiple users

An online system (front end written in PHP but that's not too relevant) needs to store text in a MySQL database encrypted so that local sysadmins cannot view the data, also so that the data cannot be viewed in the event that the database is stolen.…
Paul
  • 103
  • 6
3
votes
0 answers

What is the proper way to handle key derivation on Android with libsodium?

I am trying to use libsodium for symmetric encryption on Android. In order to get libsodium on android, I am using this binding library. I am struggling to find the proper way to derive a key from a (low entropy/user chosen) password. There is…
Stephen
  • 4,041
  • 22
  • 39
3
votes
2 answers

./configure is not recognized as the name of a cmdlet

I am trying to use this github code in github shell, but the message ./configure is not recognized as the name of a cmdlet $ git clone git@github.com:jedisct1/libsodium.git $ ( cd libsodium && \ ./configure --prefix="/usr/local"…
3
votes
1 answer

Libsodium and pecl-libsodium installed but PHP throws error

I need to encrypt passwords and some other data in my PHP(5.5.9) application on Ubuntu (14.04) server. I read about libsodium and found it a good fit for the applications requirements. I followed all the instructions given in the only tutorial…
abhogu
  • 393
  • 4
  • 18
3
votes
3 answers

Using Libsodium with PHP on WAMP

I'm having really hard trouble installing libsodium on my local server (WAMP64). I used this guide and many others, but still no luck. I successfully installed PEAR but I can't use it to install the PHP wrapper of libsodium. Can someone post a…
Andrea
  • 103
  • 1
  • 1
  • 13
3
votes
1 answer

Installing libsodium in MAMP environment

I'm trying to install libsodium (following this guide https://paragonie.com/book/pecl-libsodium/read/00-intro.md#installing-libsodium). When I attempt to use pecl install libsodium, I get the following result: Build process completed…
thebarless
  • 470
  • 1
  • 12
  • 34
3
votes
1 answer

How to make Libsodium Available to Rust on Windows (beginner's guide)?

I can't find any clear answers to this. I'm a beginning Rust programmer (read the book, wrote and compiled simple programs). Almost no knowledge of C/C++. The platform is Windows 7 64-bit. Rust stable (managed by Rustup) and I'd prefer the GNU…
rvenner
  • 31
  • 2
3
votes
2 answers

How does libsodium generate a keypair

For public key encryption and diffie-hellman in libsodium, I typically make private keys simply by generating 32 random bytes with randombytes_buf and then derive the public key (when needed) using crypto_scalarmult_base. Is there any benefit to…
Jeroen Ooms
  • 31,998
  • 35
  • 134
  • 207
3
votes
1 answer

Can I do AES-128-ECB encryption with Libsodium?

I need to encrypt a block of data using AES-128-ECB and would like to do so with libsodium and Ruby. I have prototyped a solution in Ruby using OpenSSL APIs as shown below: aes = OpenSSL::Cipher::Cipher.new("AES-128-ECB") aes.encrypt aes.key =…
davidgyoung
  • 63,876
  • 14
  • 121
  • 204