发布于 2011-04-20 13:44:37
42楼
看到很多朋友有不明白的地方。我把S7 Block Privacy的说明文档上传一下:You can use the "S7 Block Privacy" expansion package to achieve heavily encrypted blocks. The severity of the encryption will reach a degree that is much higher than any encryption with standard "know-how protection".
Note the following when you use "S7 Block Privacy":
?You operate S7 Block Privacy exclusively with the context menus. Help on individual menus is available with the "F1" button.
?You can no longer edit encrypted blocks in STEP 7. Only the interfaces of the encrypted block will remain visible.
?Encrypted blocks can only be decrypted with the correct key and the supplied decompilation information. Make sure you keep the key in a safe place and/or make copies of the unencrypted blocks.
?Encrypted blocks can only be loaded on the following CPUs:
- CPU 3xx as of firmware version V3.2
- CPU 4xx as of firmware version V6.0
?If the project includes sources, the encrypted blocks can be restored by conversion with the sources. The sources can be completely removed from the project by "S7 Block Privacy".
Block symbols
Unencrypted block
Block with the property "KNOW_HOW_PROTECT"
Block encrypted with S7 Block Privacy (recompilable)
Block encrypted with S7 Block Privacy (not recompilable)
Supported blocks
?S7 Block Privacy can encrypt function blocks (FB) and functions (FC). S7 Block Privacy displays supported blocks only.
?You cannot encrypt organization blocks (OB), system functions (SFC), system function blocks (SFB) as well as fail-safe blocks and blocks with "know-how protection".
?The maximum size of a block is a load memory requirement of 60 KB. The load memory requirement of a block is available in the object properties of a block.
General approach to encryption
Proceed as follows to encrypt the blocks:
1. Open the object hierarchy tree until you see the required block.
2. Right-click on the block you want to encrypt and select Encrypt block.... The dialog box "Block Encryption" will open.
3. Select if you also want to encrypt the decompilation information.
Note: If you deselect the check box, you will never be able to recompile the block!
4. Enter a key with at least 12 characters in both boxes. Make sure that you keep a copy of the key in a safe place. Use the "OK" button to start the encryption.
5. The block is now encrypted. The following symbol indicates this status:
Note: Check to see if the encrypted block does still exist as a source somewhere. You can restore encrypted blocks from their sources. See: Safely removing sources from the project
General approach to decrypting
Proceed as follows to decrypt the blocks:
1. Open the object hierarchy tree until you see the block you wish to decrypt. You will recognize the encrypted blocks (with recompilation information) by the following symbol:
2. Right-click on the encrypted block you want to decrypt and select Decrypt block.... The dialog box "Block Decryption" will open.
3. Enter the key. Use the "OK" button to start the decryption.
4. The block is now decrypted.
Note: If you fail to enter the correct key three times, the S7 Block Privacy will abort automatically.
Procedure for encrypting and decrypting several blocks
1. Select the blocks you want to encrypt/decrypt by selecting the check box in front of the block.
Note: The blocks will all be encrypted with the same key, which means they will have to be decrypted using the same key.
2. Right-click on one of the selected blocks.
3. Now proceed as described in the paragraphs "General approach to encryption" and "General approach to decryption".
4. All selected blocks are now encrypted or decrypted.
Safely removing sources from the project
If the project includes sources, you can restore blocks you have encrypted with these sources. If you want to forward the project to third parties, you can prevent restoration of these blocks by removing (deleting) the sources.
S7 Block Privacy supports you with the following symbols to indicate those sources that can be used to track sources from which users could restore blocks:
Source to be deleted ?the entire content of the source was encrypted
Source must be checked ?only one / some of the blocks in the source have been encrypted
Source must not be deleted ?none of the blocks in the source were encrypted
Notes:
?Only with SCL sources (that were created in the same project) can blocks in sources be uniquely assigned.
?Assignment of blocks with an STL source can only take place by comparing the absolute or symbol name. This fact is indicated by a question mark in front of the STL blocks. If a source includes several STL blocks, you will have to check the contents of the source manually.
Proceed as follows to prevent third-parties from restoring blocks:
1. Encrypt the blocks as described above.
2. Open the "Sources" folder in S7 Block Privacy. If S7 Block Privacy detects that the source belongs to an encrypted block, then the source will be identified as such. The blocks may not be assigned accurately with STL sources or be assigned incorrectly. That is why you have to check thoroughly as to which blocks are included in the sources.
3. Right-click on the source you wish to delete and Delete source....
4. The source is deleted after confirmation in the following dialog.
5. Now right-click on the "Sources" folder and select Reorganize source folder (the project may not be open in SIMATIC Manager).
6. All sources are now safely deleted and can no longer be reproduced.
活到老学到老~