Blockchain-based smart legal contract, as a legally binding executable contract, has attracted extensive attentions in trade finance. However, since the contract is deployed on open and transparent blockchain network, all transaction data are publicly visible, which brings to privacy disclosure problem. Aiming at this problem, we introduce an improved architecture of smart legal contract with privacy protection, involving contract development, deployment, and execution. In this architecture, the sensitive data of transaction are declared and protected in the form of contract terms. These terms allow the compiler to link predefined cryptographic algorithms into smart contract programs, and then to generate executable contract code. Furthermore, as predefined cryptographic algorithms, we construct a new dual-mode identity-based broadcast encryption (DM-IBBE) scheme to meet specific-purpose or generic-purpose privacy by using selective encryption mode or exclusive encryption mode, respectively. We proved that our DM-IBBE scheme is semantically secure under the decisional Diffie–Hellman assumption. In addition, our experimental results show that the proposed scheme can satisfy the privacy requirements of transaction, and it is practicable and easy-to-develop for introducing privacy preserving mechanisms into smart legal contract languages.