  We develop the concept of Trusted and Confidential Program Analysis (TCPA)
which enables program certification to be used where previously there was
insufficient trust. Imagine a scenario where a producer may not be trusted to
certify its own software (perhaps by a foreign regulator), and the producer is
unwilling to release its sources and detailed design to any external body. We
present a protocol that can, using trusted computing based on encrypted
sources, create certification via which all can trust the delivered object code
without revealing the unencrypted sources to any party. Furthermore, we
describe a realization of TCPA with trusted execution environments (TEE) that
enables general and efficient computation. We have implemented the TCPA
protocol in a system called TCWasm for web assembly architectures. In our
evaluation with 33 benchmark cases, TCWasm managed to finish the analysis with
relatively slight overheads.
