No, Mattermost does not encrypt posts in the database and there’s also no configuration option to do so at the moment. There are 3rd party plugins out there that support post encryption, but they do limit the available features of Mattermost then so there’s nothing I can recommend.