Given the increasing availability of many devices in our daily environments, distributed user interfaces are becoming more and more used. However, they raise many issues related to security, which current frameworks for distributed user interfaces have yet to address adequately. We present a solution for this purpose, able to exploit public key certificates for authentication and encryption as well. The presented solution consists of a reference software architecture for secure distributed user interfaces and a corresponding implementation. We also report on an example application for a city guide supporting collaborative cross-device user interfaces.