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
1
vote
2 answers

PHP and Sodium - Unable to pass a nonce publicly in a form

As the title suggest i am having difficulty in passing the value of a nonce publicly through a form. I have tried using both a hidden field in the form and passing the value as a parameter in the url. The nonce is created using: $nonce =…
noelmcg
  • 1,057
  • 3
  • 21
  • 44
1
vote
1 answer

Can't decrypt encrypted file using libsodium

I'm working on the encryption using libsodium my problem is the decryption part, its not going through and displaying error. Fatal error: Uncaught SodiumException: ops limit must be greater than 0 in C:\xampp\htdocs\encrypter\decrypt.php:18 Stack…
1
vote
1 answer

Using libsodium.js in a browser extension

I am trying to use the libsodium.js library in an extension and so far have only tested in Chrome (currently version 71). It works perfectly so far in a standard web page context, but when I try to load it in an extension, I get an error. Whether…
1
vote
1 answer

have installed libsodium but can't run shadowsocks with chacha20

In fact, I am a noober in Linux. I just do and learn something as net tutorial. I use shadowsocks because some reason. The server use chacha20. so, I install libsodium. Firstly, I download libsodium-stable tar vxf…
SysesCool
  • 13
  • 5
1
vote
1 answer

LIBSODIUM decrypt data inside mysql query like did with AES_DECRYPT

I have some sql querys where im selecting rows near to the users location. With AES_DECRYPT i could do inside the query: AES_DECRYPT(lat, :key) I need the decrypted value inside the query to: 1. order them 2. delimit entrys in a given area 3. and…
delato468
  • 474
  • 4
  • 18
1
vote
1 answer

Libsodium generateKeys working only sporadically

I'm running this code: import React, { Component } from "react"; import logo from "./logo.svg"; import "./App.css"; import sotez from "sotez"; class App extends Component { state = { pkh: "", mnemonic: "", sk: "" }; async…
new2leGame
  • 37
  • 7
1
vote
2 answers

libsodium ed25519 key generator printing

I am trying to generate keys using libsoudium and printing them. Where are thees keys stored and how can I find them? This is what I am trying to do in C. unsigned char pk[crypto_sign_PUBLICKEYBYTES]; unsigned char…
nope
  • 47
  • 5
1
vote
0 answers

Difficulty integrating c libsodium output with PHP

My goal is to create a small C program that will generate output which can later be parsed by PHP (which now has a built-in wrapper for libsodium). The problem I am having is that PHP is complaining bitterly about the output from my C program. …
Little Code
  • 1,315
  • 2
  • 16
  • 37
1
vote
1 answer

PHP7, LibSodium and common encryption algorithms

I am writing an implementation of OpenPGP (RFC 4880) with PHP7. GPG and PGP use the symmetric-key algorithm CAST5 (aka CAST-128) to secure private keys. Note: please note that other symmetric-key algorithms are usable (CF RFC 4880) : IDEA,…
Denis Kertios
  • 73
  • 1
  • 5
1
vote
2 answers

PHP Libsodium default encryption method

I'm sure this must've been asked and answered but can't find where... With libsodium in PHP (7.0 / 7.1), what is the default encryption method employed (or where to find it) when you do something like this? $enc = sodium_crypto_secretbox($data,…
1
vote
1 answer

Using libsodium in PHP 7.2

In PHP 7.2 libsodium should be part of PHP core. Is any entry in php.ini file required to make it work or maybe it should work out of the box? I'm trying with PHP Version 7.2.0beta2 and functions like sodium_version_string() or sodium_compare are…
Marcin Nabiałek
  • 109,655
  • 42
  • 258
  • 291
1
vote
1 answer

How to get Libsodium running on Alpine Java

I am trying to run Libsodium on the Alpine Java docker image. RUN "apk update && apk upgrade" RUN "apk add --no-cache ca-certificates wget && update-ca-certificates" RUN "apk add --no-cache openssl build-base libffi libsodium" But when I run…
sdjflalksfja
  • 121
  • 4
1
vote
1 answer

Using Libsodium/Kalium in a java project

I'm trying to encrypt passwords using the Libsodium library using Kalium as a Java warpper. I'm trying to install it but I'm running in a few issues. I have added the Kalium dependency to my pom.xml and placed the libsoidum in my javapath as stated…
Luminai
  • 29
  • 1
  • 1
  • 8
1
vote
1 answer

libsodium + windows 10 x64 + Eclipse

I'm struggling with getting Kalium wrapper for libsodium to work in Eclipse. My first attempt was not to use Maven. So I downloaded Kalium's Jar, downloaded x64 DLL of libsodium added it to win32 folder. Result? no luck: I got an error from the…
Vega4
  • 969
  • 1
  • 11
  • 25
1
vote
2 answers

What am I misunderstanding about password hashing?

It is my understanding that a hash function will always return the same results when fed the same data. But I've been using libsodium (via node-sodium) and that is not what is happening. I have this in my schema: UserSchema.pre('save',…
The E
  • 697
  • 1
  • 9
  • 23