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

PHP Version 7.3.17 on Amazon EC2 missing sodium?

When making call to sodium_crypto_pwhash_str I get the following in my Apache error log file. PHP Fatal error: Uncaught Error: Call to undefined function sodium_crypto_pwhash_str() My php version, as noted is 7.3.17 running on an Amazon EC2…
E.Bradford
  • 783
  • 7
  • 21
1
vote
1 answer

Why does the ldd command on libzmq not show libsodium dependency?

I have cross compiled libsodium and libzmq. I compiled libzmq with the commands below : ./configure CC=arm-linux-gnueabi-gcc \ --host=arm-linux-gnueabi \ …
Sagar
  • 1,115
  • 2
  • 13
  • 22
1
vote
0 answers

ciphertext is too short when using laravel/passport

Can anyone help with a problem I'm getting with setting up laravel/passport? I've currently got the granting clients access to user data sorted and it's storing auth_codes in the DB fine. However, when going to POST http://my-app.test/oauth/token to…
1
vote
0 answers

Length of Ed25519 signature

I am using lazysodium-android to generate keypairs and generating a signature using a message and privatekey as shown in the kotlin code below. val pair = lazySodium.cryptoSignSeedKeypair(seed.seedBytes) println(pair.publicKey.asBytes.size)…
Sanjay S B
  • 259
  • 2
  • 15
1
vote
1 answer

Libsodium on macOS, undefined symbols for x86_64

I'm using an Intel Mac running Catalina 10.15.1 I'm trying to use libsodium using gcc Apple clang version 11.0.0 (clang-1100.0.33.12) I have both tried to install libsodium via home-brew and manually compile (which was successful), however, when…
Woodstock
  • 22,184
  • 15
  • 80
  • 118
1
vote
3 answers

How to install succesfully libsodium (for php7.2) on Centos7?

I take a Magento project and when i run x debug I have an exception because libsodium is not installed then I went to install libsodium. I then follow this tutorial https://lukasmestan.com/install-libsodium-extension-in-php7/ (because I have php 7.2…
user10989117
1
vote
1 answer

64 bytes keys in PyNaCl

Is there a way to use 64 bytes keys in PyNaCl? I am working with the signature functions in PyNaCl. Where I can sign messages and verify them using asymmetric cryptography. As far as I know the basic implementation of signing uses 32 bytes…
kummerer94
  • 171
  • 10
1
vote
1 answer

Decrypt in Python a string encrypted in PHP with Halite/Libsodium

I use this PHP code to encrypt a string: use ParagonIE\Halite\KeyFactory; use ParagonIE\Halite\Symmetric\Crypto as Symmetric; use ParagonIE\HiddenString\HiddenString; define("SECURE_PLACE", '/home/htdocs/secure_place/encryption.key'); /* //already…
Luis Rock
  • 357
  • 4
  • 17
1
vote
0 answers

Why id the program returning "Signature invalid?"

I use this program to encrypt a message (program arguments: "Sign Message") and decrypt it with libsodium I tried bith variants crypto sign and crypto_sign_detached but it always fails verifying the message. #include #include…
user11903678
1
vote
2 answers

Libsodium JS KDF function produces different output

I've tried to use crypto_kdf_derive_from_key function on Android, iOS and JS. On Android and iOS it produces the same output but it doesn't on JS. The context, master key and the size are the same. Any ideas why? All platforms use the same core…
Dmitry Klimkin
  • 445
  • 3
  • 15
1
vote
0 answers

how to libsodium 1.0.18 install in shared server

i want to install 'libsodium-1.0.18' in my shared server like below way .. curl -O https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz \ && tar xfvz libsodium-1.0.18.tar.gz \ && cd libsodium-1.0.18 \ &&…
Rakesh Donga
  • 135
  • 11
1
vote
1 answer

could not compile dependency :salty, "mix compile" failed

I am compiling my application with mix compile and there an error is occurring for the dependency salty. I have already added the dependency salty and libsodium. But still error is not resolved. this is my mix.exs file with all the…
SmartieHead
  • 63
  • 3
  • 8
1
vote
1 answer

How to get the V co-ordinate of a point in libsodium?

The public keys ad the result of scalar multiplication in libsodium is always the U - coordinate of the point of curve25519 (RFC 7748). Is there a method in libsodium that helps to get the V coordinate from the U co-ordinate. Or is there any other…
UchihaItachi
  • 2,602
  • 14
  • 21
1
vote
3 answers

How to generate a uniformly distributed random double in C using libsodium in range [-a,a]?

The libsodium library has a function uint32_t randombytes_uniform(const uint32_t upper_bound); but obviously this returns an unsigned integer. Can I somehow use this to generate a uniformly distributed random double in range [-a,a] where a is also…
mlg556
  • 419
  • 3
  • 13
1
vote
1 answer

I receive "wrong secret key for the given ciphertext"

(edit) Still at this. I've changed the code, now using the example functions directly from the library's Github page but am still having the same exact issue. Am I missing something obvious here?? My only deviation is to use the built in…