I run a Synapse server (http://matrix.org/) which is federated and works very well. There are many clients but the nicest at the moment is Riot. Full encryption is now available in the Riot webclient and it's coming to the app soon.
I'm just a Matrix (and Signal) user, I haven't yet had a look into its encryption implementation yet, but for those who are interested, I think these are the docs: