Main Content

Model Protection

Create a protected model for simulation and code generation to share with a third-party

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

expand all

Simulink.ModelReference.ProtectedModel.HookInfoFiles and exported symbols generated by creation of protected model
Simulink.ProtectedModel.CallbackCallback code that executes in response to protected model events
Simulink.ProtectedModel.CallbackInfoProtected model information for use in callbacks

Functions

expand all

Simulink.ModelReference.protectObscure referenced model contents to hide intellectual property
slxpinfoHigh-level information about protected model (Since R2024b)
Simulink.ProtectedModel.getCallbackInfoGet Simulink.ProtectedModel.CallbackInfo object for use by callbacks
Simulink.ProtectedModel.getConfigSetGet configuration set for current protected model target or for specified target
Simulink.ProtectedModel.getCurrentTargetGet current protected model target
Simulink.ProtectedModel.getSupportedTargetsGet list of targets that protected model supports
Simulink.ProtectedModel.openOpen protected model
Simulink.ModelReference.modifyProtectedModelModify existing protected model
Simulink.ModelReference.ProtectedModel.setPasswordForCertificateProvide password for digital certificate (Since R2020a)
Simulink.ModelReference.ProtectedModel.setPasswordForCodeGenerationAdd or provide encryption password for code generation from protected model
Simulink.ModelReference.ProtectedModel.setPasswordForModifyAdd or provide password for modifying protected model
Simulink.ModelReference.ProtectedModel.setPasswordForSimulationAdd or provide encryption password for simulation of protected model
Simulink.ModelReference.ProtectedModel.setPasswordForViewAdd or provide encryption password for read-only view of protected model
Simulink.ModelReference.ProtectedModel.clearPasswordsClear cached passwords for protected models
Simulink.ModelReference.ProtectedModel.clearPasswordsForModelClear cached passwords for a protected model
Simulink.ProtectedModel.addTargetAdd code generation support for current target to protected model
Simulink.ProtectedModel.removeTargetRemove support for specified target from protected model
Simulink.ProtectedModel.setCurrentTargetConfigure protected model to use specified target
Simulink.ProtectedModel.signAttach digital signature to protected model (Since R2020a)

Tools

Protected Model CreatorSpecify model protection options and protect model

Topics

Featured Examples