Alex on Nostr: nip04 encrypt: 5,000 iter/s aes-cbc without a shared secret encrypt: 40,000 iter/s ...
nip04 encrypt: 5,000 iter/s
aes-cbc without a shared secret encrypt: 40,000 iter/s
aes-gcm and nip44 basically the same.
The point is if you're encrypting a message to only yourself, it's 10x faster to not do this diffie-hellman thing and just BYO secret.
Please note that I don't actually understand all these words, I just ran a few benchmarks, and decided to encrypt secrets in my database with aes-gcm and just one key instead of nip44/nip04.
aes-cbc without a shared secret encrypt: 40,000 iter/s
aes-gcm and nip44 basically the same.
The point is if you're encrypting a message to only yourself, it's 10x faster to not do this diffie-hellman thing and just BYO secret.
Please note that I don't actually understand all these words, I just ran a few benchmarks, and decided to encrypt secrets in my database with aes-gcm and just one key instead of nip44/nip04.