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
0 answers

Swift-Sodium: Scalar Multiplication

I am using SwiftSodium(https://github.com/jedisct1/swift-sodium) for encryption process in my project. I need to perform scalar multiplication of public and private key. ScarMultiplication wrapper class was available in libsodium .net version but…
GJDK
  • 723
  • 2
  • 7
  • 19
2
votes
1 answer

Delay Vue.JS component loading until promise is resolved

I'm extensively using libsodium.js in a Vue.JS application I'm building. Libsodium.js isn't usable right away, it does some async loading. Because I use this library in pretty much every .vue component, I need to delay the actual component loading…
Basaa
  • 1,615
  • 4
  • 20
  • 41
2
votes
1 answer

How to export Libsoidum keys using PHP

Super noob here with Libsodium so I apologize in advance. I'm using PHP and working through this example in PHP. // On Alice's computer: $alice_box_kp = sodium_crypto_box_keypair(); $alice_sign_kp = sodium_crypto_sign_keypair(); // Split the key…
2
votes
2 answers

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…
2
votes
1 answer

Why do Rust/sodiumoxide PublicKeys get prefixed with a length when serialised?

sodiumoxide defines PublicKey as: new_type! { /// `PublicKey` for signatures public PublicKey(PUBLICKEYBYTES); } The new_type macro expands to: pub struct $name(pub [u8; $bytes]); Thus, PublicKey is defined as a simple wrapper of 32…
fadedbee
  • 42,671
  • 44
  • 178
  • 308
2
votes
1 answer

PHP paragonie/halite - missing Sodium\ constants?

I want to implement simple encryption. I'm using newest PHP 7.1.8, and since mcrypt is deprecated, I learned about the libsodium. Installed it, and this is how my PHP info looks: Everything seems to be in order. And then I installed…
Adrian
  • 1,499
  • 3
  • 19
  • 26
2
votes
0 answers

mingw-w64 cannot link to libsodium

I am building a c++ project, where I need to support multiple platforms. Because I mainly use Linux, I am trying to compile project for Windows also on Linux. I am using a mingw compiler. It is similar to g++, but i have problems with linking…
matejm
  • 270
  • 1
  • 10
2
votes
1 answer

BitTorrent test case failing with libsodium

I'm trying to run the test vector as described in BitTorrent BEP 44 test #1, but I'm not creating the same signature as they…
Peter Jankuliak
  • 3,464
  • 1
  • 29
  • 40
2
votes
1 answer

How can I create or open a libsodium compatible sealed box in pure Java

libsodium provides an API to create or open a sealed box documented here https://download.libsodium.org/doc/public-key_cryptography/sealed_boxes.html How can I achieve the same in pure Java, so that allows me to open a box created by libsodium or…
2
votes
3 answers

Am I hashing passwords correctly?

My current project is my first in Node.js (also using MongoDB, Mongoose, and Express, if it matters), and being easily distracted, I have fallen down the rabbit hole of crypto while deciding how to handle user authentication. (No other encryption is…
The E
  • 697
  • 1
  • 9
  • 23
2
votes
1 answer

Using libsodium.crypto_pwhash (Argon2) in Node

I am having trouble getting crypto_pwhash_str working in my Node project. I imported the libsodium-wrappers-sumo and libsodium-sumo libraries properly and am able to call other functions with success. My call to the problematic function looks like…
TovrikTheThird
  • 471
  • 2
  • 7
  • 20
2
votes
1 answer

Java JNI issues loading libc.so on Linux, tries to load an ASCII /usr/lib64/libc.so and finds that it is indeed not an ELF file

I'm working on some software that uses libsodium for cryptography…in Java. It has worked fine for me on both macOS 10.11/10.12 and Ubuntu Server 16.04. When I try to run my software on an Amazon EC2 Instance with Amazon Linux (uname -a returns Linux…
2
votes
1 answer

Including Paragonie Halite in project doesn't find variables and functions

I've installed libsodium on Windows for PHP 7 and I'm developing my project with PHPStorm. I've also installed Halite from Paragonie which couldn't even be installable if the libsodium extension were not installed correctly. Also the IDE finds the…
hardking
  • 193
  • 2
  • 17
2
votes
0 answers

libsodium fails to initialize in wkWebview iOS for certain web apps

I’m using libsodium library for encryption in browser extensions (chrome and safari) for encrypting data retrieved from webpages. I’m also using it in iOS wkWebView browser which works fine for most of the web apps. All I had to do was grab the…
Feru
  • 1,151
  • 2
  • 12
  • 23
2
votes
1 answer

libsodium implementation differences between PHP and Node.js

I have a PHP REST (Gateway) server. The client is a node.js server. THe data exchanged between them is encrypted (crypto_secretbox) & decrypted (crypto_secretbox_open) using libsodium easy api implementations of PHP & Node respectively. Encrypted…
indiangolfer
  • 311
  • 1
  • 2
  • 8