Questions tagged [nacl-cryptography]

NaCl (pronounced "salt") is a high-speed software library for network communication, encryption, decryption, signatures, and more. Not to be confused with [google-nativeclient].

Sources & Resources:

54 questions
13
votes
1 answer

How do I convert libsodium private keys to OpenPGP compatible private key packets?

libsodium is an awesome encryption library, and GnuPG is an awesome key management and signing software. GnuPG recently released support for Ed25519 signing keys, and submitted a draft to the IETF. I want to use Sodium-generated keys by my web…
Fredrick Brennan
  • 7,079
  • 2
  • 30
  • 61
7
votes
2 answers

Questions about the NaCL crypto library

I was looking for libraries to implement an encryption system and was interested in using the NaCl: Networking and Cryptography library specifically the box function. Obviously, it uses symmetric encryption XSalsa20, Curve25519 for public-private…
6
votes
1 answer

import paramiko throws '_sodium' has no function error

Importing paramiko throws following exception on Python3. Traceback (most recent call last): File "requirements_check.py", line 117, in import paramiko File "/usr/local/lib/python3.5/dist-packages/paramiko/__init__.py", line 22,…
jeffry copps
  • 305
  • 5
  • 22
6
votes
1 answer

secure key exchange with libsodium

I want to do a test application which uses libsodium to communicate from a client to a server. There are many ports for many languages: C#, PHP,... and there is always an example with "bob" and "alice". Thats fine, but they never show how to…
user3445253
  • 63
  • 1
  • 4
6
votes
2 answers

Encryption using libsodium

I have been struggling to encrypt/decrypt some data using crypto_secretbox_easy() in libsodium. I can't seem to find any good documentation on the usage. I want to get a password from the user, use that to somehow make a key, then encrypt/decrypt…
kevinlindkvist
  • 183
  • 1
  • 8
5
votes
2 answers

How to Have NaCL at AWS Lambda Properly Working?

I am using Pychromeless repo with success at AWS lambda. Now I need to use NaCL dependency, to decrypt a string, but I am getting Unable to import module 'lambda_function': /var/task/lib/nacl/_sodium.abi3.so with a complement of invalid ELF…
Luis Rock
  • 357
  • 4
  • 17
5
votes
1 answer

Sending a public key in pynacl as JSON object

I have a server and client setup where when the client connects, it sends over a JSON object with a username and a public_key. My current code: private_key = PrivateKey.generate() public_key = private_key.public_key payload = json.dumps({"username":…
Awn
  • 817
  • 1
  • 16
  • 33
5
votes
1 answer

Using libsodium in an android studio project

I am trying to utilize the libsodium library in an android studio project. However, I am having trouble figuring out how to do this. I have the library downloaded from the libsodium website, but do not understand how to create the library files…
user3684980
  • 269
  • 1
  • 5
  • 13
4
votes
1 answer

Which key-pair type to use in libsodium? What are the different capabilities of each?

I want to use a suitable libsodium keypair as user identity but I don't know yet what cryptography features I'll provide. There seems to be 3 types of keypair generation in…
4
votes
1 answer

C++ - Undefined reference to "sodium_init"

I am attempting to make a testing application using libsodium, however I am getting the error: main.cpp:6: undefined reference to `sodium_init' I ran the following commands to install in as the root user. $ ./configure $ make && make check $ make…
J. Doe
  • 97
  • 2
  • 6
3
votes
0 answers

TweetNaCl TypeError: unexpected type, use Uint8Array

I have a problem when trying to use sign function from TweetNaCl. It always throws error unexpected type, use Uint8Array. const nacl = require('tweetnacl') nacl.util = require('tweetnacl-util') const b = nacl.sign.keyPair() //…
theboyonfire
  • 526
  • 1
  • 6
  • 22
3
votes
1 answer

Unable to create same scrypt digest between Ruby-s and Go-s implementations

I'm having a problem of calculating the same scrypt digest between RbNaCl and Go's implementation. Here's how I'm generating key with rbnacl: opslimit = 2**20 memlimit = 2**24 digest_size = 32 digest = RbNaCl::PasswordHash.scrypt( …
Jarmo Pertman
  • 1,905
  • 1
  • 12
  • 19
3
votes
2 answers

How does libsodium generate a keypair

For public key encryption and diffie-hellman in libsodium, I typically make private keys simply by generating 32 random bytes with randombytes_buf and then derive the public key (when needed) using crypto_scalarmult_base. Is there any benefit to…
Jeroen Ooms
  • 31,998
  • 35
  • 134
  • 207
2
votes
1 answer

Sign a text with pynacl (Ed25519) importing a private key

In the code below I try to sign a nonce using pynacl. from nacl.encoding import Base64Encoder from nacl.signing import SigningKey import base58 import base64 secret = '5N3SxG4UzVDpNe4LyDoZyb6bSgE9tk3pE2XP5znXo5bF' nonce =…
2
votes
1 answer

Can I use pyNaCl sealed boxes with an existing openssh key pair?

I'm trying to use PyNacl to do asymetric encryption (public and private ssh key pairs) to safely transmit data. I'm using an existing key pair generated with ssh-keygen -t ed25519 in the openssh format. (more details on my code below) The question…
1
2 3 4