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

How can I fix this to allow the decrypting process to work as intended

Here is my code(I am including -lsodium when compiling: #include #include #include #include #include // Preprocessor directives #define KEY_SIZE 32 #define NONCE_SIZE 8 #define INPUT_SIZE…
0
votes
1 answer

Rust dryocstream share header publicly?

I am trying to establish an encrypted connection between two clients using a TcpStream on both sides. The following method will be executed on both clients. The decryption_key and encryption_key have already been exchanged using the dryoc::kx key…
Philipp
  • 1
  • 1
0
votes
1 answer

SUPABASE local development seed users table

I'm working on a SQL function to fill the auth.users table with a given number of rows for local development. I manage to complete the creation function but I didn't find a way to handle password hash in encrypted_password column. I tried to…
0
votes
1 answer

Random password generator + algorithm

I'm currently developing a CLI password generator and I've been trying to come up with ways of randomizing characters between a defined set of chars. I know the srand(time(NULL)) method but as far as I know, it's a bit incosistent and not so safe to…
thevoyager
  • 33
  • 5
0
votes
0 answers

sodium_secretbox vs sodium_​crypto_​aead_​xchacha20poly1305_​ietf, which is recommended for interop?

We have the need of saving encrypted data (general length 30-100 chars, unencrypted) into a database, this data will have to be read and decrypted in several different applications (PHP, python, ruby). After doing a bit of research about it, and…
ateam
  • 137
  • 1
  • 11
0
votes
0 answers

Add Libsodium JNI to a java project in Eclipse

I would simply like to be able to use the libsodium JNI binding of the libsodium C library in my java project on Eclipse. I'm on Windows x64, and the libsodium JNI documentation isn't very detailed about importing to a Java IDE. I imported and…
xasalew
  • 1
  • 1
0
votes
1 answer

PHP Storing Secrets with sodium_crypto_secretbox_keygen Key and Nonce Defeats Purpose?

For my particular PHP (8.2) Web Application I am storing keys and secrets in an .ini file outside of root in a folder /private. I have been requested to encrypt the data in the ini file (reason stating that the php code is accessing the key details…
ToddN
  • 2,901
  • 14
  • 56
  • 96
0
votes
1 answer

Can a key be changed for said stored encryption with PHPs LibSodium?

As the title suggests, can an encrypted data's key be changed once it's been set without resetting the original data with the LibSodium PHP library? I've searched high and low but I can't seem to find anything!
Jake
  • 37
  • 5
0
votes
0 answers

how to generate public / private key pair using libsodiumjs in nodejs

I am a new in Nodejs and libsodium.js. I have a task but I don't know how to solve it, and from where to start it. I'll appreciate if someone guides me. I have a class wallet inside it I need to generate public and private key then class Wallet { …
0
votes
0 answers

How to use lib-sodium in HTML page by using CDN

Hi I am trying to use libsodium as CDN in my HTML page code is