Closed frbitten closed 1 year ago
Are you encrypting the message with the nostr-sdk?
No. I send a private message from my Amethyst account to the public key on the bot.
for reference, this appears to be the code for amethyst's nip04 encryption: https://github.com/vitorpamplona/amethyst/blob/4f4cab6a6c4053c85b65b8ca4dcf4d5ab5f320f1/quartz/src/main/java/com/vitorpamplona/quartz/crypto/CryptoUtils.kt#L66-L89
I found the problem. The filter was wrong and I was trying to read a message from the same author but it was not the same recipient. Therefore, the key was invalid for encryption.
Hi
I'm trying to make a bot via private messages and when I receive a message and try to decrypt it I get the error below:
Error during content decryption: err='Wrong encryption block mode. The content must be encrypted using CBC mode!'
I use the nostr-sdk package in Python. Does anyone have any suggestions as to what I'm doing wrong in the process? I'm trying the example: https://github.com/rust-nostr/nostr/blob/master/bindings/nostr-sdk-ffi/bindings-python/examples/bot.py