Questions tagged [tweet-nacl]

9 questions
3
votes
0 answers

unexpected type, use Uint8Array using tweetnacl sigining solana transaction

I am getting Unhandled Rejection (TypeError): unexpected type, use Uint8Array while signing solana transaction Unhandled Rejection (TypeError): unexpected type, use Uint8Array ▶ 3 stack frames were collapsed. (anonymous…
Krishna Satya
  • 775
  • 2
  • 9
  • 21
3
votes
2 answers

TweetNaCl.js minimal Public-key signatures example

I am trying to understand how to implement a minimal basic Public-key signature example based on the demo located here, using pure javascript. My research has not yielded a simple javascript example that I can use to understand its inner workings,…
Dshiz
  • 3,099
  • 3
  • 26
  • 53
2
votes
1 answer

TweetNaCl.js encryption and decryption not working properly

I need to encrypt a message with a user's public key. The user will receive the message and will have to decrypt it having the private key. I'm trying in every way but I can't figure out what I'm doing wrong. I made a node script that works…
IlConte
  • 150
  • 1
  • 2
  • 9
2
votes
1 answer

tweetnacl returns no PRNG error in react native

I use nacl in react native i just write down code below. it returns no PRNG error in randombytes variable. const test = nacl.box.keyPair(); here is my package.json too. { "dependencies": { "@react-navigation/material-bottom-tabs":…
Jerry
  • 41
  • 1
  • 6
2
votes
1 answer

Encrypt in tweet-nacl (javascript) and decrypt in python

This question is the inverse of the existing one here: Encrypt in python 3.7 and decode in NODEJS 12 . I would prefer to use the exact equivalent of tweet-nacl on python but that project says it is old and not recommended…
WestCoastProjects
  • 58,982
  • 91
  • 316
  • 560
2
votes
1 answer

TweetNaCl.js Public-key signatures example err

I want to use ed25519 to sign my message. And I found TweetNaCl.js which has the Signatures method to achieve my goal. By referencing TweetNaCl.js minimal Public-key signatures example and official document-Signatures, here is my test code…
Dana Chen
  • 216
  • 3
  • 14
1
vote
2 answers

Mixing tweetnacl.js with TweetNaclFast (java) for asymmetric encryption

Our project is using asymmetric encryption with nacl.box and ephemeral keys: encrypt(pubKey, msg) { if (typeof msg !== 'string') { msg = JSON.stringify(msg) } let ephemKeys = nacl.box.keyPair() let…
WestCoastProjects
  • 58,982
  • 91
  • 316
  • 560
0
votes
1 answer

tweetnacl -- What input does nacl.box.keyPair.fromSecretKey expect?

I am little bit confused about the API of tweetnacl. Does the function nacl.box.keyPair.fromSecretKey except the secretKey argument to be already clamped? Or it is it fine to provide a random byte string? The way I read the code, tweetnacl does the…
0
votes
1 answer

I am using PyNacl at the backend for digital signatures. Which library should I use at frontend?

I have created an API that validates data based on PyNacl at the backend. I am accepting length 64 hexadecimal-encoded sender and recipient account numbers for my simple Crypto API and validating the signature based on PyNacl library. I was…