Model Protection
When you want to share a model with a third party without revealing its contents, protect the model. The model protection process compiles the model and packages the derived artifacts in a protected model file. For a protected model, you can:
Select optional functionalities for the model, such as simulation, code generation, and viewing a read-only view of the model.
Optionally password-protect the supported functionalities.
Optionally allow the recipient to tune parameters for simulation of the protected model.
Specify what type of generated code to include in the model, such as obfuscated code or compiled code.
Create a project that contains a harness model, the protected model, and the files required to use the protected model.
Digitally sign the protected model. The recipient can verify that the model was created by you and was not changed after you signed it.
Enable the third party to simulate the protected model in a later Simulink® release version depending on the functionalities that the model supports. See Reference Protected Models from Third Parties.
Objects
Simulink.ModelReference.ProtectedModel.HookInfo | Files and exported symbols generated by creation of protected model |
Simulink.ProtectedModel.Callback | Callback code that executes in response to protected model events |
Simulink.ProtectedModel.CallbackInfo | Protected model information for use in callbacks |
Functions
Simulink.ModelReference.protect | Obscure referenced model contents to hide intellectual property |
Simulink.ModelReference.modifyProtectedModel | Modify existing protected model |
Simulink.ModelReference.ProtectedModel.setPasswordForCertificate | Provide password for digital certificate |
Simulink.ModelReference.ProtectedModel.setPasswordForCodeGeneration | Add or provide encryption password for code generation from protected model |
Simulink.ModelReference.ProtectedModel.setPasswordForModify | Add or provide password for modifying protected model |
Simulink.ModelReference.ProtectedModel.setPasswordForSimulation | Add or provide encryption password for simulation of protected model |
Simulink.ModelReference.ProtectedModel.setPasswordForView | Add or provide encryption password for read-only view of protected model |
Simulink.ModelReference.ProtectedModel.clearPasswords | Clear cached passwords for protected models |
Simulink.ModelReference.ProtectedModel.clearPasswordsForModel | Clear cached passwords for a protected model |
Simulink.ProtectedModel.addTarget | Add code generation support for current target to protected model |
Simulink.ProtectedModel.getCallbackInfo | Get Simulink.ProtectedModel.CallbackInfo object
for use by callbacks |
Simulink.ProtectedModel.getConfigSet | Get configuration set for current protected model target or for specified target |
Simulink.ProtectedModel.getCurrentTarget | Get current protected model target |
Simulink.ProtectedModel.getSupportedTargets | Get list of targets that protected model supports |
Simulink.ProtectedModel.open | Open protected model |
Simulink.ProtectedModel.removeTarget | Remove support for specified target from protected model |
Simulink.ProtectedModel.setCurrentTarget | Configure protected model to use specified target |
Simulink.ProtectedModel.sign | Attach digital signature to protected model |
Topics
- Sign a Protected Model
Attach a digital signature to your protected model.
- Package and Share Protected Models
Files to include in the protected model package.
- Specify Custom Obfuscators for Protected Models
Specify a post-processing function for files that the protected model creation process generates.
- Create Protected Models with Multiple Targets
Create a protected model that supports multiple code generation targets.
- Define Callbacks for Protected Models
Customize protected model behavior by defining callbacks.
- Best Practices for Creating Protected Models
Choose modeling patterns and protection options to allow the functionalities that you want your protected model to support.
- Test Protected Models
Test your protected model by comparing it to the original model.
- Protect Models to Conceal Contents
Protect a model when you want to share a model with a third party without revealing intellectual property.