|
1 |
| -.. {#openvino_docs_security_guide_introduction} |
2 |
| -
|
3 | 1 | OpenVINO Security
|
4 |
| -================= |
| 2 | +=================================================== |
5 | 3 |
|
| 4 | +Deploying deep learning models for OpenVINO may raise security and privacy issues. |
| 5 | +Trained models are often valuable intellectual property and you may choose to protect them |
| 6 | +with encryption or other security tools. |
6 | 7 |
|
7 |
| -.. toctree:: |
8 |
| - :maxdepth: 1 |
9 |
| - :hidden: |
| 8 | +Actual security and privacy requirements depend on your unique deployment scenario. |
| 9 | +This section provides general guidance on using OpenVINO tools and libraries securely. |
| 10 | +The main security measure for OpenVINO is its |
| 11 | +:doc:`Security Add-on <openvino-ecosystem/openvino-security-add-on>`. You can find its description |
| 12 | +in the Ecosystem section. |
10 | 13 |
|
11 |
| - openvino-security/openvino-encrypted-models |
| 14 | +.. _encrypted-models: |
12 | 15 |
|
| 16 | +Using Encrypted Models with OpenVINO |
| 17 | +############################################## |
13 | 18 |
|
14 |
| -Deploying deep learning models for OpenVINO may raise security and privacy issues. |
15 |
| -Trained models are often valuable intellectual property and you may choose to protect them with encryption or other security tools. |
| 19 | +Deploying deep-learning capabilities to edge devices can present security challenges like ensuring |
| 20 | +inference integrity, or providing copyright protection of your deep-learning models. |
16 | 21 |
|
17 |
| -Actual security and privacy requirements depend on your unique deployment scenario. |
18 |
| -This section provides general guidance on using OpenVINO tools and libraries securely. |
19 |
| -The main security measure for OpenVINO is its :doc:`Security Add-on <openvino-ecosystem/openvino-security-add-on>`. You can find its description in the Ecosystem section. |
| 22 | +One possible solution is to use cryptography to protect models as they are deployed and stored |
| 23 | +on edge devices. Model encryption, decryption and authentication are not provided by OpenVINO |
| 24 | +but can be implemented with third-party tools (i.e., OpenSSL). While implementing encryption, |
| 25 | +ensure that the latest versions of tools are used and follow cryptography best practices. |
| 26 | + |
| 27 | +This guide presents how to use OpenVINO securely with protected models. |
| 28 | + |
| 29 | +Secure Model Deployment |
| 30 | ++++++++++++++++++++++++++++++++++++ |
| 31 | + |
| 32 | +After a model is optimized by model conversion API, it's deployed to target devices in the |
| 33 | +OpenVINO Intermediate Representation (OpenVINO IR) format. An optimized model is stored on edge |
| 34 | +device and is executed by the OpenVINO Runtime. TensorFlow, TensorFlow Lite, ONNX and PaddlePaddle |
| 35 | +models can be read natively by OpenVINO Runtime as well. |
| 36 | + |
| 37 | +Encrypting and optimizing model before deploying it to the edge device can be used to protect |
| 38 | +deep-learning models. The edge device should keep the stored model protected all the time |
| 39 | +and have the model decrypted **in runtime only** for use by the OpenVINO Runtime. |
| 40 | + |
| 41 | +.. image:: ../assets/images/deploy_encrypted_model.svg |
| 42 | + |
| 43 | +Loading Encrypted Models |
| 44 | ++++++++++++++++++++++++++++++++++++ |
| 45 | + |
| 46 | +The OpenVINO Runtime requires model decryption before loading. Allocate a temporary memory block |
| 47 | +for model decryption and use the ``ov::Core::read_model`` method to load the model from a memory |
| 48 | +buffer. For more information, see the ``ov::Core`` Class Reference Documentation. |
| 49 | + |
| 50 | +.. doxygensnippet:: docs/articles_en/assets/snippets/protecting_model_guide.cpp |
| 51 | + :language: cpp |
| 52 | + :fragment: part0 |
| 53 | + |
| 54 | +Hardware-based protection such as Intel Software Guard Extensions (Intel SGX) can be used to protect |
| 55 | +decryption operation secrets and bind them to a device. For more information, see |
| 56 | +the `Intel Software Guard Extensions <https://software.intel.com/en-us/sgx>`__. |
| 57 | + |
| 58 | +Use the ``ov::Core::read_model`` to set model representations and weights respectively. |
| 59 | + |
| 60 | +Currently there is no way to read external weights from memory for ONNX models. |
| 61 | +The ``ov::Core::read_model(const std::string& model, const Tensor& weights)`` method |
| 62 | +should be called with ``weights`` passed as an empty ``ov::Tensor``. |
| 63 | + |
| 64 | +.. doxygensnippet:: docs/articles_en/assets/snippets/protecting_model_guide.cpp |
| 65 | + :language: cpp |
| 66 | + :fragment: part1 |
20 | 67 |
|
| 68 | +Additional Resources |
| 69 | +#################### |
21 | 70 |
|
| 71 | +- Intel® Distribution of OpenVINO™ toolkit `home page <https://software.intel.com/en-us/openvino-toolkit>`__. |
| 72 | +- :doc:`Convert a Model <legacy-features/transition-legacy-conversion-api/legacy-conversion-api>`. |
| 73 | +- :doc:`OpenVINO™ Runtime User Guide <../openvino-workflow/running-inference>`. |
| 74 | +- For more information on Sample Applications, see the :doc:`OpenVINO Samples Overview <../learn-openvino/openvino-samples>` |
| 75 | +- For information on a set of pre-trained models, see the :doc:`Overview of OpenVINO™ Toolkit Pre-Trained Models <../omz_models_group_intel>`. |
| 76 | +- For IoT Libraries and Code Samples, see the `Intel® IoT Developer Kit <https://github.com/intel-iot-devkit>`__. |
0 commit comments