What file in /opt/nvidia/deepstream/deepstream do you suggest? Is there any examples that you recommend? What documentation would be good to reference while putting the question “how to add encryption and decryption” to a deepstream application?
This is an excellent question from RayZhang and I am very interested to hear from the Nvidia moderators about the specific resources, examples, and development path that a developer should take to implement this question in a deepstream application.
Hi @superelectron,
I mean, you could modify function - deserializeEngine() below, this function is to read the TRT engine file and deserialize it to create TRT nvinfer1::ICudaEngine.
You can firstly encrypt the TRT engine, e.g. just adding watermark in the TRT engine, and in this function, you read the TRT engine file and decrypt it, then deserialize it to create TRT nvinfer1::ICudaEngine.
File : /opt/nvidia/deepstream/deepstream/sources/libs/nvdsinfer/nvdsinfer_model_builder.cpp
/* Deserialize engine from file */
std::unique_ptr<TrtEngine>
TrtModelBuilder::deserializeEngine(const std::string& path, int dla)
{
....
}