PML Publisher User Guide 1.0

October 30, 2018 | Author: Moldoveanu Nicu | Category: Source Code, Encryption, Computer File, Directory (Computing), Copyright
Share Embed Donate


Short Description

pml...

Description

PML Publisher User Guide

 AVEVA Sol ut io n s L td

Disclaimer  Information of a technical nature, and particulars of the product and its use, is given by AVEVA Solutions Ltd and its subsidiaries without warranty. AVEVA Solutions Ltd and its subsidiaries disclaim any and all warranties and conditions, expressed or implied, to the fullest extent permitted by law. Neither the author nor AVEVA Solutions Ltd, or any of its subsidiaries, shall be liable to any person or  entity for any actions, claims, loss or damage arising from the use or possession of any information, particulars, or errors in this publication, or any incorrect use of the product, whatsoever.

Copyright Copyright and all other intellectual property rights in this manual and the associated software, and every part of it (including source code, object code, any data contained in it, the manual and any other  documentation supplied with it) belongs to AVEVA AVEVA Solutions Ltd or its subsidiaries.  All other rights are reserved to AVEV VEVA A Solutions Ltd and its subsidiaries. The information contained in this document is commercially sensitive, and shall not be copied, reproduced, stored in a retrieval system, or transmitted without the prior written permission of AVEVA Solutions Ltd. Where such permission is granted, it expressly requires that this Disclaimer and Copyright notice is prominently displayed at the beginning of every copy that is made. The manual and associated documentation may not be adapted, reproduced, or copied, in any material or electronic form, without the prior written permission of AVEVA Solutions Ltd. The user may also not reverse engineer, decompile, copy, or adapt the associated software. Neither the whole, nor part of the product described in this publication may be incorporated into any third-party software, product, machine, or system without the prior written permission of AVEVA Solutions Ltd, save as permitted by law. Any such unauthorised action is strictly prohibited, and may give rise to civil liabilities and criminal prosecution. The AVEVA products described in this guide are to be installed and operated strictly in accordance with the terms and conditions of the respective license agreements, and in accordance with the relevant User Documentation. Unauthorised or unlicensed use of the product is strictly prohibited. First published July 2006 © AVEVA AVEVA Solutions Ltd, and its subsidiaries  AVEV  AVEVA A Solutions Ltd, High Cross, Madingley Road, Cambridge, CB3 0HB, United Kingdom

Trademarks  AVEV  AVEVA A and Tribon are registered trademarks of AVEVA AVEVA Solutions Ltd or its subsidiaries. Unauthorised use of the AVEV VEVA A or Tribon trademarks is strictly forbidden.  AVEV  AVEVA A product names are trademarks or registered trademarks of AVEV VEVA A Solutions Ltd or its subsidiaries, registered in the UK, Europe and other countries (worldwide). The copyright, trade mark rights, or other intellectual property rights in any other product, its name or  logo belongs to its respective owner.

 PML  PML Publi sher User Guide

 PML  PML Publi ub lish she er User Guide

Co n t en t s

Pag e

PML PML Publisher  Publis her  Introd Intr oduc ucti tion on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:1 Seriou s Warnin gs A bou t Encr ypti yp tion on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:1

Using the PML Encry ption pti on Utility Utili ty Program Progr am.. . . . . . . . . . . . . . . . . . . . 2:1 Possibl Poss ibl e Workf low lo w . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:1 Licen Li censi sing ng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:1 Help Help

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:1 2:1

Choos Cho osin ing g Files Fi les . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:2 Single Single File File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:2  All Files in a Folder. Folder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:2 Files in a pmllib-like pmllib-like Folder Folder Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:3 File/Folder Paths Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:3

Encrypt Encr ypt ion io n Alg A lgori ori thms th ms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:3 Encryption Type 4: 4: RC4 Encryption Encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:3 Encryption Type 3: 3: Obsolete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:4 Encryption Type 2: 2: Basic Encryption Encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:4 Encryption Type 1: 1: Trivial Encryption. Encryption. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:4 Encryption Type 0: 0: No Encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:5

Buf feri ng . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:5 2:5 Editing Published Published PML Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:5

Examp les . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:6 Single Single File File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:6 Folder of Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:6

i

12.0

 PML  PML Publi sher User Guide

Simple PMLLIB PMLLIB Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:6 Restrict who can can use an Encrypted Encrypted File. File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:6 Full Worked Example: Example: Encrypting Encrypting PMLLIB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:7

Usin g Encr En cryp ypted ted Files. Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3:1 Err or Messages Messag es . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3:1

ii

12.0

 PML  PML Publi sher User Guide Introduction

1

In t r o d u c t i o n PML is the AVEV VEVA A Programmable Macro Language. You can find details of the language in the Software Customisation Guide  and the Software Customisation Reference Manual . PML functions, objects forms and macros may be encr ypted using the tools described in this guide, and once encrypted may be used within the software, but may not easily be read. Encrypted PML files may be used in any compatible AVEVA program without an additional license (see Using Encrypted Files ). The encryption utility described in Using the PML Encryption Utility Program  is separately distributed and licensed. Please note that the encryption used is of limited strength, and is not secure against all possible attacks - for details of the encryptions used, see Encryption Algorithms. If you have existing encrypted files encrypted with the old encryption type 3 (as used in "Early Adopter" releases of 11.5.SP2 and 11.6.SP4 in 2007), you must re-encrypt the original source to the new encryption type 4 if you wish to use them with 12-series releases, 11.6 Series SP4.9 and above or 11.5 series SP2.11 SP2.11 and above.

1.1

Seriou rious s Wa Warnin rnings gs Abou Aboutt Enc Encry rypt ptio ion n •

AVEV VEVA A may, may, from time to to time, and at its its sole discret discretion, ion, change change certain certain PML PML encryption algorithms. Customers must therefore acknowledge that existing encrypted PML applications may not work with the new encryption algorithms. On receipt of the new encryption algorithms Customers will need to re-encrypt the source code of the PML applications and therefore the customer must keep a record of the full and current PML source code.



Please note that that AVEV AVEVA A makes makes no guarante guarantees es or warranti warranties es as to the security security of of the encryption warranties and the customers use such encryption algorithms at their sole risk.



The encryptio encryption n used by PML publisher publisher is shared by all users. If you encryp encryptt a file for  use in your company, it can be run by all users of a compatible version of the software, whether or not they are part of your company. (See Examples for some example code to help address this issue).



If you wish the use the same same encrypted encrypted file file with with different different program versions versions you must check each version for compatibility.



Once Once a PML file file has been been encry encrypte pted, d, it can no no longer longer be read read or edite edited. d. When When you publish a file make sure that you retain a safe copy of the original file, in case you want to make further modifications to it later, or in case a new encryption algorithm is required.



The The PM PML Pub Publi lish sher er does does no t  include a decryptor for encrypted files.

1:1

12.0

 PML  PML Publi sher User Guide Introduction

1:2

12.0

 PML  PML Publi sher User Guide Using the PML Encryption Utility Program

2

Us i n g t h e PML En c r y p t i o n Ut i l i t y Pr o g r am

2.1

Po s s i b l e Wo r k f l o w pmlencrypt.exe , the encryption utility program supplied with this release, is a commandline program designed to be included in your PML software development process. One possible workflow would be: •

Make Make sure sure that that you have have a curre current nt backu backup p of the the sourc source e PML PML No tool is supplied to decrypt an encrypted file, so it is very important that you keep good backups, in case you overwrite the source PML with an encrypted version.



Copy Copy the the sour source ce fol folde ders rs to to a new new loca locati tion on Not all files within a PML folder hierarchy are always PML. Images, for example, should not be encrypted, but may need to be supplied with the encrypted versions of the PML.



Encrypt Encrypt from the copied copied locatio location n back to the source location. location. This This will will overwrit overwrite e recognised PML files with encrypted versions, and leave other files untouched.



Compare Compare the source and copy copy locations locations to make make sure sure that all the the files files you wish to to be encrypted are encrypted.



Test est your your new new enc encry rypt pted ed PML. PML.

Consider writing a batch file, a perl script, or a PML script to automate this procedure for  your particular environment, to make it easy to create the encrypted PML environment correctly each time the source PML is updated.

2.2

L i c en s i n g The pmlencrypt.exe   utility program requires a PML Publisher license in your license file LP UBLI SHER SHER). If this is not present then the program will not (the feature name is VPD- PMLPU run.

2.3

Hel p If pmlencrypt.exe   is run without arguments, or with an invalid set of arguments, then a summary similar to this is output. The options are explained further in the following sections.

AVEVA EVA PM PML Publ i sher Mk1. 0. SP1 SP1 ( Feb 24 24 2009 2009)) ( c) Cop Copyr yr i ght

2006 t o 2009 AVEVA Sol ut i ons ons Li mi t ed

pml enc r yp ypt [ - r c4 c 4| - bas i c | - t r i vi al | - none] [ - buf f er N] [ f ol der | - pml l i b] f r om o m_ pa pat h t o_ pa pat h

2:1

12.0

 PML  PML Publi sher User Guide Using the PML Encryption Utility Program

-rc4

uses 40-bit RC4 encryption from the Microsoft Base Cryptographic Provider (default)

- bas i c

uses a simple low-security encryption algorithm

- t r i vi al

uses a human-decipherable encryption scheme - for testing only

- none one

no encryption, but can be used with - b u f f e r N

- buf f er N

causes the file to be retained in memory until a module switch once it has been read N times (the default is never )

- f ol der

_pat h to is used to encrypt ALL files from the folder f r om_pat t o_pa _pat h

2.4

- pml l i b

is used to encrypt ALL . pml obj . pml f nc . pml f r m and . pml mac  files from the folders in a PMLLI B- t ype ype folder structure beneath f r om_pat h to t o_pa _pat h

f r om_pat h

is the file or folder to be encrypted

t o_pa _pat h

is the output file or folder 

Ch o o s i n g Fi l es PML files are not required to have particular file extensions. PML2 Functions, Objects, Forms and Macros are normally stored in files with the extensions .pmlfnc, .pmlobj , .pmlfrm  and .pmlmac  respectively, but other PML files, such as those in the pdmsui  folder  of an installation have no extension at all, and a PML file with any extension may be read with a $m  command. You must therefore be careful, when choosing files to encrypt, that you only encrypt PML files. Other files, such as icon images and con figuration files cannot be used by the software when encrypted.

2.4.1

Si n g l e Fi l e If neither of the -folder  or  or -pmllib options are used the from_path  and to_path arguments are taken to be single file-names or paths (which must not include embedded spaces). The to_path  file is created or overwritten, as appropriate. This option may be used whenever you have a single file to encrypt, and can also be useful within a script, where the file selection is handled by the script itself. No assumptions are made about file extensions. To encrypt a single file with one or more spaces in its name, move it into a folder without spaces in its name, and then encrypt t he contents of that folder with the-folder  option.  option.

2.4.2

A l l Fi Fi l es in in a Fo l d er   If the -folder option is used the from_path  and to_path arguments are taken to be names or paths of folders (which must not include embedded spaces, although files within the

2:2

12.0

 PML  PML Publi sher User Guide Using the PML Encryption Utility Program

folders may). All files in the from_path   folder are encrypted into the to_path  folder. The to_path  folder is created, if required, and the files inside it are overwritten. No file extension is required, so this option is suitable for folders in the %PDMSUI% hierarchy, but you must be careful not to encrypt non-PML files.

2.4.3

File iles in a pmll pmllib ib--like like Folde olderr Tre Tree e If the -pmllib  option is used the from_path  and to_path arguments are taken to be names or paths of folders (which must not include embedded spaces, although files and sub-folders within them may). All folders beneath the from_path   folder are scanned, and files with extensions .pmlfnc , .pmlobj, .pmlfrm or .pmlmac   are encrypted to a matching structure constructed or overwritten beneath the to_path folder.  As this option is file-extension sensitive, it will not encrypt image or other unrelated files in the hierarchy - but it will not copy them for you either.

2.4.4

Fi l e/Fo l de der Pa P at hs hs Be careful when you give the from_path  and to_path arguments that they are in that order  -otherwise you may overwrite the wrong file. The from_path   and to_path   arguments cannot be identical - this is to reduce the risk of  accidental overwriting of the source-files. Embedded spaces are not supported in the paths, but are allowed in files and sub-folders within from_path  and to_path folders.

2.5

En c r y p t i o n A l g o r i t h m s

2.5.1

Encry ncrypt ptio ion n Typ Type e 4: RC RC4 Encry ncrypt ptio ion n Encryption Type 4 (RC4 Encryption) is the recommended and default option. It can also be selected by the -rc4 option. - - 004>- - Publ Publ i shed PML 1. 1. 0. SP1 SP1 >- r et ur n er r or 99 ' Unabl e to de decrypt crypt f i l e i n t hi s sof sof t war e ve ver si on' $** d2b5c25a4eb20d0a540684e50a956e08 $** bs6mg5Rr g5Rr McwxEsJ cwxEsJ cs WkPvI 8wl 0Uz 0Uz ZbR ZbRe6k7aSK6M e6k7aSK6Msf Nn0Z1bI n0Z1bI 2+Qei 7spar o $** 07G 07Gr PZR PZRJ qvJ vpyi vpyi gRzD gRzDO OR9Or bi aMj 2O1nPl 1nPl l KJ r Lksf NKSM KSMovO299i 299i don3 don3zg zg $** $* * SmwFahG- m1M4xgO4Kf 4xgO4Kf Z15t Df - k0n6wk45I k0n6wk45I s F9L Mc X0l Vc9hLEW Vc9hL EW+W64t h

It is implemented using the Microsoft Base Cryptographic Provider, which is included in, among other operating systems, Windows 2000 and Windows XP. It is also included with Microsoft® Internet Explorer version 3.0 or later. 40-bit keys are used, to operate within limits imposed at one stage on exports of encryption technology. It is therefore expected that all compatible computers will include the libraries required for  this algorithm. Please note that even this encryption is of limited strength, and is not secure against all possible attacks. If you have existing encrypted files encrypted with encryption type 3, you must re-encrypt the original source to encryption type 4 if you wish to use them with version 12.0, or with the forthcoming updated 11.5.SP2 and 11.6.SP4.

2:3

12.0

 PML  PML Publi sher User Guide Using the PML Encryption Utility Program

2.5.2

Encry ncrypt ptio ion n Typ Type e 3: Obs Obsol ole ete Encryption Type 3 is an obsolete format which is not supported at version 12.0. - - 003>- - Publ Publ i shed PML 11. 11. 5. SP2 ( Sep Sep

6 2006 2006)) >- -

r et ur n er r or 99 ' Thi s f i l e i s no not r eadabl e by t hi s ver ver si on of PDMS' $** 9ad7b51 9ad7b51ff c44384a860 c44384a860197 197972 9728b1 8b185f 85f 52 $** Ux1YRx1YR- Lpi W- oRdj oRdj XdN XdNJ Ly4- r 8FE++c- Lr EZs EZs AzQebuw AzQebuwyRBKsr yRBKsr Ov97U0h3 v97U0h3dFR dFR $** $* * M- 5m1sM 1s Me41h2Ll EXVpM EXVpMadPyz Rt Vl UNMYdHhf YdHhf BC8I BC8I YKt xe5BksX38 xe5Bks X38Rf Rf F9mYUr YUr $** VW3hB 3hBC9ZKU 9ZKUzM zMf 80cvj 80cvj 0PI J J

This format was the default for "Early Adopter" releases with 11.5.SP2 and 11.6.SP4.  AVEV  AVEVA A plans to release updated 11.5.SP2 and 11.6.SP4 versions supporting encryption type 4 instead of encryption type 3 in January 2008. If you have existing encrypted files encrypted with encryption type 3, you must re-encrypt the original source to encryption type 4 if you wish to use them with version 12.0, or with the updated 11.5.SP2 and 11.6.SP4. 11.6.SP4.

2.5.3

Encry ncrypt ption ion Type ype 2: Ba Basic sic Enc Encry rypt ptio ion n Encryption Type 2 (Basic Encryption) is an alternative simple encryption scheme which is implemented directly, and does not rely on external libraries. It can be selected by the basic  option. - - 002>- - Publ Publ i shed PML 1. 0 SP1 SP1 >- r et ur n er r or 99 ' Unabl e to de decrypt crypt f i l e i n t hi s sof sof t war e ve ver si on' $** 4def 4def aa8bf aa8bf 7dcf 7dcf 0d64 0d64dcd2 dcd2aeda aeda34 3487 8703 03a a $** $* * ppI l qUbi qUbi 96dl UydmeuZkMLdkbW Ldk bWJ 54Xp2V 54Xp2Va4uR a4uR2M 2M0RuZl 0RuZl kj PqQTLg5G TL g5GoxqW oxqWr l $** ZqN ZqN3Z65m 3Z65mRys0R ys 0RuZ uZll H7f l J adi 0+Zkampnc- 4l KSJ 2R64u 2R64uR RyYl OSZl SZl abMz wLZh $** 5+ZneHt 2cmJ gAi gAi +sJ qbm qbmeWN8+j t 0UzZnJ 0UzZnJ KI z1uZl z1uZl cOJ cOJ 9

This algorithm is less secure than the RC4 algorithm, and is not recommended for general use.

2.5.4

Encry ncrypt ptio ion n Typ Type e 1: 1: Triv Trivia iall Enc Encry rypt ptio ion n Encryption Type 1 (Trivial Encryption) is designed for testing purposes only. It provides no security, as you can read the lines slowly (backwards), but you can use it to check that the decryption system is functioning correctly, and that, for example, an incompatible version of  the software has not been installed. - - 001>- - Publ Publ i shed PML 1. 0 SP1 SP1 >- orcamtset *$ ) l as r e ve ver eni l - l ai vi r t ( 1 mht i r ogl a ht i w dedoc ne ne s i el i f s i hT P$ cam. 2ogl a m$ cam. 1ogl 1ogl a ni ni kcaB P$

It can be selected by the -trivial  option. For example, the line:

$p Decr ypt ypt i on not avai avai l abl abl e $*$

2:4

12.0

 PML  PML Publi sher User Guide Using the PML Encryption Utility Program

will be interpreted as a comment when read backwards as part of a trivially encrypted file, but will print a message if run on a version of the software that does not support any decryption.

2.5.5

Encry ncrypt ptio ion n Type ype 0: No No Enc Encry rypt ptio ion n Encryption Type 0 (No Encryption) adds a standard Published PML header to the file, but does not otherwise encrypt the file. It can be selected by the -none option. - - 000>- - Publ Publ i shed PML 1. 0 SP1 SP1 >- $* t est macr o $P Th Thi s f i l e (al go0. mac) i s enco encod ded wi t h al gor i t hm 0 ( no en encrypt crypt i on) $m al go1 go1. mac $P Back i n al go0. go0. mac

You might choose to use this if you want to buffer the file for improved speed of access (particularly for widely used PML objects or functions accessed over a relatively slow network). For example, a file with the header  - - - - Pub Publ i shed PML 1. 0 SP1 SP1 >- -

will be kept in memory after it has been read five times during a session.

2.6

B u f f er i n g Decrypting a PML file takes longer than reading a plain-text version, and in some circumstances PML files may be re-read many times during a session. (A new command PML STA STATISTICS displays information on the numbers of times each file f ile has been read and some extra information usefu l to AVEVA AVEVA when testing the Published PML facilities). In order to reduce the time taken to re-read the files, Published PML files may contain a buffering directive in the header-line (the first line in the file). If a dash and a number are included directly after the three-digit encryption algorithm ID, then the software will retain the file in memory indefinitely once it has been read that many times. You may wish to edit heavily used files to add buffering to the header by hand, or may use the -buffer 5 option of pmlencrypt.exe  to include a "buf f er af t er f i ve r eads " tag in each file encrypted.  A value of five is a good number to start with. Many files are read precisely once during module start up - there is little benefit in buffering those files, and a value of five will avoid that, but apply to all heavily used files. If a file you are actively developing has a header including buffering, it will not be re-read as often as you are used to. To To force all buffered files to be cleared from memory if they ar e not in current use, you can issue the PML REHASH or PML I NDEX  commands, or switch modules.

2.6.1

Editi diting ng Publi ublish she ed PM PML Fil File es Most changes made to an encrypted PML file will make it unusable, (the software will report a corrupt file if you try) but there are a few exceptions: You may add or change a buffering-value in the Published PML hea der-line, eg:

- - 04>- - Pub Publ i shed shed PM PML 1. 0 SP1 SP1 >- -

2:5

12.0

 PML  PML Publi sher User Guide Using the PML Encryption Utility Program

may be changed to

- - - - Pub Publ i shed shed PM PML 1. 0 SP1 SP1 >-  Adding a buffering-value of 5 (see later for details) You may change the 2nd line of RC4 or Basic encrypted files to report a different error or  message, eg

- - 004>- - Publ Publ i shed PML 1. 0 SP1 SP1 >- return error 99 'Unable to decrypt file in this software version'

$** 9ad7b 9ad7b51f 51f c44384a8 c44384a860 60197 197972 9728b1 8b185f 85f 52 may be changed to

- - 004>- - Publ Publ i shed PML 1. 0 SP1 SP1 >- return error 66 'You need a patch - ring Ian on extension 6655'

$** 9ad7b 9ad7b51f 51f c44384a8 c44384a860 60197 197972 9728b1 8b185f 85f 52 You may change lines within Trivial or unencrypted. un encrypted.

2.7

Ex am p l es

2.7.1

Si n g l e Fi l e To encrypt a single file with the RC4 algorithm:

pml encr ypt ypt

2.7.2

r aw. t xt

encr ypt ed. t xt

Fo l d er o f Fi l es To encrypt a folder of files with the basic algorithm and buffering after three reads:

pml enc r yp y pt - bas i c - buf f er 3 r aw aw_ f ol ol der . f ol der

2.7.3

Si mp mp l e PML L IB IB St St ru ru ct ct ur ur e To encrypt a %PMLLIB % -structured hierarchy of files with no encryption algorithm but buffering after five reads (see below for a fuller example):

pml enc r yp y pt - pml l i b - none - buf f er 5 pml l i b pml l i b_ bu buf f er ed ed

2.7.4

Restric strictt who who can can use use an Enc Encry rypt pte ed File File If you wish to not only encrypt a pml file, but also to restrict the sites at which it can be run, you can include extra tests within the pml before encrypting it. For example, the q banner  company  command returns a company dependent string from the license file, and you can test that within your encrypted pml file. In this case the test is that the string includes "AVEVA"

var ! company banner company i f not ! company. mat chw chwi l d( ' *AV *AVEVA*' ) t hen r et ur n er r or 99 99 ' Thi s f i l e i s not au aut hor i sed sed f or $! $! com company' endi f 

2:6

12.0

 PML  PML Publi sher User Guide Using the PML Encryption Utility Program

2.7.5

Full Worke orked Exa Exampl mple e: Encr Encrypt ypting ing PMLLIB LLIB These are the steps you can follow to encrypt the PML files in a PMLLIB folder hierarchy. PMLLIB contains many files, some of them are PML files - which can be encrypted, and some of them are other types of files which cannot (for example icon and index files). Steps you can follow are: •

Check that the the files and folders folders you you will be working working with with have have current current backups. backups. If If delete delete or overwrite your only copies of a file there is no way to get it back from an encrypted version.



Find the the PMLLIB PMLLIB folder folder you you wish wish to encrypt, encrypt, and make make sure sure that no-one is using using it. In this example I will assume that the folder is called 'pmllib' and that the PML Publisher  encryption utility has been installed in the same folder.



Start tart a com comma mand nd wind window ow..



Change Change dire director ctory y to the fold folder er contai containin ning g the PMLL PMLLIB IB folde folderr.



Rena Rename me the the PML PMLLI LIB B fol folde der: r: rename pml l i b pml l i b_or _or i gi nal



Make a complete complete writeable writeable version version of the the pmllib pmllib folder folder and all its its contents contents in in the original original location:

or i gi nal pml l i b xcopy  / E / I pml l i b_ or •

Encrypt Encrypt from the pmllib_ pmllib_origina originall back to pmllib pmllib (this (this will will replace replace with with encrypted encrypted versions versions all files that have .pmlmac, .pmlfrm, .pmlobj or .pmlfunc extensions, but leave other  files unchanged)

. \ pml encrypt crypt . exe - pml l i b pml l i b_or _or i gi nal pml l i b •

Before distributing distributing files containing containing Intellectual Intellectual Property Property that you you wish to protect protect you must check that all the correct files are encrypted. Folder comparison programs (such as 'Beyond Compare' from Scooter Software) allow you to identify files that were not changed by the pmlencrypt - for example because they have different file extensions or  because files were read-only.

2:7

12.0

 PML  PML Publi sher User Guide Using the PML Encryption Utility Program

2:8

12.0

 PML  PML Publi sher User Guide Using Encrypted Files

3

Us i n g En c r y p t ed Fi l es Provided that you have a compatible version of the software then encrypted files can be read transparently in all modules that include PML. 11.5.SP2 and 11.6.SP4 versions released before January 2008 support an "Early Adopter" encryption type 3, which is no longer supported from the first full release of PML Publisher  1.0. AVEVA released updated versions 11.5.SP2.11 and 11.6.SP4.9 supporting the replacement encryption type 4, which is also supported in AVEVA 12-series and later 11.5series and 11.6-series releases. If you have existing encrypted files encrypted with encryption type 3, you must re-encrypt the original source to encryption type 4 if you wish to use them with versions 12.0, 11.6.SP4.9, 11.6.SP4.9, 11.5.SP2.11 11.5.SP2.11 and later releases. If you attempt to display or record encrypted PML using the $R commands, you will find that all lines are replaced by the text . Error messages and trace-backs will include function names, but not the text of each line. The only circumstance in which hidden lines can become visible is under certain circumstances during a macro which includes a module-switch. After a module switch, any remaining lines in that macro may or may not be traceable. This may change in a future release.

3.1

Er r o r Mes s ag es You may see the following err or messages: (46,103) PML: Encrypted file is corrupt or of unknown format

You are trying to read an encrypted file that has become corrupted (e.g. the encrypted text has been edited)

(46,104) PML: Encrypted file is in an obsolete and unsupported format

You are trying to read an encrypted file created with an algorithm that is no longer supported.

Unable to decrypt file in this software version

You are trying to read an encrypted file in an incompatible software version (e.g. the algorithms were created in a later software version) or: You are trying to read an RC4-encrypted file on a PC that doesn't have the Microsoft Base Cryptographic Provider installed (this is not expected to occur)

3:1

12.0

 PML  PML Publi sher User Guide Using Encrypted Files

3:2

12.0

 PML  PML Publi sher User Guide

Index

B

L

Buffering . . . . . . . . . . . . . . . . . . . . . . . . . 2:5

Licensing . . . . . . . . . . . . . . . . . . . . . . . . 2:1

E

P

Editing Published PML Files . . . . . . . . . . 2:5 Encryption  Algorithms . . . . . . . . . . . . . . . . . . . . 2:3 Basic . . . . . . . . . . . . . . . . . . . . . . . . . 2:4 No Encryption . . . . . . . . . . . . . . . . . . 2:5 Obsolete . . . . . . . . . . . . . . . . . . . . . . 2:4 RC4 Encryption . . . . . . . . . . . . . . . . 2:3 Serious Warnings . . . . . . . . . . . . . . . 1:1 Trivial . . . . . . . . . . . . . . . . . . . . . . . . 2:4 Utility Program . . . . . . . . . . . . . . . . . 2:1 Error Messages . . . . . . . . . . . . . . . . . . . 3:1 Examples . . . . . . . . . . . . . . . . . . . . . . . . 2:6

Possible Workflow . . . . . . . . . . . . . . . . . 2:1

F Files Choosing . . . . . . . . . . . . . . . . . . . . . 2:2 Encrypted . . . . . . . . . . . . . . . . . . . . . 3:1 Folder Paths . . . . . . . . . . . . . . . . . . . 2:3 Folder Tree . . . . . . . . . . . . . . . . . . . . 2:3 in a Folder  . . . . . . . . . . . . . . . . . . . . 2:2 Single . . . . . . . . . . . . . . . . . . . . . . . . 2:2

H Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:1

Index page 1

12.0

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF