fiatjaf / nak

a command line tool for doing all things nostr
The Unlicense
180 stars 23 forks source link

`failed to encrypt: salt must be 32 bytes` on `nak bunker` #30

Open nanikamado opened 1 month ago

nanikamado commented 1 month ago

I started nak bunker --sec 1 relay.damus.io, logged in to coracle.social using the bunker URL, and tried to send a NIP-17 DM, but couldn't.

The log was like this:

- got request from 'ec41458f7bdde8190818c41307f467096b99bb0182bb3982702e5d6cf45f44d0': {
    "id": "5376369500923434",
    "method": "nip44_encrypt",
    "params": [
      "79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
      "{\"content\":\"test1\",\"kind\":14,\"created_at\":1724083587,\"tags\":[[\"p\",\"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\",\"wss://nostr.fmt.wiz.biz/\",\"one\"]],\"pubkey\":\"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\",\"id\":\"8dbaf3f55a59236f638745009f1a5ae483ef95176f4331c02f56338197e69e26\"}"
    ]
  }
~ responding with {
    "id": "5376369500923434",
    "error": "failed to encrypt: salt must be 32 bytes"
  }
* sent response through wss://relay.damus.io

Is this a problem with nak or coracle?

fiatjaf commented 1 month ago

Probably nak. I had never tested the nip44 integration. Thank you for reporting.