LTspice-Encrypting SPICE model

This article details how to encrypt LTspice's SPICE model.

Especially when distributing the SPICE model created by you to others, I think that it can be used when you do not want to disclose the contents of the netlist.

TOC

Encrypting SPICE Models Using the Command Prompt

SPICE model encryption is performed with the LTspice command using the Windows command prompt.

Originally, I think that there are many cases to encrypt the SPICE model made by myself.

In this article, I will try to encrypt the sub-circuit model of Analog Devices' op amp "AD8610" used in the following article as a practice.

1
LTspice XVII Command Prompt

Start the command prompt from "Windows System Tools" of the start menu.

2
LTspice XVII Change Directory

Change to the directory where LTspice XVII is installed at the command prompt.

Enter "cd C:\Program Files\LTC\LTspiceXVII" and press "Enter" to execute.

cd C:\Program Files\LTC\LTspiceXVII
3
LTspice XVII Copy SPICE model

Because it is used for the command which encrypts the SPICE model, copy the path of the file of the SPICE model that you want to encrypt.

4
LTspice XVII Encrypt SPICE model

Execute the command "XVIIx64.exe -encrypt file path" to encrypt the SPICE model.

In this case, enter 「XVIIx64.exe -encrypt "C:\Users\USER\Documents\LTspiceXVII\lib\sub\Analog_Devices\ad8610.cir"」 and press "Enter".

XVIIx64.exe -encrypt "file path"
XVIIx64.exe -encrypt "C:\Users\USER\Documents\LTspiceXVII\lib\sub\Analog_Devices\ad8610.cir"

If you execute the command to encrypt the SPICE model, the original file will be overwritten.

Make sure to back up before performing encryption, as the information in the original file will disappear completely.

5
LTspice XVII Encrypting

The above screen appears and encryption starts. Depending on the size of the SPICE model and the environment of the PC used, the encryption time will take about 2 to 5 minutes.

6
LTspice XVII Encryption Completed

When encryption is completed, the above screen appears. Click "OK" to complete all the work.

7
LTspice XVII Hexadecimal List

When you open the encrypted SPICE model file, you can see that it has been changed to a hexadecimal list.

Check in simulation

Just in case, let's use the circuit created in the following article to see if the encrypted SPICE model can be simulated correctly.

1
LTspice XVII Open 01_sample-tran-lt1028.asc

Open "01_sample-tran-lt1028.asc".

2
LTspice XVII Place AD8610

Delete the "LT1028" and place the encrypted SPICE model "AD8610".

3
LTspice XVII Simulation

Click “Run” on the toolbar to run the simulation. The simulation time varies depending on the size of the circuit.

4
LTspice XVII Voltage Probe

After simulation, as you move the cursor close to the schematic wiring, the cursor changes to "voltage probe".

Click "Vin" and "OUTPUT" with the voltage probe.

5
LTspice XVII Voltage Waveforms

The voltage waveforms of "Vin" and "OUTPUT" appear on the waveform display screen. You can see that the output signal is inverted and amplified at twice the input signal.

This confirms that the encrypted SPICE model can be simulated correctly.

Notes on encryption

Notes on encryption
  • The original data is overwritten when it is encrypted
  • Automatic creation of schematic symbols in the sub-circuit model is not possible
  • Can not append to data file with device model

The original data is overwritten when it is encrypted

As described in "Encrypting SPICE Models Using the Command Prompt", when you execute a command to encrypt SPICE models, the original file is overwritten.

Make sure to back up before performing encryption, as the information in the original file will disappear completely.

Automatic creation of schematic symbols in the sub-circuit model is not possible

In the subcircuit model, it was possible to create a schematic symbol automatically.

However, after encryption, you will not be able to create schematic symbols automatically, and you will also lose pin information.

Therefore, if you distribute the encrypted SPICE model to others, I think that it is better to make a schematic symbol before encryption and let it pass together.

Can not append to data file with device model

In the following article, we explained how to add the device model to the LTspice data file.

However, of course, if you encrypt the SPICE model, all parameters will be encrypted and you will not be able to append to the data file.

Therefore, by saving the file of the device model in the sub folder, it will have to be added to LTspice.

Let's share this post !
TOC