Oddbean new post about | logout
 Is there a way to distinguish, just by looking at the encrypted strings, between NIP-04 encryption and NIP-44 encryption?

@hodlbod you mentioned that you had developed a way to detect the encryption type in DMs and switch between them according to what the other party is using.  Do you have more details on that?

#asknostr #dev 
 Yeah, NIP04 payloads include `?iv=` near the end. But the bigger difference is NIP 59 uses kind 1059 and NIP 04 uses kind 4 
 But the encrypted content of a custom list can't be distinguished that way. 
 No? Isn't nip44 base64 encoded? `?` and `=` aren't valid b64 characters, so I think the check still works. 
 Yes *that* check works. Checking the kind doesn't work. 
 Oh, yeah, sure