without a sig inside the wrap, you can’t prove you actually wrote the data. Anyone could spam fake “private” notes under your p-tag and you’d have no way to tell what’s real
Discussion
yeah i’m switching to removing the p tag and just using K=sha256(nsec + “nipXX”) as the wrap key
I have a draft nip written up, will publish soon
Why not HMAC?
why not hkdf ?
as I write it up I'm leaning toward this (pns = private note storage):
// device_key is users nsec or device nsec
pns_key = hkdf(device_key, "nipXX")
pns_nip44_key = hkdf(pns_key, "nip44-v2")
ctext = nip44_encrypt(pns_nip44_key, nonce, note_json)