Encrypting a Local Model File

  1. Log in to the running environment of the encryption/decryption tool as user hwMindX.
  2. Run the following command to create an encryption/decryption working directory, for example, /home/hwMindX/software/infer:
    mkdir -p /home/hwMindX/software/infer
  3. Run the following command to switch to the working directory:
    cd /home/hwMindX/software/infer
    cp -r ${ResNet-50 model file path}/infer/sdk ./
    chmod 500 -R infer
  4. Use the encryption/decryption tool to encrypt the model file.
    1. Upload the model file to the directory.
    2. Upload the MK.json file to the /home/hwMindX/software directory and run the following command:
      cd /home/hwMindX/software
      chmod 600 MK.json
    3. Perform encryption.
      mkdir enc 
      chmod 700 enc
      aiguard encrypt -i infer -o enc -f MK.json 
      chmod 700 -R enc/encrypt

      When you run the encryption command, you will be prompted to enter the password for exporting the master key. After you enter the password, an encrypted file is generated and stored in the specified directory /home/hwMindX/software/enc/encrypt/.

      MK.json is the file exported in Creating and Exporting a Master Key.