The fusion reactors will be based on the Deuterium-Tritium reaction. Therefore, the tritium inventory will be rather high. It may be interesting to optimize the protection of these facilities. To this effect, an expert code (EXTRITO) has been prepared for optimizing the tritium transfers for the plant. The optimization is based on criteria such as the dose to the workers and the general public, and on a code optimizing the protection options (ventilation, containment barriers, process) surrounding the tritium circuit and economics. The ultimate criterion for choice is economics. This paper presents the EXTRITO code exclusively. The quantitative applications and extension to other radioactive products will be performed later for situations such as routine operations accidents and maintenance.