Understanding Library Encryption

The library encryption algorithm is based on that of a five-rotor Enigma machine. The encryption process allows the user to specify which portions of subcircuits are encrypted. The libraries are encrypted using a key value that Star-Hspice reconstructs for decryption.

Controlling the Encryption Process

To control the beginning and end of the encryption process, insert .PROTECT and .UNPROTECT statements around text to be encrypted in an Star-Hspice subcircuit. The encryption process produces an ASCII text file in which all text that follows .PROTECT and precedes .UNPROTECT is encrypted.


NOTE: The Star-Hspice .PROTECT and .UNPROTECT statements often are abbreviated to .PROT and .UNPROT, respectively. Either form may be used in Star-Hspice input files.

Library Structure

The requirements for encrypted libraries of subcircuits are the same as the requirements for regular subcircuit libraries. Subcircuit library structure requirements are described in Subcircuit Library Structure. Refer to an encrypted subcircuit by using its subcircuit name in a subcircuit element line of the Star-Hspice netlist.

The following example provides the description of an encrypted I/O buffer library subcircuit. This subcircuit is constructed of several subcircuits and model statements that you need to protect with encryption. Encrypted Library Structure shows the organization of subcircuits and models in libraries used in this example.

 

Figure E-1: Encrypted Library Structure

The following input file fragment from the main circuit level selects the Fast library and creates two instances of the iobuf circuit.

...
.Option Search='<LibraryDir>/Fast'								$ Corner Spec
x1 drvin drvout iobuf			 Cload=2pF					$ Driver
u1 drvout 0 recvin 0 PCBModel	...							$ Trace
x2 recvin recvout iobuf								$ Receiver
...

The file <LibraryDir>/Fast/iobuf.inc contains:

.Subckt iobuf Pin1 Pin2 Cload=1pF
*
* iobuf.inc - model 2001 improved iobuf
*
.PROTECT
cPin1 Pin1 0 1pF					$ Users can't change this!
x1 Pin1 Pin2 ioinv					$ Italics here means encrypted
.Model pMod pmos Level=28 Vto=...							$ <FastModels>
.Model nMod nmos Level=28 Vto=...							$ <FastModels>
.UNPROTECT
cPin2 Pin2 0 Cload					$ give you some control
.Ends

The file <LibraryDir>/Fast/ioinv.inc contains:

.Subckt ioinv Pin1 Pin2
.PROTECT
mp1 Vcc Pin1 Pin2 Vcc pMod				...			$ Italics=Protected
mn1 Pin2 	Pin1 Gnd Gnd nMod
...						$ Italics=Protected
.UNPROTECT
.Ends

After encryption, the basic layout of the subcircuits is the same. However, the text between .PROTECT and .UNPROTECT statements is unreadable, except by Star-Hspice.

The protection statements also suppress printouts of encrypted model information from Star-Hspice. Only Star-Hspice knows how to decrypt the model.

Star-Hspice Manual - Release 2001.2 - June 2001