Ugh, the comments here...
I think these are some good ideas, but e2ee in a browser that depends on server supplied javascript will never be really safe.
I think you would be better off making a nice XMPP integration so that people can use existing native apps with good e2ee for their private messages.
Otherwise the ideas are sensible and worth a shot, looking forward to what you come up with in Piefed π