mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-06 03:38:23 +00:00
Cross-implementation check of NIP-49. The same 14 cases were encrypted with Amethyst, nostr-tools 2.25.2, rust-nostr 0.45.5 and go-nostr 0.52.3, and every library decrypted every other one's output. All pairs succeed, apart from rust-nostr's deliberate LOG_N > 18 cap. Cases: key-security bytes 0/1/2, NFKC (typed vs normalized form), emoji, significant spaces, empty password, a key with all bytes >= 0x80, LOG_N 8/16/18/20, and uppercase ncryptsec input. Nip49InteropTest pins 27 of the foreign ciphertexts (nine cases per library, LOG_N <= 16 to keep it fast). They must keep decrypting to the original key with matching version, LOG_N and key-security header bytes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012hhtLQhig6Wmt5U4C3owaP