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

How do you install the x86_64 version of a brew package on a M1 Mac?

I'm working on an M1 processor and I'm running a setup script that needs access to the package libsodium which doesn't exist on my computer. I run brew install libsodium which installs the package here /opt/homebrew/Cellar/libsodium with all my…
Peter T. Walker
  • 152
  • 1
  • 12
1
vote
1 answer

How to verify public key is on Ed25519 curve in PHP? (verify Solana address)

Building a server-side implementation to do Solana verification for a contract, when we receive a Solana address (Ed25519 public key) from client. They only want me to use native PHP methods, no imports, idk why. Open source libraries are still…
1
vote
1 answer

How do I decrypt data with sodium_crypto_box_seal_open function that was encrypted with sodium_crypto_box_seal in mysql using php?

I have some data that was encrypted with sodium_crypto_box_seal and store the encrypted data and the keypair in mysql. Now I would like to decrypt the data with sodium_crypto_box_seal_open in php but I am getting the following error: Fatal error:…
dyahmed
  • 43
  • 7
1
vote
0 answers

PHP startup: Unable to load dynamic library 'sodium.so'

Currently, I am using AMPPS, and I would like to use AMPPS to install Magento. However, it shows me PHP startup: Unable to load dynamic library 'sodium.so' I found that sodium.so exists in php.ini but not in php74/ext. Then I enabled it and still…
littlesam
  • 45
  • 5
1
vote
1 answer

How do I convert a 44 bytes long base64 string (public key) to a 32 bytes long UInt8 array?

I'm using the swift-sodium library and need a 32 bytes long UInt8 array (public key) to seal a message. However, the public key which is generated by the tweetnacl-js library that I got from an api is a 44 bytes long base64 string. How do I convert…
Tim Langner
  • 357
  • 3
  • 16
1
vote
0 answers

Signing a payload which is already hashed in pynacl

I am switching an application from Python cryptography.io library to pynacl. The application currently calculates digests of the data, then has the crypto libraries sign the digest. But pynacl's signing code always requires the full data to be…
Brad
  • 11,262
  • 8
  • 55
  • 74
1
vote
1 answer

Lazysodium keys in Java Keystore

I'm using the Lazysodium library (https://terl.gitbook.io/lazysodium/) to access libsodium from Java, specifically for Ed25519 digital signatures. I'd also like to be able to store key pairs in a standard Java keystore. However, libsodium works with…
mikera
  • 105,238
  • 25
  • 256
  • 415
1
vote
1 answer

Swift Package Manager - copy files build phase for a dynamic dependency

I'm working on an iOS application, and the core of it we are going to open source as a standalone Swift Package for other developers. The Swift Package depends on Sodium (https://github.com/jedisct1/swift-sodium). There is an issue with this library…
Simon McLoughlin
  • 8,293
  • 5
  • 32
  • 56
1
vote
1 answer

Encryption using libsodium and need to generate public and private keys using crypto_box_keypair

I have been working with the libsodium library to implement Shamir secret sharing and trying to test the implementation done by dark crystal https://gitlab.com/dark-crystal-javascript/key-backup-crypto/-/blob/master/example.js Implementation is…
Vikas
  • 975
  • 1
  • 10
  • 34
1
vote
1 answer

PHP Sodium Decryption Returns False

I am new to php and stackoverflow, thus some mistakes may happen. Please inform me if so and I will resolve them as soon as possible. My encrypt function: function encrypt($data){ $nonce =…
Micheal
  • 11
  • 2
1
vote
1 answer

Trying to use libsodium with web worker error TypeError: sodium.crypto_pwhash is not a function

I imported sodium.js using importScripts, but when web worker runs it gives error TypeError: sodium.crypto_pwhash is not a function. Console.log sodium.js in worker however prints the sodium object. What am i missing?
Neha Rai
  • 13
  • 2
1
vote
1 answer

Encrypting/signing with libsodium to myself?

I've got a list of public keys, and my private key, and want to provide a signed/encrypted data value for all of them, including myself. Is it safe to sign/encrypt to myself as to all others? In crypt_box_easy (with a random nonce which gets…
1
vote
0 answers

libsodium.dll runtimes folder was not found

I'm using libsodium 0.10.0.0 package to implement password hashing. After installing the nuget package the entries are created in package.config and project file as below:
Kapil
  • 1,823
  • 6
  • 25
  • 47
1
vote
0 answers

Encrypt in JavaSscript with NaCl, Decrypt With PHP libsodium using KeyPair

i want to use NaCl library in the client side and libsodium in php to encrypt/decrypt messages between the client and the server using keypair(public,private). When i encrypt with libsodium and decrypt with NaCl everything works, But when i try to…
John.F
  • 53
  • 6
1
vote
1 answer

Manual configuration of Xcode

Upgraded to OSX Catalina and am having trouble installing libsodium for PHP. I have followed these steps Installation of Xdebug on MacOS Catalina 10.15 and still no joy. When I run the php -i | grep "xdebug support" cmd I get the following…
Bryan
  • 13
  • 2