Download as pdf
Download as pdf
You are on page 1of 456
Sentinel SuperPro 6.5 Developer’s Guide (Safenee Copyright © 2007, SafeNet, Inc. Allrights reserved. All attempts have been made to make the information In this document complete and accurate SafeNet, In. i ot responsible for any direct or indirect damages or loss of business resulting from inaccuracies or omissions ‘The specifications contained inthis document are subject to change without notice SafeNet, Sentinel, and Sentinel SuperPro are either trademarks oF registered trademarks of Safenet, Inc. “Microsoft Windows, Windows 98, Windows ME, Windows 2000, Windows 2003, Windows XP, and Windows Vista are either trademarks or registered trademarks of Microsoft Corporation in the United States and other ‘countries. Linux is a trademark of Linus Torvalds, in the United States and other countrles. All other product names referenced herein are trademarks of registered trademarks of their respective manufacturers. CONFIDENTIAL INFORMATION Sentinal SuperPro protection system is designed to protect your applications from unauthorized use. The less information that unauthorized people have regarding your security system, the greater your protection. It sin Your best interest to protect the information herein from access by unauthorized individuals, Part Number 007632-001, Revision A. Software versions 6 and later A Initial Release Sly 2005, Updated for the 65 Release Sly 2007 SafeNet Sales Offices Austialia Brazil China Finland "661 3.9882 8222 4551161216455 485 10 88519191 +358 20 500 7800 France Germany Hong Kong India 43314755 7470 4491803 7246269 48523157 7111 #691-11.32980277 / 30980641 Japan (Tokyo) Korea Mexico Netherlands {+8145 6405733 482.31 705 8212 45255 5575 1481 +31 72.658 1900, Singapore Talwan UK (Camberley) USS. (Massachusetts) +65 6207 6195, 886-2-27353736 4440 1276 608000 +1 978.539.4800 US. (New Jersey) Us. cuiginia) US. (vine, California) ULS. (San Jose, California) ++1 201.323.3400 +1 703.279.4500 +¥1 949.450.7300 + 408) 452 7651 US. (Torrance, California) +1 310533.8100 0 ‘Sentinel SuperPro 6.5 Developer's Guide International Quality Standard Certification oo SQy facilities are certified to the latest, globally recognized SO 900-2000 standard. if ‘The certificate number is: CERT-02982-2003-AQ-HOU-RAB Rev 3. ai] ee European Community Directive Conformance Statement Directive 89/236/EEC. Conformity Is declared to the following applicable stan- dards for electro-magnetic compatibility immunity and susceptibility; CISPR22 and IEC801. This product satisfies the CLASS 8 limits of EN 55022. Cc € This product is in conformity with the protection requirements of EC Council FCC Notice to Users Sentinel SuperPro has passe the FCC Self authorization process of Computers and Computer Peripherals. FOC Part 15 Class B Specifications Tis equipment has been tested and found to comply with the lit fora class B digital deviee, pursuant to part 15 ofthe FCC Rules. These limits re designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency energy andl ino installed and used in accordance with the instructions, may cause harmful interference to radio communi: tdons. However, there iso guarantee that interlerence will not occur ina particular installation, Ifthis equip ‘ment does cause harmful interference to radio or television reception, which can be determined by turning the equipment offand on, the usr is encouraged to try to correct the interference by one or more ofthe following. 1 Reorient or relocate the recelving antenna, 1m Increase the separation betwoen the equipment and receiver Connect the equipment into an outlet ona eitcult diferent from thal to which the recelver Is connected, 1 Consul the dealer or an experienced radio/TV technician for help. |Inorder to maintain compliance with FCC regulations, shielded cables must be used with this equipment. Opera ‘don with non-approved equipment or unshielded cables tsikely to result in Interference to radio and TV reception. The user is cautioned that changes and modilications made to the equipment without the approval of ‘manufacturer could void the user's authority to operate this equipment. Sentinel Superero 6.5 Developer's Guide aw ‘Sentinel SuperPro 6.5 Developer's Guide Contents Preface ‘Terms and Coventions Used in This Guide s..misisnennninniennnnnnsnnnnse SVE About This Guide... - evnnnnnnntnnnnnss eee XNA More Documentation Resources XXL Contacting Technical Support. a XXi Export Considerations ... esse xxii We Weleome Your Comments soe XXL Chapter 1: What Is Sentinel SuperPro Software Piracy Affects Your Business. Sentinel SuperPro For Marketing Suc. How Sentinel SuperPro Protects Your Software Protection Types Sentinel SuperPro Features and Benefit Sentinel SuperPro Components. The Hardware Key wrersnnnsern The Sentinel SuperP 10 API ener ‘The Sentinel SuperPro Developer's The Sentinel System Driver. The Sentinel Protection Server wnnnnnnnnmnnnnnenninnnmnnnnnnnnnmmenenee 1 1 3 10 ot 14 16 16 16 Sentinel Superero 6.5 Developer's Guide Contents Chapter 2: Using the Hardware Key Getting to Know the Key SuperPro XM - Maximizes Application Security. Restricted Cells smn Programmable Cells. Programming the Ke Access Codes: Cell TYPES srernrere Cell Values. Valid Algorithm Adress Algorithm with Password and Counter. Diagram showing cell structure of a SuperPro XM key... Attaching the Sentinel SuperPro Hardware Key .. Installing the Parallel Port Hardware Ke Installing the USB Hardware Key Ordering and Returning Keys Ordering Additional Keys. Returning Keys... 56 : De: Chapter ning Your Protection Strategy. Introduction oS Protection Types, . Active v. Inactive Applications. Activation Types... Network Licenses. Getting Started .. Quick and Easy Protection... Customized Protection. Basie Protection Guidelines Commonly Used Protection Techniques. Reading Stored Data Using Algorithms to Enerypt Data Using Activation Password wm Dealing With Missing Hardware Keys. w Sentinel SuperPro 6.5 Developer's Guide Contents Dealing With Newly Connected Hardware Keys. Advanced Protection Techniques Using Returned Values as Variables. Implementing Encryption Techniques. ‘Querying Activation Passwords. Using Data Words.. Assembly Language Techniques . Using Stepped Access. Obstructing Debuggers Controlling Demo Applications Using Counters semen Querying Counters... Programming the Hardware Key Using One Key for Mule Appi se Moving On... so Chapter 4: Implementing Licensing. 101 License Sharing ec. 101 Setting the Access Mode 103 ting Stand-alone or Network Mode... senunnsttnnnnieeenneee LOR Setting RNBO_SPN_ALL_MODES... 104 About the NSP_HOST Variable. 105 Finding a Key.. 106 Finding a Key in Standalone Mode . see senennes 106 Finding a Key in Network Mode.nscnenmnninnncisninnninnnnnsnnninnnese 106 Finding a Key in Dual Mode. 107 Getting a License 108 The License ID mm 109 Maintaining the License. 109 A Note About Licenses 109 Releasing a License nnn svn soe LO Using Sublicenses snes 110 Sublicense Usage Example 110 Getting a Sublicense .. . 111 Adding Sublicenses to Your Protection Strategt. 111 Sentinel supertro 6.5 Developer's Guide ww Contents Chapter 5: Starting the Sentinel SuperPro Toolkit. Opening the Sentinel SuperPro TOOIKit ....sesnnnnnnnstnnnnnssnsesnnnnse Entering Your Password... sevennnnnneeenes LA Include Overvrite Passwords in DSAPE.DLL and USAFE.DLL. 118 Enabling the One-Time Update Option for License Codes... 119 Navigating in the Sentinel SuperPro Toolkit... soe 121 Stages and Sections. 122 Meme Bar 126 Getting Helps nnn 126 Using Online Help omer seen 127 Completing the Overview Stage 127 Learning About Sentinel SuperPro Concepts 127 Using the APL Explorer amnmnnnnneesese 127 Querying Algorithms... soon 134 Creating a Project. 136 What Isa Projec 136 Creating a New Project 137, Importing a .DAT File.. 137 Changing Your Developer ID or Passwords sennnns 138 Opening an Existing Project, 139) Saving Your Project wsmnnesesennnnnnne sos Adding Password Protection to Your Projet. Locking a Project. 141 Changing the Password fr a Locked Project sresnmnnnnnnene 142 Unlocking a Project seo sesnnnnnn smn 42 Creating a Project Fle for Distributors 143, Closing the Sentinel SuperPro Toolkit 144 140 140 Chapter 6: Protecting Your Application. What Is Application Protection? 146 Demo Applications 146 Selecting a Protection Type... 149 Using Integrated Protection 151 vi Sentinel Supertro 6.5 Developer's Guide Contents Selecting the Cell Address... Overriing the Default Algorithm Value 152 Adding a Demo Counter snnsnnnnniinnninnnnnnnsnninnasn 154 Selecting the Activation Type ..on.eonnmne sonnnnnnnennnnnnnn 15S Using Automatic Protection... Entering a Name for the Protection Element. Selecting the Cell Address Selecting the Input and Output Files 160 Selecting Automatic Protection Execution Options. 163 Providing Advanced Security Settings. one 167 Selecting Additional Files for Encryption vue 170 Selecting the Activation Type 174 Customizing Error Me 176 Protecting Multiple Applications... 7 Editing an Application Protection Blement Deleting an Application Protection Element... Where to Go from Here Frequently Asked Question$..nnnnsnsnnsnnse 1S1 soe 157 157 158 Chapter 7: Working With Design Elements. 185 Custom Element Type sass 186 Adding Algorithms. 188 Entering Counter Value 191 Entering Password Valttes ww. Adding Counters smn Adding User Data .. ss Adding Sublicense Limits, 198 Editing Existing Elements... 200 Deleting an Element 1.0 Rearranging Elements on the Key 201 201 205 207 Chapter 8: Implementing Your Strategy. Creating the Prototype Sentinel Superero 6.5 Developer's Guide & Contents Starting the Prototype Process 208 Verifying the Key Using MemView. 209 Adding API Functions to Your Source Code .. soe 211 Viewing the Pseudocodl....ornnsnsnnn Chomnnannannan 211 Adding Code to Your Application... vo 213, Using the API Explorer to Evaluate the API Functions 213 Shelling an Application smn soe 215 Testing Your Application Protection 219 Chapter 9: Defining Field Activation Actions Working with Actions.. Adding an Action... Removing an Action... Working with Commands.. Adding a Commattd nso Removing a Command. Available Commands. Testing Your Strategy Final Steps Chapter 10: Programming Keys. Setting Up to Program Product Keys... ese sons Selecting the Appropriate Keys. evennnnnnne 235 Connecting the Keys 235 Programming a Product Ke 237 Viewing Programming Statistics.munnesnm 240 Verifying the Key Was Programmed Correctly Setting Up to Program Distributor Ki : Selecting the Appropriate KeySo.0rsvnnnnee 242 Connecting the Keys 242 Programming a Distributor Key’ 244 x Sentinel SuperPro 6.5 Developer's Guide Contents Chapter 11: Shipping Your Applica’ What to Send to Your Customers, Installing the Sentinel System Driver Installing the Sentinel Protection Server. Installing the Sentinel Data Protection Driver What to Send to Your Distributors.. Customer Items. Distributor-Only Ttems..mnnnnneesee Packaging and Handling Gutdelines for Keys Chapter 12: Activating and Updating Keys. Hove Product Keys ate Activated or Updated. What Is a Locking Code? What Is License Code?.m.mnnnsee How Distributors Activate an Application Using the Client Activator... Client Activator Customer Requirements Steps for Deploying the Client Activator. I You Don’t Use the Client Activator . Updating Product Keys in the Field. Receiving the Locking Code from Your Customer Generating a License Code ses Sending the License Code to Your Customer... Updating Distributor Keys in the Field... Chapter 13: Using the Stand-alone Utilities. 281 Using the Make Keys Utility 282 Installing the Make Keys Utility sernnnnmnnnnnnnnunmninnnnnesnnnnmnnnns 282 Opening the Make Keys Utility 283 Programming Product Key 284 Programming Distributor Keys... 286 Viewing Programming Statistics. son 289 Using the License Generator Utility 290 Sentinel Superero 6.5 Developer's Guide x Contents Installing the License Generator Utility. soe 290 Opening the License Generator Utility 291 Generating a License Code... 292 Using the Field Exchange WILY ....rcnnmnensnnnnnnnnninnnnnnnnesnnnnne 295 Installing the Field Exchange Utility ~ Developers 295 Installing the Field Exchange Utility ~ Customers . 295 Opening the Field Exchange Utility ..0m 297 Generating a Locking Code 298 Entering a License Code. 299 Chapter 14: API Function Reference Using the Sentinel SuperPro APL... API Functions Summary nme The RB_SPRO_APIPACKET Structure. RNBOsproActivate seen RNBOsproCleantip 301 sn 303, 305 305 307 RNBOsproDecrement 307 RNBOsproEnumServer 310 RNBOsproFxtendedRead . 313 RNBOsproFindFirstlinit...... svete 315 RNBOsproFindNextUnit 316 RNBOsproFormatPacket wn snne 317 RNBOsproGetContactServer .. 318 RNBOsproGetFullstatus. . . srmnnne 319 RNBOsproGetHardLimit... ssnnnnsnnnnnnneinnnnnnnnnnnnennnnnees 320) RNBOsproGetKeylnfo.... 321 RNBOsproGetKeyType 321 RNBOsproGetSubLicense . 325 RNBOsproGetVersion 326 RNBOsprolnitialize sens 329 RNBOsproOverwrite.. sevnneetnnee 330 RNBOsproQuery.. 332 RNBOsproRead. 2335 RNBOsproReleaseLicense 337 RNBOsproSetContactServer soo 339 x ‘Sentinal SuperPro 6.5 Developer's Guide Contents RNBOsproSetHeartBeat sn RNBOsproSetProtocol 341 344 RNBOsproCheckFerminalService ss 346 RNBOsproSetSharedLicense soreness semen 348 RNBOsproWrite ssn 350 API Status Codes 352 Chapter 15: Migrating from Older Versions of Sen 357 Chapter 16: Features for Linux Distribut 359 ‘Support for SuperPro XM and Parallel Port .. 360 Sharing support in the Dual Client Library 360 Sublicensing... so 361 Cancelling a License, Sentinel Protection Installer for Linux Redistributables . What to Send to Your Customers and Distributors... 361 362 Getting Started Part |= Using the Windows Toolkit nnn sense Part 11 Working in Your Application Source Code. 368 Part Ill — Configuring SafeCf.rnmnnnnnenemimnnninnenserinnnn 368 Part IV — The Final StepS.eseransnnene 368 Frequently Asked Questions 368 Appendix A: Troubleshooting Uninstalling the Sentinel SuperPro Toolkit... Repairing a Sentinel SuperPro Installation... Modilying/Repairing Sentinel SuperPro lnstaller on Vista. 377 Strategy Design IsstteS nem wo 378, Application Protection Issues. 379 Protecting Multi-File Applications soo 380 Protecting Interpreted-language Applications 381 373 374 376 Sentinel Superero 6.5 Developer's Guide x Contents Input File Attributes 381 Thread Local Storage 382 Lahey E90 Fortran 2.0... 382 Protecting FoxPro 3.0 and 5.0 Applications. .vv.v wn 382 Protecting Microsoft }++ 1.1 Java Applet. 382 Note for SmartHeap Users. a 382 Protecting Applications That Use “Starter” Programs. 383, 384 Key Programming Issues. Application Activation Issues... 1386 Sentinel SuperPro Compatibility 388 Sentinel SuperPro Key Compatibility Issues. aasasassssereresenssserensvaes 39D About the USB Hardware Interfac seeeveren 391 Appendix B: Compatible Compilers and Applications... 393 Appendix C: Using the Command Line Shell Utility.. 397 Command Line Syntax sesseee 398. Using the Shell Utility eee ss eecstnesenessee 399 Example 400 Index... Appendix D: Glossary .. A D xv Sentinel SuperPro 6.5 Developer's Guide Contents wo 428, no 428, 429 429 soe 430 sos 430 430, oe 432, 432 432 gouyrmovoze Sentinel supertro 6.5 Developer's Guide wv Contents oi ‘Sentinal SuperPro 6.5 Developer's Guide Preface ‘Thank you for selecting Sentinel SuperPro to protect your applications from unauthorized use. The Sentinel SuperPro software protection system com- bines a programmable hardware key with the ability to encrypt data, giving you a wide range of methods for securing multiple applications from illegal distribution and use. Terms and Coventions Used in This G Please note the following conventions used in this guide: The root drive on your system where your operating system Is installed. Sentinel Superero 6.5 Developer's Guide uh Preface “elnstalldir> “The path where the software, In context, is Installed. * On 22-bit Windows operating systems refers, ‘to the following path: \Program Files\SafeNet SentinenSuperProv6.5 + On G4.bit Windows operating systems refers, ‘to the following path: Program Files(x86)SafeNet SentineNSuperPro\6.5 ‘courier Denotes syntax, prompts and code examples. If bold, denotes text you type. Bold Lettering In procedures, words in boldface type represent keystrokes, ‘menu items, window names or mouse commands. Italic Lettering Words in italics represent file names and directories, or, when used in explanatory text, for emphasis. About This Guide vil The Sentinel SuperPro Developer's Guide walks you through the entire process of protecting your applications, including planning, protecting, packaging and shipping a protected application to your customers. The following table explains what you can find in each chapter of this guide: SuperPro? Chapter 1-What IsSentinal | An overview of Sentinel SuperPro components, features and benefits, including system requirements and what's new in 6.5. Chapter 2 — Using the Hardware | An introduction to the Sentinel SuperPro key hardware key, with descriptions of the physical key layout, memory cells and algorithm values and addresses. Chapter 3 — Designing Your Information about techniques you can use in Protection Strategy your protection strategy, and an explanation Of the basics of software protection with Sentinel SuperPro. ‘Sentinal SuperPro 6.5 Developer's Guide Preface ‘Chapter 4 - Implementing Ucensing Describes how to use network licenses with your protected application, including instructions for obtaining, maintaining and releasing licenses across a network. ‘Chapter 5 Starting the Sentinel SuperPro Toolkit. Instructions for opening and navigating in the Toolkit, using the API Explorer and creating and saving project files ‘Chapter 6 — Protecting Your ‘Application Describes how to apply integrated or automatic (shelled) application protection to your applications. Chapter 7 - Working with, Design Elements Procedures for adding custom elements— algorithms, counters, data words and sublicenses —to your protection strategy. Chapter 8 - Implementing Your Strategy Information on creating a prototype Key, ‘adding a shell to an application and adding ‘APl function calls to your source code. Chapter 9 - Defining Field Activation Actions Information about defining actions and commands used in field activation. Chapter 10- Programming Keys Describes how to program product keys and distributor keys to ship with your protected application. ‘Chapter 11 — Shipping Your Application Provides lists of the items you need to send along with your application to both customers and distributors ‘Chapter 12 — Activating and Updating Keys Explains how to retrieve information about a key from your customer or distributor, and how to generate a code to update product. or distributor keys. Chapter 13 — Using the Stand- alone Utlities Instructions for using the three Sentinel SuperPro stand-alone utilities: the License Generator Utility, the Field Exchange Utility and the Make Keys Utlity. Sentinel Supertro 6.5 Developer's Guide xx Preface Chapter 14 API Function ‘An overview of Sentinel SuperPro API Reference functions for use with Windows applications, including parameters, return values and status codes. Chapter 15 — Migrating from | Is meant for older customers who are Older Versions of Sentinel Keys. | migrating from other versions of Sentinel keys, Chapter 16 — Features for Linux | Presents the various features of the Linux Distribution release of Sentinel SuperPro, ‘Appendix A— Troubleshooting | Presents common problems you may encounter while using Sentinel SuperPro and solutions to those problems. “Appendix 8 — Compatible A list of the compatible compilers and Compilers and Applications applications that can be used to develop applications to be protacted with Sentinel SuperPro 65. ‘Appendix C- Using the Presents a detailed description on using Shell Command Line Shell Utility Utilities ‘Appendix D — Glossary A glossary of Sentinel SuperPro and software protection terms used throughout this manual. oo ‘Sentinel SuperPro 6.5 Developer's Guide Preface More Documentation Resources Refer (o the following Sentinel SuperPro documentation for more informa- tion and instructions. In addition, the Sentinel SuperPro Toolkit and other utilities come with the Online Help systems that provide detailed information: Release Notes ‘New features summary | Developer responsible for ‘and the installation evaluating and installing instructions. Sentinel SuperPro. Sentinel SuperPro_| Instructions for installing | Your end users and the ‘system and running the Sentinel | system administrators ‘Administrator's Protection Server and | responsible for deploying Guide Monitoring Tool. the protected applications. Contacting Technical Support We are committed to supporting Sentinel SuperPro. Ifyou have questions, need additional assistance, or encounter a problem, please contact Techni- cal Support: Technical Support Contact Information ttpzlc3safenet-inc.com Online support system to get quick answers for your queries. It also provides you direct access to SafeNet knowledge base. ttp:liwwvrsafenet-inc.com/supportiiciclogin. asp Provides the information you need to successfully integrate Sentinel products ‘with your solutions. [internet | http:iwwsafene.inccomBupportindexasp Sentinel Superero 6.5 Developer's Guide x Preface Technical Support Contact information (Continued) Email support@safenet-Inc.com United states Telephone | (800) 545-6608, (410) 931-7520 E-mail support@satenet-Inc.com France Telephone | 0825 341000 Germany Telephone | 01803 7246269 United Kingdom Telephone | +44 (0) 1276 608000, +1 410 931-7520 (intl) E-mail support@satenet-Inc.com ‘Australia and New Zealand Telephone | +1 410 931-7520(int)) China Telephone | (86) 108851 9191 India Telephone | +1 410 931-7520 (Intl) Taiwan and Southeast Asia Telephone | (886) 2 27353736, +1 410 931-7520 (intl) Export Considerations ‘We oller products that are based on encryption technology. The Bureau of Industry and Security (BIS) in the US. Department of Commerce adminis- ters the export controls on our commercial encryption products. oa ‘Sentinal SuperPro 6.5 Developer's Guide Preface Rules governing exports of eneryption can be found in the Export Adminis tration Regulations (EAR), 15 CFR Parts 730-774, which implements the Export Administration Act ("EAA’ 50 US.C. App. 2401 et sea.) Important Note: BIS requires that each entity exporting products be famil- iar with and comply with their obligations described in the Export Administration Regulations, Please note that the regulations are subject to change. We recommend that you obtain your own legal advice when attempting (o export any product that uses encryption. In addition, some countries may restrict certain levels of encryption imported into their coun- try, We recommend consulting legal counsel in the appropriate country or the applicable governmental agencies in the particular country. We Welcome Your Comments ‘To help us improve future versions of documentation, we want fo know about any corrections, clarifications or farther information you would find useful. When you contact us, please include the following information: = The title and version of the guide you are referring to m= The version of the software you are using = Your name, company name, job title, phone number and e-mail address Send use-mall at techpubs@safenet-inc.com ‘Thank you for your feedback. Keep in mind that these e-mails are only for documentation feedback. Ifyou have a technical question. please contact Technical Support (see “Contacting Technical Support” on page xxi) Sentinel supertro 6.5 Developer's Guide x! Preface xiv ‘Sentinal SuperPro 6.5 Developer's Guide Chapter 1 What Is Sentinel SuperPro? In this chapter we will assess how software piracy threatens your profits and understand how Sentinel SuperPro can curb widespread piracy and add value (o your sofiware distribution. Software Piracy Affects Your Business Software piracy hurts the bottom-line of your business. Every share of revenue is lost due to piracy—afl and development prospects. cara huge {ing your profits and research Software piracy can occur in many forms, varying from malicious counter feiting (o violation of the license agreement by users who may be unaware they are doing so (for example, too many clients using the application at one time, unreported installations and exchange of sofiware disks among peers) Software protection not only effectively secures against piracy but can also enhance product versatility with flexible licensing models. You ca avenues for distributing your applications and ultimately improve return-on- investment. Moreover, software protection must be simple to implement so your schedules are not burdened with lengthy training and programming, time. Read on to learn how Sentinel SuperPro can do all this and much more! Sentinel Superero 6.5 Developer's Guide 1 Chapter 1 - What Is Sentinel SuperPro? Sentinel SuperPro For Marketing Success Sentinel SuperPro is the most popular hardware key from the family of Sen- tinel keys that protect your applications from una thorized use. You can use Sentinel SuperPro for preventing software piracy and boosting revenue by increasing the availability of your software to new marketing segments—that might be interested in buying selective/full features of your software at attractive prices, Using Sentinel SuperPro, you can: = Distribute your application without being concerned about the licensing violations, such as the number of users exceeding the number oflicenses bought, unauthoriz stallations, and so on. m Sell date-limited and feature-limited software for increasing the product usage/trial rate among the potential customs m Protect multiple applications and modules with a single key. Provide stand-alone and network licensing to customers with small seups or large enterprises. m Activate and renew applications/features, increase demo limits, and convert demos fo full versions remotely. Note: What isa license? A license authorizes a user to access your application using the key. It rep- resents the license agreement between you and your customer. Sentinel SuperPro ensures that the terms and conditions agreed upon by both the Parties (whether the application will stop running after a specific number Of days, itcan only run on a specific computer, and so on) are met. Sentinel SuperPro 6.5 Developer's Guide ‘Chapter 1 - What Is Sentinel SuperPro? How Sentinel SuperPro Protects Your Software Atits most basic, Sentinel SuperPro protects your software through a serles of steps known as a software lock. Each software lock is a call to an API func- tion that verifies the presence of the hardware key to succeed. 1. Your application calls the Sentinel System Driver, which communi- cates with the hardware key attached to an external port on the user's computer, sending a query string to an algorithm. 2. The key returns a response to the driver, which communicates back to your application. ‘cordingly. 3. Your application evaluates the response and acts ‘An invalid response indicates the correct key is not attached or has been tampered with. Your application then terminates or displays a warning message. Software can be illegally copied, but it will not run. Frotected tion Aten ct ‘tps eplenton ie sh irae mare on tesleaon teint es orp a ering Sentinel Driver Key generates a cen inser see Spee! meee herdemetoy: Wi rece Response ‘ode utente the ive How the Key Handles Application Calls Sentinel superrro 6.5 Developer's Guide 3 Chapter 1 - What Is Sentinel SuperPro? When a Sentinel SuperPro-protected application is used on a network, soft- ware locks (see page 3) are performed across the network only after a license has been obtained, 1, Your application sends a call to find a hardware key and obtain a 6. Note: license. If the key is found on the user's local system. software locks are perlormed as explained on page 3. Ifa key is not found on the user's system, the application sends a broadcast message to the network to locate a Sentinel Protection Once found, the server queries the Sentinel System Driver to obtain the license limit from a hardware key attached (o an external port on the server. ‘The driver reads the license limit in the key and returns it back to the server, ‘The server decides whether or not to grant the license and then the license information to your application, ends Afier obtaining the license, your application sends periodic “heart beat” messages to maintain the license. Failure to send a heartbeat message releases the license and returns an error to the application. - Software locks are performed as required by your application, using, the license as perm! sion to communicate with the key. When all software locks are complete, the application releases the license back to the key through the server, allowing the license to be obtained by another client. ‘The above procedure assumes use of the default accass mode: RNBO_SPN_ALL_ MODES. You can change how Sentinel Super?ro obtains a license by changing the access mode. See “Setting the Access Mode” on page 103 for more Information. ‘Sentinel SuperPro 6.5 Developer's Guide ‘Chapter 1 - What Is Sentinel SuperPro? Client Server — ‘minagetocng or How an Application Obtains a License over the Network Note: Shell NOT supported on Linux ‘The Automatic Protection Type of Sentinel SuperPro Is not supported on Linux. If you are a Linux user please refer to Chapter 16 “Features for Linux Distribution” on page 359 of this Guide. Protection Types Sentinel SuperPro offers you two methods for protecting your application: integrated or automatic, When and where the sofiware locks are implemented depends on the type of protection being used. m= Integrated: Integrated protection consists of software locks (API function calls) added directly to your source code. Itis used to create a custom protection strategy, with control over the amount and location of software locks. Sentinel superrro 6.5 Developer's Guide 5 Chapter 1 - What Is Sentinel SuperPro? ‘The frequency of software locks within your application, and the action taken ifno key is found, is left up to you. The more locks you add to your application, the more difficult it will be for potential hack- ets to break your application's protection. Because you must understand the API function calls used to support the protection strategy you have designed, and manually add them to your code, using integrated protection may take longer. m= Automatic: Automatic (shelled) protection is the fastest and easiest method of protecting your applications with Sentinel SuperPro. Instead of adding software locks to your source cod “shell!” is automatically added to your application's that the sofiware lock is called before the application hardware key Is not present, the user sees an error mes application does not run. ‘The Shell provides automatic and faster protection. Itis eaps protecting against debugging, disassembling, reverse-engineering, and memory dumping attacks. Also, while the application is running, the shell periodically checks to verify the hardware key is still attached—iffat any time the key is miss- ing the application throws an error. a protective executable file, so arts—if the age and the le for Automatic protection also gives you more control over demo options such asexpiration dates, counters and time/date limits. For more details, see “About Shell Protection” on page 7 and “Provid- ing Advanced Security Settings” on page 167. Note: The automatic protection option, is not supported on Linux. |The methed in which protective wrappers are put around the application qulekly and e 6 ‘Sentinel SuperPro 6.5 Developer's Guide ‘Chapter 1 - What Is Sentinel SuperPro? About Shell Protection In Shell, protective wrappers are put around your application that guard it from unauthorized access. Shell encrypts your original application and will deny access unless the correct Sentinel Key is always present and all the licensing conditions are met. ‘The Shell has multi-layer architecture. The previous layer, if executed stuc- cessfully, only will decrypt the suecessive layer. Muldple lavers provide extra protection to your application—similar to what multiple locks provide to your door. Breaking them require additional resources, time, and skill that could potentially deter hacking attacks. Further, due to the random pattern of the layers, no two Shell implementations are same, Unprotected ‘Application Protected Application Shell Protection in Action Sentinel superrro 6.5 Developer's Guide 7 Chapter 1 - What Is Sentinel SuperPro? Shell also provides the following security options that you can choose while adding a Shell feature : m= Multi-layered Protection ‘The Shell provides multi-layered protection. Since the joint between an application and the Shell layers is vulnerable to attacks, you can choose the number of layers the Shell uses to protect your application, from level 1 to 5. Level 1 provides reasonable protection and level 5 provides the most protection. However, with each level of protection added, the size of the application and the time it takes to start up also increases. By default, level 3 multi-layering is used. ‘The Shell is capable of detecting the debuggers, like SoftICE and OllyDbg. [t can also provide reasonable protection against break- points targeted at important functions. You can choose to deny application execution in the presence of debuggers. The protected application will exit Ifa debugger Is detected on a system. Non- malicious users will close the debugger and start the application again. Otherwise, you may even allow your application to run in the presence of debugger m= Anti-reverse Engineering Protection Using the Shell SDK module, you can protect your important code fragments, strings, and constants for Visual C, Visual BASIC, and Delphi. Refer (o the readme available under the \Tools\Shell SDK folder for more detail = Anti-dumping Protection Shell provides protection against a memory dump of the protected application, You need to select the Hide import symbols check box (under the Security tab of Add/Edit Shell Feature dialog box) to enable this added protection. m= Anti-disassembling Protection AShell-protected application is difficult to disassemble due to the use of expert techniques. like Maze technology and dummy macros. 8 Sentinel SuperPro 6.5 Developer's Guide ‘Chapter 1 - What Is Sentinel SuperPro? m= Enhanced security for NET applications ‘The new multi-layer shell protects its own code ag; and debugging, Shell also supports NET DLL. sembling ‘upport for Terminal Client The Shell provides support for Terminal Client using the RNBOsproCheckTerminalService APT. The function allows you to enable/disable application execution on terminal clients while RNBOsprotindFirstUnit, or RNBOsproFindNextUnit API is executed, An option to allow terminal service is provided on the Toolkit and this, selected option is considered during runtime. Note: To support shelling on Terminal client, RNBOsprocheckTerminalService APL vill always be called with an OFF flag during shelling, and will not be dependent on the option selection on Toolkit. When to Use Shell? ‘The Shellis a popular method of protecting 32-bil Windows executables and DLLs because: am Iis extremely easy (o implement. People with no-programming experience can use It without any hassles. tm Itdoes not require source code of your application. Tcallowss implementing the most-popular licensing models in just a few clicks. For more information, refer to “Providing Advanced Security Set- tings” on page 167. Sentinel Superero 6.5 Developer's Guide 9 Chapter 1 - What Is Sentinel SuperPro? Sentinel SuperPro Features and Benefits m= Supported Key Type The Sentinel SuperPro 6.5 Toolkit provides the facility to design and program the SuperPro and SuperPro XM keys. It enables the devel oper to design a strategy of up to the maximum key size (256) that is supported by the Toolkit (available only in case of SuperPro XM keys = Customizable Protection several different types of both One key can be programmed to provi jonsin the types fixed and variable responses, giving you many van of software locks you can create. For example, cells can be used to store fixed user data, such as serial numbers, user names or codes controlling feature access. Such data can be read by your application to verily the key is still attached or to perform some other function. You can also use stored data to control program flow or application functions. Cells can also store algorithms used to scramble query codes sent by your application. Other cells can be programmed as counters used to restrict the number of executions. While some memory cells are reserved for SafeNet use, most are fully programmable by you the developer. See the table below for the reserved memory ranges and available memory for various types of keys Key TypelKey Size Reserved for | Available for Cus- SafeNet's use ‘SuperPro (64 cells) First 8 56 SuperPro XM (256 cells) | First 8 &last 16= | 232 24 Note: In SuperPro XM keys, the last 16 cells apart from the 8 reserved for system information are also reserved for SafeNet's usage. Sentinel SuperPro 6.5 Developer's Guide ‘Chapter 1 - What Is Sentinel SuperPro? = Password Protect 2 The ability to program Sentinel SuperPro hardware keys is protected by three passwords: the Write Password and two Overwrite Passwords. ‘The Write Password allows you to write to undefined cells and read/ write data words. The two Overwrite Passwords allow you to write to all other non-restricted cells: read-only data words, counters and algorithm words. ‘You must have your passwords to program keys through the SSP ‘Toolkit or the Make Keys Utility. You must also include the passwords in your protected application to reprogram cells in the field or use some API function calls. Passwords ensure only authorized users can change your protection strategy or program keys m= Field Exchange Capabi Shipping your protected application and its corresponding key(s) to customersin the field doesn't end your control over the key and your software, With Sentinel SuperPro, you can perform a number of fune- tions on keys already in the field, including activating and updating product, setting or clearing bits, and incrementing or decrementing counters, Field exchange enables you to ship your application in an unusable state, and provide a means for legitimate users to activate it. The acti- vation process is protected by encryption algorithms and passwords pre-programmed into the key. This same process also allows you to support field upgrades and control feature ace = Demo Application Control Ifyou provide demo or trial versions of your applications to your cus- tomers, you may want those applications to run only a set number of times, of you may want to define an expiration date, Sentinel Super- Pro gives you demo application control through the use of counters. time limits and expiration dates. Sentinel Supertro 6.5 Developer's Guide " Chapter 1 - What Is Sentinel SuperPro? = Multiple Applications Per Key With Sentinel SuperPro, you can protect many applications on a sin- gle hardware key (Limited only by the number of empty memory cells, available). In each protection st certain cells in the key are assigned to each application. Each application can then query the key ing algorithms. Thus, your users can run several protected applic ons with a single hardware key attached. ‘The number of applications you can assign toa single key is depen- dent on how complex your protection strategy is. More complicated strategies require more memory cells, resulting in fewer cells available for other protected applications. = Enforce License Sharing A significant addition to Sentinel SuperPro 6.5 is its ability to enforce concurrent licensing sharing. It allows a user running multiple instances of a protected application on a single computer to consume asingle license, ‘The number of available licenses is determined by the hard limit pro- grammed into the key. or through the usc of sublicensing per application = Sublicensing Sublicensing is useful when you want to apply a license limit to a spe- cific feature of the protected application. If you have specified a user mit in your protection strategy, you can allow sharing the sub- licenses issued on the basis of a combination of User Name and MAC Address(ie. a seat), so that ifa request for accessing that feature of the protected application comes more than once from the same seat, then no extra license is consumed. You can program up to 232 separate sublicense license limits in each, key—each sublicense is a custom element occupying a single cell on the hardware key. The total number of sublicense limits you can pro- gram is dependent on the number of cells being used by other el ments of your strategy. Sentinel SuperPro 6.5 Developer's Guide ‘Chapter 1 - What Is Sentinel SuperPro? = Local or Network Access Using the Sentinel SuperPro APT, you can configure your application to run on a non-networked (stand-alone) system with a key directly attached, on a network using a license obtained from a key attached toa server. oron cither a stand-alone system or a network, depending, on how the application is being used, = Multiple Key and Server Support Up to 10 keys can be connected (o USB or parallel ports on the same server; up to five parallel port keys can be attached to the same paral- lel port. There is no limit to the maximum number of servers you can have on the network. ‘Thus, the network's total concurrent license limit is the sum of all the limits in all keys attached to ll servers. Ifa user attempt protected application (assuming the application is running in the default RNBO_SPN_ALL_MODES—see page 104), and the first server has reached its license limit, Sentinel SuperPro automatically checks the first key on another server for an available license. Use of multiple servers helps avoid a single point of failure. ‘The server can disconnect a user. and release the license for use by other users, after a pre-determined amount of time has elapsed with- out a Sentinel SuperPro query or heartbeat message. This helps pre- vent idle users from tying up licenses, and permits recovery of licenses used by aborted programs or workstations that are unexpectedly dis- connected from the network, Sentinel Supertro 6.5 Developer's Guide 13 Chapter 1 - What Is Sentinel SuperPro? Warning! Your developer ID and passwords control access to your hardware key—do not lose them. Ifyou do, you will need to return the key to SafeNot inc. for @ replacement. Also, to prevent unauthorized uso of the key, be sure to keep the password document secure! Sentinel SuperPro Components ‘The Sentinel SuperPro system is made up of five component m= The hardware key ‘The Sentinel SuperPro Developer's Toolkit ‘The Sentinel Super?ro API ‘The Sentinel System Driver m= The Sentinel Protection Server Each of these components is explained in the following sections. The Hardware Key The Sentinel SuperPro hardware key is a programmable, read/write mem- ory device that provides the responses necessary to unlock your application. ‘The hardware key is the heart of your application protection strategy ‘To implement a protection scheme, you program your application to send to the hardware key to verify its presence. Ifthe correct hardware key is attached to the user'ssystem or available on the network, itresponds to your application's calls with the appropriate responses, allowing the user access to your application. ‘The developer configurable memory cells can be programmed with algo- rithms, data values to provide fixed responses, or to serve as counters. Fach key also contains internal logic that transforms data based on encryption strings you define. Sentinel SuperPro 6.5 Developer's Guide ‘Chapter 1 - What Is Sentinel SuperPro? Network Keys v. Stand-alone Keys ‘There are two types of Sentinel SuperPro hardware keys: network and stand- alon m The network key allows multiple network clients to access a protected application using a single hardware key. Network keys, which are typically connected to servers on the network (see page 17), are programmed at the factory with a hard limit The hard limit defines the maximum number of licenses that can be obtained from the key, and thus the maximum number of users (both local and across the network) that can access the protected application. Keys are available with the following pre-programmed hard limits: 1, 2 3,5, 10, 25, 50 or unlimited is typically connected directly to a user's local station, providing access to the protected application only on a single system. All standalone clients consume one license. Product Keys v. Distributor Keys Prior to shipping your application to your customers, you must program your hardware keys with your protection strategy. A hardware key can be programmed as either a product key or a distributor ke = Product keys are shipped to your end users with your protected application, providing access to the application. Product keys may be either stand-alone or network keys, depending on how your application will be used (by single clients or across the network). Distributor keys are given to your sales distributors, allowing them to perform activation and update functions on product keys provided to end users when they sell your protected application. Distributor keys can be cither stand-alone or network keys: they must be connected to the distributor's local machine. SafeNet customizes Sentinel SuperPro hardware keys for each developer. which means another developer cannot reprogram your keys. Sentinel Superero 6.5 Developer's Guide 15 Chapter 1 - What Is Sentinel SuperPro? Tip: Refer to Chapter 10, “Programming Keys,” on page 233 for more Informa- tion about programming product and distributor keys. For more information about how keys are activated and updated, refer to Chapter 12, “Activating and Updating Keys,” on page 265. The Sentinel SuperPro API The Sentinel SuperPro API is a set of functions used to communicate between your application, the Sentinel system driver, the server and the hardware key. I'you choose to use the integrated protection option (see page 5), you embed API fanction calls to communicate with the hardware key directly in your application's source code. The Sentinel SuperPro Developer's Toolkit The Sentinel SuperPro Developer's Toolkit (SSP Toolkit) isa Windows appli- cation that combines the functions necessary to develop your protection and ship a protected application into Once you have developed and prototyped your protection strategy using the SSP Toolkit, a protection plan with pseudocode is generated for you to use as ‘a guide for adding the appropriate API function calls to your source code. Afier you have modified your source code, or shelled your application (see page 7), you are ready to use the SSP ‘Toolkit to program your hardware keys with the values your application will use to determine whether or not the key is attached to the user's system or the server. The Sentinel System Driver Sentinel system driver is the device driver for using the hardware keys. It ‘must be redistributed with any SuperPro protected application, regardless of the strategy chosen. In addition, the Sentinel driver must be installed on the system where the hardware key Is attached. = For standalone applications, the driver must be installed on the same system as the protected application. Sentinel SuperPro 6.5 Developer's Guide ‘Chapter 1 - What Is Sentinel SuperPro? m= For networked applications, the Sentinel driver must be installed on the system in the network where the hardware key is attached. The Sentinel Protection Server Ifyou design your protected application to be run on a network using con- current licensing, your customer must install the Sentinel Protection Server on the same machine where the hardware key is located. This server man- ages licensing and security for the protected application. The server is the link between the client running your application and the hardware key that responds to the API functions used in your protection strategy. Sentinel Superero 6.5 Developer's Guide 7 Chapter 1 - What Is Sentinel SuperPro? 18 Sentinel SuperPro 6.5 Developer's Guide Chapter 2 Using the Hardware Key The hardware key is the heart of Sentinel SuperPro protection, The key con- trols and verifles access to your protected applications, assuring that only authorized users can run them, Before you begin designing your protection strategy, however, you should understand how the key works, and how it can be used, This chapter covers the following topics: = Physical key layout Possible u s for the key Reserved cells Access codes: Cell values Cell types Algorithm values and addresses Ordering and returning keys Sentinel Superero 6.5 Developer's Guide 19 Chapter 2 - Using the Hardware Key Getting to Know the Key 20 Every Sentinel SuperPro key contains 128 bytes of memory, organized as 64 cells (words) of 16 bits each. Cellsare addressed as locations 0 through 3F hex Reserved Calls fos [09 [oa fos foc [op |or | oF Sr a EE a ‘SuperPro 30 31 32 33 34 35 36 37 Keys Sentinel SuperPro Key Memory Cell Layout Every SuperPro XM key contains 512 bytes of memory, organized as 256 cells (or words) of 16 bits each. Cells are addressed as locations 00 to FF with cells 00 to 08 and FO to FF reserved for use by SafeNet, and the rest are free for your use, tesenes sa | ae [0 |oa [os [ac [oo | of oF ~ [1 [2 pa [™ ps lw [a avowe] Fe [is pia [ie pe fe Col 20 | 21 22 23 24 25 26 27 super suave] 3g [ae [2a [aa [2c [a [ae [aF Ee ES] ze [3 [3a [3 [se [90 [3k [3 ‘Sentinel SuperPro 6.5 Developer's Guide Chapter 2 - Using the Hardware Key ta ya [a [ax [ar [as [as | a7 az [a9 [aa ap fac [4D | ae | aF so |s1 |s2 [53 |sa |ss |s6 | s7 sa [sa [sa [se [sc |so | se | 5F so je [a2 (es [ea |os |oes | a7 6s [6 [6a [68 [sc [oo [oe | oF 7 [7 | [7 | |r |r |7 7 [79 [7 [7a |7c [7 |v | 7 so fer |e (ss [sa [as |es | a7 as [ao | aa [es [ec [a> | se | oF go fet [a (9s [oa [os [os |o7 9s foo [oa [oa foc [oo [or | oF ao [ar [a2 [as fas [as [as | Az as [ao [aa [aa fac [aD | AE | AF feo [er [a2 [es fer [es |ee | ar ps feo [BA (eB |sc |so | ee | BF o ja [a [a fa [os fo fa wile [a [ee [cc jo le |e po [or [oz [oz [oa |os |os | o7 ps [os [oa [os |oc |oo |oe | oF co jer [ez [es les les jes | e7 res [eo [ea [es [ec [eD [ee | EF Extra reserved Cells for SuperPro XM keys Sentinel Superero 6.5 Developer's Guide 21 Chapter 2 - Using the Hardware Key Tip: Think of a call as boing a holding container (memory location) for the words that make up your algorithms, counters and other elements. Cells have addresses that represent their location on the key, much like street addresses represent the location of houses in a neighborhood. SuperPro XM - Maxi SuperPro XM keys provide an additional algorithm engine that uses indus- try standard AES (Advanced Encryption Standard) encryption to generate unique query responses. A proprietary algorithm is used (o generate a 128- bit AES key that is derived from the algorithm descriptor and other developer specific information within the key. This results in an extreme! query/response mechanism. es Application Security In addition to the AES based algorithm engine, SuperPro XM keys provide the following = 256 memory cells which give you the room to protect more applications m= Protection Passwords inst brute force attacks of the Write and Overwrite Note: In SSP XM key, the password counter is enabled. If someone uses wrong password while writing to a cell for more than 15 times, the key gets locked. The key must be returned to SafeNet for unlocking. 2 Sentinel SuperPro 6.5 Developer's Guide Chapter 2 - Using the Hardware Key When you program a cell, you assign it various attributes. These attributes determine how the cell (and the word it contains) is used by your applica tion. Cell attributes include the cel! type, the access code and the cell value Each of these attributes are explained later in this chapter. Generally, each cell contains one of the following types of words: Data Words: A data word can store data such as sublicenses, customer information, serial numbers, passwords, and check digits. You code your application to read the word and then evaluate and act upon the stored value. A data word cell may be programmed as read- only or read/write, = Counter Words: A counter word contains an initial value you set that is then decremented by your application. A typical use of a counter word is to limit the number of times a demo application ean be executed. = Algorithms: An algorithm contains a bit pattern that defines how the hardware key should encrypt query data sent by your application. ‘The key uses the algorithm cell value—plus an internally stored proprietary algorithm —to transform the query data and then return value (o your application. You design your application to send queries to the key and then evaluate and act upon the responses Algorithms are active or inactive. Only active algorithms can return a valid response to a query. The active/inactive bitin the cell valuc con~ trols whether or not the algorithm is active. "Algorithm Values” on page 35 Additionally, all algorithms are two words (and thus. two cells) long, and may have activation passwords and counters associated with them (see “Valid Algorithm Addresses” on page 37). Sentinel Supertro 6.5 Developer's Guide 2B Chapter 2 - Using the Hardware Key Restricted Cells Cells 00 through 07 in SuperPro key are restricted cells that contain fixed, preprogrammed system information: 00 Key serial number, sequentially assigned per | Yes key?) on Developer ID; unique to your companyiproduct. | Yes (02-07 | Reserved for use by Safenet inc. No 2. Maximum 16-bit value (0 — 65535). Serial numbers are not guaran teed to be unique. if you require unique serial numbers, please con- tact your SafeNet sales representative, as SateNet must program the keys Cells 00 through 07 in SuperPro XM key are restricted cells that contain fixed. preprogrammed system information and cells FO through FF are also reserved for use by SaleNet: EE ec 00] Key sell number sequently asigned per [ves key? 01 [ Beveopa 1; unkue to your companyiproduct_| es 02-07 | Reserved for se by sae nc wo 70-FF | Reserved forse Set nc Wo a. Maximum 16-bit value (0 ~ 65535), Serial numbers ae not guaran teed to be unique. f you require unique serial numbers, please con- tact your SafeNet sales representative, as SafeNet must program the keys. Programmable Cells Cells 08 through 3P are available for you (o program in SuperPro Key, while the SuperPro XM key provides you with a vast cell range to program i m4 ‘Sentinel SuperPro 6.5 Developer's Guide Chapter 2 - Using the Hardware Key from 08 through EE The next section explains in detail how to program these cells in the key. Programming the Key When you program the key. you are actually assigning attributes to the cells. ‘These attributes describe how the words contained in the cells are used to pro- tect your application. There are three cell attributes: cell type, access code and cell value. Each of these attributes are explained in the following sections. Access Codes Every cell has an access code associated with it that controls how the cell can be used by your application—it defines the cell's cel type attribute. For example, some cell types have an access code that permits cell values to be both read and overwritten, while others are read-only, or not writable at all Access codes are numbers whose value can be 0 3 of 7. Both SuperPro and SuperPro XM supports access codes in the 0 - 3 range. However, access code 7 is only valid on SuperPro XM key: When you define an element using the SSP Toolkit’s Element Definition Wiz- ard, you do not assign the cell access codes. The access codes are determined by the wizard, based on the protection feature you are implementing. If your application programs or reprograms cells in the field, it ust specify the new access code. Sentinel Superero 6.5 Developer's Guide 2 Chapter 2 - Using the Hardware Key 26 ‘The following table describes the five available access codes: 0 _| Readiwrite data word Your application can read the word in the cell and, if the Write Password Is supplied, modity Its contents. 1 _| Read-only (locked) data word Your application can read the word in the cell, but cannot change it, without the Overwrite Passwords. 2 | Counter word ‘The cell contains a word (value) that your application can decrement Using the Write Password. The cell's value cannot be changed (other than by decrementing it) without the Overwrite Passwords. 3 _| Locked and hiddenialgorithm word Your application cannot read the cell’s value. Modification requires the Overwrite Passwords. The cell value (contents) is hidden (unreadable). 7 | AES Algorithm Engine ‘Access code 7 is used for AES algorithm words and is exclusive to the ‘SuperPro XM key. Similar to access code 3, your application cannot read the cell's value, Modification requires the Overwrite Passwords, even If the coll is unlocked (access code 0). Cell Types ssigned a code that defines how you want to use the selected cell. This code is called a cell type. The cell type classifies the type of data stored in the cell, which in turn affects how the cell can be used. Each cell type is identified by a two-letter abbreviation; for example, CW. Identifies a counter word. Some cell types are designed to be used in groups. For example, algorithms can have counters and passwords associated with them. Other cell types have address restrictions, meaning they can be assigned only to specific cells on the key, ‘Sentinel SuperPro 6.5 Developer's Guide Chapter 2 - Using the Hardware Key ‘The following table describes the available cell types, with the following sec- tions explaining each cell type in greater detail. = 0 Undefined AA 37 ‘Active Algorithm AH 7 Algorithm Half AP M7 ‘Activation Password «A 2 ‘Algorithm Counter Word ow. 2 Counter Word DI 1 Developer ID OL 1 Locked Data Word Dw 0 Data Word a Ea Inactive Algorithm RW. wT Reserved Word sn | 1 _| Serial Number Undefined (**) The Undefined cell type is used to identify a cell that has not yet been pro- grammed or is not used in your protection strategy. This cell type is identified by two asterisks (*) Cells you don’t need for your protection strategy can be left undefined. How- ever, you may want to program unused cells as read-only data words or algorithm/hidden words. It prevents them from being written to without both the write and overwrite passwords. Hackers can use an unlocked data word {o try to figure out the write password. Making unused cells read-only oralgorithm/hidden words helps to prevent these type of brute force attacks on the write password. Tip: Undefined cells can also be programmed with random values to make your strategy mare confusing for hackers. See "Programming a Product Key” on Sentinel Supertro 6.5 Developer's Guide 2 Chapter 2 - Using the Hardware Key 28 page 237 for more information. Access Code An Undefined cell has an access code of 0 — read/write data. Valid Addresses For the SuperPro key. any unrestricted cell in the range O8 - 3F can be class!- fied as undefined. In the case of SuperPro XM key, the rule is the same except the range is 08 -F Active Algorithm (AA) ‘The Active Algorithm (AA) cell type defines an active (enabled) algorithm. An algorithm consists of two adjacent AA cells (words) with access codes of 3 or 7. The values in these cells affect the way query data is encrypted vi the RNBOsproQuery() API function. An algorithm must be active for itto relurn a valid response (o a query. The value in the second AA cell must be between 8000 and FFFP. See “Algo- rithm Values” on page 35 for more information. AA cells ean have a password and counter(s) associated with them, Access Code An AA cell hasan access code of 3 or 7 ~algorithm/hidden, Valid Addresses ‘The first AA word must be in a cell located at an unrestricted, even address. Additional restrictions apply ifa counter and/or password is associated with the algorithm. See “Valid Algorithm Addresses” on page 37 for more information. Algorithm Half (AH) The Algorithm Half (AH) cell type can be used for each of the two cells: required for an algorithm. The algorithm created by two AH cellsis basically Sentinel SuperPro 6.5 Developer's Guide Chapter 2 - Using the Hardware Key the same as that created by (wo AA or LA cells; the dilference is that you can program the descriptor in two steps, which may be useful in some protection schemes. ‘The value in the second AH cell must be between: = 0000 to 7FFP for a disabled algorithm, m= 8000 to BFFP for an enabled simple algorithm = C000 to FFFF for an enabled enhanced algorithm 8000 to FFF for an enabled AES algorithm (access code must be 7) See “Algorithm Values” on page 35 for more information, Al cells can have a password and counter(s) associated with them. Not Use of the AH cell type requires a thorough understanding of algorithms. Consider using the AA and IA cell types instead. Access Code An AH cell has an access code of 3 or 7 (SuperPro XM only) ~ algorithm/ hidden, Valid Addresses An AH word can be located in any unrestricted cell 08 — 3F for Super Pro keys and 08-EF for SuperPro XM Keys. You must leave an adjacent cell vacant for the other half of the algorithm. Also, the first AH word of the pair must be located in an even-numbered cell. Additional restrictions apply if'a counter and/or password is associated with the algorithm. See “Valid Algorithm Addresses” on page 37 for more information. Activation Password (AP) ‘The Activation Password (AP) cell type is used to activate an inactive algo- rithm so it can be used for queries. This allows activation, via a password, of Sentinel Superero 6.5 Developer's Guide 2 Chapter 2 - Using the Hardware Key 30 an algorithm at a customer's site, For detailed instructions on using activa- tion passwords, see “Using Activation Passwords” on page 79. ‘The AP cell type must be two cells long and must immediately follow the algorithm it activates. Access Code An AP cell has an access code of 3 — algorithm/hidden. It cannot be directly read of written to; ts value is used only to verify a user-supplied password during execution of the RNBOsproActiveAlgorithm() API function. Because an AP cell has an access code of 3, it can also be used as an algo- rithm, See “Querying Activation Passwords” on page 91 for more information. Valid Addresses An AP cell must be located immediately after a two-word algorithm (cell type AA, AH or A). Additional restrictions apply if counter is also associated with the algo- rithm, Sec “Valid Algorithm Addresses” on page 37 for more information, Algorithm Counter Word (CA) ‘The Algorithm Counter Word (CA) cell type defines a counter that deacti- vates an associated algorithm when the counter reaches zero. You program an initial value into the counter, then decrement it using the RNBOsproDec- rement() API function. The CA cell must immediately precede the algorithm it deactivates. ‘Thus, this cell type can be used to control the number of times an applica- tion can be executed. See “Controlling Demo Applications” on page 94 for ‘more information, Optionally, you can associate two counters (Iwo CA cells) with one algo- rithm. In this case, the first counter (o reach zero deactivates the algorithm. I desired. you could use the second counter after the algorithm is re- vated with a password. Sentinel SuperPro 6.5 Developer's Guide Chapter 2 - Using the Hardware Key Access Code ACA cell has an access code of 2 ~ counter: It can be read, but cannot be written Lo except by the RNBOsproDecrement() or RNBOsproOverwrite() APL functions, Valid Addresses ACA cells always located immediately before a two-word algorithm (cell type AA, AH or IA). See “Valid Algorithm Addresses” on page 37 for more information. Counter Word (CW) The Counter Word (CW) cell type is used for a counter that is not used to deactivate an algorithm, You program an initial value Into the counter word, then decrement it using the RNBOsproDecrement() API function. You code your application to check the value in the counter and proceed accord- ingly ifthe value reaches zero. ACW cellis similar to a data word—itis used for storing data or keeping track of something such asa number of uses. Itis more restricted than a data word, however, because you cannot overwrite it without the Overwrite Passwords. You can decrement it with only the Write Password. One use of this cell type is to control specific functions within your applica- tion, For example, if you associate a counter with the Save button control, you can code the application so that when the counter reaches zero, the Save button will no longer be available, preventing the user from saving their work and making the application unusable in a practical Access Code ACW cell has an access code of 2 ~ counter. It can be read, but cannot be written Lo except by the RNBOsproDecrement() or RNBOsproOverwrite() APL functions. Sentinel Supertro 6.5 Developer's Guide 31 Chapter 2 - Using the Hardware Key 32 Valid Addresses Any unrestricted cell 08 — 3F for Super Pro keys and O8-EF for SuperPro XM Keys can be classified as a CW cell type. Warning! If you program a counter cell, and you use the next two cells for an algorithm, the counter will function as an algorithm counter. When ‘the counter reaches zero, the algorithm will be deactivated, even if you did not intend for that to happen. Developer ID (Dl) ‘The Developer ID (DI) cell type is used for cell 01 only. This cell holds a read- only data word that contains the unique developer ID assigned to you by SafeNet Inc. You cannot assign cell type DI to any other cell. Access Code ADI cell has an access code of 1 —locked. You can read the developer ID, but cannot change it. Valid Addresses ‘The only cell that can be defined as cell type Dlis cell O1 Locked Data Word (DL) The Locked Data Word (DL) cell type is used for data words you want your application to read, but not write to, such as sublicense cells. Access Code A Dl.cell has an access code of 1 —locked. After you program the cell, your application can read it, but cannot change it without the Overwrite Passwords. Sentinel SuperPro 6.5 Developer's Guide Chapter 2 - Using the Hardware Key Valid Addresses Any unrestricted cell 08 — 3F for Super Pro keys and O8-EF for SuperPro XM Keys can be classified as a DL cell type. Data Word (DW) ‘The Data Word (DW) cell type can store any value (data word) you want to use in your protection strategy. This value can be read and/or changed by your application. It can also be decremented. Access Code ADW eel has an access code of 0 read/write. It can be reprogrammed using the Write Password. Valid Addresses Any unrestricted cell 08 ~ 3F for Super Pro keys and O8-EF for SuperPro XM Keys can be classified as a DW cell type. Inactive Algorithm (IA) The Inactive Algorithm (IA) cell type defines an inactive (disabled) algorithm. An algorithm consists of two adjacent cells with access codes of 3 or 7 for SuperPro XM keys. The values in these cells affect the way an input string Is encrypted via the RNBOsproQuery() API function. An inactive algorithm cannot be used for a query until itis activated by the RNBOsproActivate() APT function, ‘The value in the second IA cell must be between 0000 and 7FFE See “Algo rithm Values” on page 35 for more information. TA cells should always have a password associated with them so the algo- rithm can be activated. They can also have one or two counters. Sentinel Superero 6.5 Developer's Guide 3B Chapter 2 - Using the Hardware Key 34 Access Code An IA cell has an access code of 3 or 7 for SuperPro XM keys — algorithm/ hidden, Valid Addresses ‘The first 1A cell must be at an unrestricted, even address. Additional restric- tions apply ifa counter and/or password is associated with the algorithm, “Valid Algorithm Addresses” on page 37 for more information. Reserved Word (RW) ‘The Reserved Word (RW) cell type is used for cells 05 through 07 only. These cells hold hidden words that are reserved for use by SafeNet Inc. You cannot assign cell type RW to any other cell. Access Code An RW cell has an access code of 3 ~algorithm/hidden. You cannot read or write to these cells, Valid Addresses ‘The only cells defined as type RW are cells 05, 06 and 07 in case of SuperPro Keys. However the SuperPro XM keys define 16 more cells from FO to FP as reserved cells apart from the cells 05, 06 and 07. Serial Number (SN) The Serial Number (SN) cell type is used for cell 00 only. This cell holds a read-only data word that contains the hardware key’s serial number. The value in this cell is preprogrammed and cannot be modified. You cannot assign cell type SN to any other cell, or overwrite the SN cell, Note: Serial numbers ranging from 0-65535 are assigned sequentially and are not guaranteed to be unique. If you require unique serial numbers, please contact your SafeNet Inc. sales representative, as SafeNet must program the keys. Sentinel SuperPro 6.5 Developer's Guide Chapter 2 - Using the Hardware Key Access Code An SN cell has an access code of 1 - locked. You can read the serial number but cannot modify the value in this cell. Valid Addresses ‘The only cell defined as type SN is cell 00 in both Super Pro and SuperPro XM keys, Cell Values Bach cell also has a cell value containing a 16-bit value. The cell value is known asa word. The value in the second cell of an algorithm controls whether or not the algorithm is active, and whether the enhanced algorithm engine Is enabled for the algorithm, See the next section for more information. Algorithm Values ‘There are special rules applied to the second cell of an algorithm. The word (value) in the second cell controls m1 Whether the algorithm is active or in can be used for queries. ce Only active algorithms a Whether the enhanced algorithm engine is enabled or disabled. The enhanced algorithm engine provides a more secure algorithm, The active/inactive state of an algorithm is controlled by bit 15 of the second word of the algorithm: f= If this bits 1, the algorithm i mI this bit is 0, the algorithm is ‘The state of the enhanced algorithm engine is ond word of the algorithm: controlled by bit 14 of the see~ this bit is 1, the enhanced engine is enabled. wm Ifthis bit is 0, the enhanced engine is disabled. Sentinel Superero 6.5 Developer's Guide 35 Chapter 2 - Using the Hardware Key Note: This bit 14 is not associated with the enhanced engine when the AES engine is being used (access code = 7) but just becomes part of the data like bits 13 to 0. ‘The following tables show how bits 14 and 15 of the second word control the algorithm. ‘Second Word of an Active Algorithm, with Enhanced Engine Enabled ofo;tio|tf/ofolojojajolj1jo ‘Second Word of an Inactive Algorithm, with Enhanced Engine Enabled 36 ‘Sentinel SuperPro 6.5 Developer's Guide Chapter 2 - Using the Hardware Key When you design your protection strategy. Sentinel SuperPro asks you if you want the algorithm to be active or inactive. The following table summarizes the effect of the value of the second word on the algorithm: Algorithm Inactive | 0000 - 3FFF 4000 — 7FFF (0000 — 7FFF Algorithm Active | 8000 — BFFF (c000— FFF 18000 - FFFF Note: AES algorithm can be activated only if SuperPro XM keys have bean selected on design time. For example, an algorithm with a second word of IFDC is inactive and has the enhanced engine disabled because it falls within the range of 0000 — 3FFF. An algorithm with a second word of D000 is active and has the enhanced engine enabled because it falls within the range of CO00 — FFFE, Note: For maximum security, use the AES algorithm engine in SuperPro XM keys. Valid Algorithm Addresses Certain cell types are designed to be used only in groups. ‘These cell types— Activation Passwords (AP) and Algorithm Counters (CA)— are used only in association with algorithms (cell types AA, AH and IA). Tip: While you are designing your protection strategy, the Element Definition Wizard only allows you to select valid, available addresses for your elements ‘You don't need to worry about these restrictions while you are adding ele- ments, but you should still be aware they exist ‘These groups of cells are restricted as to where they can be placed on the hardware key. The following combinations of algorithms, counters and passwords (known as custom elements) are supported: Sentinel Supertro 6.5 Developer's Guide 37 Chapter 2 - Using the Hardware Key m Algorithm (2 cells) = Algorithm with password (4 cells) m= Algorithm with counter (3 cells) Algorithm with two counters (4 cells) m Algorithm with password and counter (5 cells) m= Algorithm with password and two counters (6 cells) Tip: Remember, each word takes up one cell. So an algorithm with two counters uses four cells, because it has four words: two counters, plus the algorithm's ‘two words. Sentinel SuperPro automatically selects appropriate locations for your algo- rithms when you add a custom element in the Design stage. You also have the option to select the locations yourself in Element Layout View, but you are not allowed to place the algorithm in an invalid position. See Chapter 7. “Working With Design Elements,” on page 185 for more information about adding custom elements to your protection strategy, ‘The address restrictions for these cell groups are summarized in the follow- ing sections. In this discussion, an algorithm (identified by ALGO in the following tables) can be defined using AA, LA or AH cells, Note: MOD is used in the formula used to compute valid cell addresses. MOD is a ‘modulus arithmetic operator used to divide two numbers, resulting in the remainder of the division. For example, 8 MOD 3 equals 2 because 8/3 equals 2, with a remainder of 2. The remainder is the result of the MOD notation. 38 Sentinel SuperPro 6.5 Developer's Guide Chapter 2 - Using the Hardware Key How to Read the Tables in the Following Sections In the next sections, tables are used to show you the valid locations for each type of element. Use the following legend while reading these tables: ‘Algorithm Counter Algorithm A two-word algorithm that does not have a counter or password. It can start {in any unrestricted cell with an even address. A valid algorithm location can include SuperPro XM address locations also [oo Jor oz [esos os foe or Sentinel superrro 6.5 Developer's Guide 38 Chapter 2 - Using the Hardware Key 40 ‘Sentinel SuperPro 6.5 Developer's Guide Chapter 2 - Using the Hardware Key Algorithm with Password A two-word algorithm that has an activation password (AP). It must start in a cell with an address equal to 0 MOD 4. The two-word password must immediately follow. “Sentinel SuperPro 6.5 Developer's Guide 41 Chapter 2 - Using the Hardware Key ro [rr [2 [ra [ra [rs |e |r? re [Fo [FA [Fe [rc [FD | Fe | FF Diagram showing cell structure of a SuperPro XM key a2 ‘Sentinel SuperPro 6.5 Developer's Guide Chapter 2 - Using the Hardware Key Algorithm with Counter A two-word algorithm that has one counter (CA). The algorithm must start in a cell with an address equal to 4 MOD 8. The counter word must immedi- ately precede the algorithm. oo [oi [02 [03 |os [os |os |o7 08 [09 | ow OF OOF wo |" [a 6 |W 13 [19 | 1A 1e | F 2 [21 | 2 FEZ 2 [29 | 2A 2 oF 30 [ai | 2 36 | a7 38 [39 | 3A BEF Diagram showing cell structure of a SuperPro key 00 [or | o2 o7 os [o9 | oa oF wo |" | 7 we [1 [A F 2 [21 | 2 2 28 [29 | 2A F 30 [31 | 32 Ey 38 [30 | 3a 3F ao fat | aa a as [49 | aa aF so [si | 52 57 5a [59 | 5A oF 60 [61 | 62 67 63 [6 | 6a oF Sentinel superrro 6.5 Developer's Guide 4B Chapter 2 - Using the Hardware Key 7 [7 7 7 | 79 7F 80 | at a7 8 | 88 aF 80 [at 7 98 | 9 °F a0 | At Ar a8 | AS AF Bo | Bt 7 Bs | 89 oF o fa a oe le e bo | 01 7 ps | 09 OF fo | |e ee [6 eer ro [A jr [rs fre [es |e |e ra [ro [ra [re [rc [eo [fe | re Diagram showing cell structure of a SuperPro XM key ‘The relationship between a counter word and an adjacent algorithm exists even if you do not intentionally plan it. The algorithm will be deac! when the counter reaches zero. 6 ‘Sentinel SuperPro 6.5 Developer's Guide Chapter 2 - Using the Hardware Key Algorithm with Two Counters A two-word algorithm that has two counters (CA). The algorithm must start ina cell with an address equal to 4 MOD 8. The counter words must imme- diately precede the algorithm, oo [oi [02 [03 |os [os |os |o7 08 [09 OF OOF wo [Ht 6 |W 1s [19 1e | F ED FEZ 2 [29 2 oF 30 (| 31 36 | a7 33 [39 BEF Diagram showing cell structure of a SuperPro key Sentinel superrro 6.5 Developer's Guide 45 Chapter 2 - Using the Hardware Key 46 oo [or 08 | 08 0 | 8 [19 2 | 2 le 30 | 3 38 | 38 4 [at a [as 50 | 51 EME) 60 [at 68 | 69 7 [7 7s | 78 30 [at 8 | 89 (90 [91 33 | 98 a0 | At As | Ag (80 | 81 Bs | 89 co fc @ [3 bo [01 o7 oF 7 F 2 2 a7 3F a7 oF 37 SF 7 oF 7 7F oF 7 oF a7 AF 87 oF a € 7 ‘Sentinel SuperPro 6.5 Developer's Guide Chapter 2 - Using the Hardware Key Da [58 De | oF CG 6 |e es [eo fe | EF ro [et (f2 (ra fra [es |e | F7 ra [ro [fA [ra [rc [eo |Fe | FF Diagram showing cell structure of a SuperPro XM key Algorithm with Password and Counter A two-word algorithm that has both a counter (CA) and an activation pass- word (AP). The algorithm must start in a cell with an address equal to 4 MOD 8. The counter word must mediately precede the algorithm, and the two- word password must immediately follow it. 00 a 2 [03 [os [os [os or 08 09 A 10 1 2 18 19 1A 20 2 2 8 29 A 30 3 2 38 9 3A Sentinel Superero 6.5 Developer's Guide Diagram showing cell structure of a SuperPro key a Chapter 2 - Using the Hardware Key 48 00. a 08 10 1 8 19 20 a Ey 30 H 38 40 a 50 1 58 60 a 68 70 nm 78 at 88 20 on Ey AO At AS 80 Bo © a Do D1 ‘Sentinel SuperPro 6.5 Developer's Guide Chapter 2 - Using the Hardware Key Ds [D9 | eA eo je [2 es [eo [eA ro [et [f ([ra fra [es |e | Fr ra [ro [fA [ra [rc [eo |Fe | FF Diagram showing cell structure of a SuperPro XM key Algorithm with Password and Two Counters A two-word algorithm with two counters (CA) and an activation password (AP). The algorithm must start in a cell with an address equal to 4 MOD 8. ‘The counters must immediately precede the algorithm and the two-word password must immediately follow it. oo [oi [o2 [os [oa [os [os |or os [09 1 [1 | 19 2% | 21 2 [2 30 | 31 33 [38 Sentinel Superero 6.5 Developer's Guide Diagram showing cell structure of a SuperPro key Chapter 2 - Using the Hardware Key 50 00 [ot 08 | 08 0 | is | 79 2 [a 28 | 30| 31 38 | 39 40 [at a [48 50 | St 58 | 59 6 [et 8 | 68 7 [7 7 | 79 80 | at 8 | 88 0 [oT 8 [99 a0 [At as | AS bo | 81 a) o fa @ lo bo [01 ‘Sentinel SuperPro 6.5 Developer's Guide Chapter 2 - Using the Hardware Key pa | D9 0 | ei es | 69 ro jer |r2 irs |ra [rs | re | Fr re [ro [ra [re |rc |r> |Fe | FF Diagram showing cell structure of SuperPro XM key Sentinel Superero 6.5 Developer's Guide Chapter 2 - Using the Hardware Key Attaching the Sentinel SuperPro Hardware Key 52 Sentinel SuperPro comes with one hardware key for you to use while you are designing and implementing your application protection strategies. The key must be connected to your workstation while you run Sentinel SuperPro software. When you placed your order for Sentinel SuperPro, you should have speci- fied whether you wanted a network version, or a non-network version. ‘The type of key you receive—network or stand-alone—depends on the version of Sentinel SuperPro you ordered. Network keys can be identified by the phrase “SuperProNet” stamped into the plastic on one side of the key. Sentinel SuperPro hardware keys come in two form-factor: parallel port or USB. Again, the type you received in your package depends on what you specified when you placed your order. Parallel port keys (25-pin or 36-pin) connect to a parallel port located on the back of your computer. USB keys connect to a USB port located on the back or front of your computer or on a USB hub. Use the instructions in the appropriate following section to install your hardware key. Installing the Parallel Port Hardware Key ‘The Sentinel SuperPro key can be attached to any parallel port on your com- puter, as the Sentinel system driver automatically polls each port {0 locate the key. 1, Locate an available parallel port on your computer. Ifyour computer has only one parallel port, you may need to tempo- rarily remove any existing parallel port devices (such as a Zip drive or printer) in order to connect the key. These devices may be recon- nected to the key’s outside connector aficr you have installed the key. 2. Attach the key to the parallel port connector, 4 Ifyou are using a 25-pin key, we recommend you attach the key. directly (o the parallel port without using an extension cable Sentinel SuperPro 6.5 Developer's Guide Chapter 2 - Using the Hardware Key between the computer and the key. However, you may use a cable to connect a printer or other parallel device to the key; see below for ‘more information on using cables with the Sentinel SuperPro kes. Ifyou are using a 36-pin key, you may use a cable to connect the key to the computer, butdo not use an extension cable to connect a printer or other parallel device to the kev. 3. Tighten the screws to connect the key securely to the port, 4. necessary, reconnect any other parallel port devices to the outside connector on the kes: We recommend using a shielded printer cable if you are connecting a printer to your computer through the Sentinel SuperPro key. Using Cables with the Sentinel SuperPro Hardware Key Duc to the large variety of cables currently on the market, SafeNet Inc. does nol recommend a specific brand or type of cable for use with the Sentinel SuperPro key. nor do we guarantee that all cables will be compatible with the key. However, we do recommend the following: ‘= Cables should not be longer than 6 feet in length. = Cables should be shielded. Do not.use ribbon cables. . Cables must be straight-through: that Is, they must have all pin ignals wired through to the connectors on either end of the cable. Please be aware that not all combinations of cables and printers are compat- ible with the Sentinel SuperPro key—contact SafeNet Inc. Support if you encounter a compatibility problem Sentinel Superero 6.5 Developer's Guide 53 Chapter 2 - Using the Hardware Key 54 Connecting Multiple Parallel Port Keys Muluiple Sentinel SuperPro keys ean be attached to the same parallel port this is called cascading. Cascaded keys do not all need to have the same devel- oper ID, and network keys can be cascaded with stand-alone keys. ‘The number of keys that ean be led is dependent on the system they are attached to. Typically, up to five keys can be connected to the same port. Refer to your system's documentation for more information about attaching 'so your parallel port. Sentinel SuperPro keys can also be cascaded with other SafeNet Ine. keys that support cascading, Make sure the Sentinel SuperPro keys are the last keys in the chain (farthest from the computer), Warning! There is one exception to this rule. If you are cascading Sentinel SuperPro keys with SafeNet Inc.’s NetSentinel keys, the Sentinel SuperPro keys must be located before any NetSentinel keys in the chain, NetSentinel keys should be the last Keys In the chain. If sen- tinel SuperPro keys are located behind NetSentinel keys, they will not be recognized by the Sentinel system driver, and thus the protected application will not run. While Sentinel SuperPro keys can be cascaded with keys from other compa nies, this may cause compatibility issues and is not recommended. When your application attempts to establish communication with a key. it must specify the developer ID. The driver then locates the first key with this developer ID. The application can also ask for another key with the same developer ID ifthe first key is not desired for some reason. scan also be connected to up to three parallel ports on the same com- puter. For example, ifyou have three parallel ports on your computer. you could attach a separate key to each port simultaneously. The Sentinel sys- tem driver automatically polls all parallel (and USB) ports when looking for akey. Sentinel SuperPro 6.5 Developer's Guide Chapter 2 - Using the Hardware Key Note: You cannot cascade keys with the same developer ID while you are pro- gramming keys. Every key must be programmed individually Installing the USB Hardware Key Ifyou have multiple USB ports (if, for example, you are using a USB hub), you can connect up to 10 USB hardware keys on a single computer. C ing—connecting multiple keys to the same port—is not supported for Sentinel SuperPro USB hardware keys. We recommend installing the Sentinel system driver prior to connecting any USB keys to your system. 1. Locate an available USB port on your computer, 2, Attach the key to the USB port. Make sure itis securely and tightly connected. Note: USB hardware keys can be used with Windows SB/MEIXP/2003/Vista or ‘Windows 2000 workstations only. Sentinel Supertro 6.5 Developer's Guide 55 Chapter 2 - Using the Hardware Key Ordering and Returning Keys ‘The SSP Toolkit comes with one Sentinel SuperPro hardware key (see xige 52). You need to order additional keys that you will program and the ship with your protected applications. Ordering Additional Keys Contact your SafeNet Inc. representative to order additional Sentinel Super- Pro hardware keys. When you place your order, be sure to have your developer product identifier available. This code can be found on the hard- ware key itself. Each key’s label show: mA model number: This code is assigned to all keys you use to protect a specific product. The model number starts with an"S" for SuperPro keys or an "SX" for SuperPro XM keys. The next two characters identify the distributor and the last ve characters are the sequence numbers. Note: The model number is NOT the same as the developer ID programmed into the key. The product identifier is used for ordering purposes only. mA manufacturing code: This code identifies the key ‘manufacturing lot. Itis helpful to SafeNet Inc. ifa key is returned for any reason, 'sRB00643——Model 99381,24319— Number ‘manufacturing Code ‘Sample Sentinel SuperPro Key Label 56 Sentinel SuperPro 6.5 Developer's Guide Chapter 2 - Using the Hardware Key Note: The model number and the manufacturing code are in the same format on both network and stand-alone keys When you place your order, you should also have the following information What type of keys you want: network or stand-alone = What form-factor you want your keys to be in: parallel or USB = Ifyou are using network keys, what you want for the hard limit (see page 15) that will be pre-programmed into the key For more information about hardware key versions, see “Network Keys « Stand-alone Keys” on page 15. For more information about key form-fac- tors, refer to “Attaching the Sentinel SuperPro Hardware Key” on page 52. Returning Keys Occasionally, you may find that you need to return a SafeNet produet for exchange or repair. To ensure proper handling is acknowledged for the returned keys, you must obtain a Return Material Authorization (RMA) num- ber prior to shipping the products to SafeNet. To obtain an RMA number: m= Ifyou suspect a technical problem, call SafeNet’s Technical Support. ‘The support representative will work with you to rule out resolvable software and/or configuration problems. ithe problem cannot be resolved, the RMA department will assign you an RMA number over the phone. Ifyou have keys to be returned for other than a specific technic situation, call SafeNet’s RMA department for an RMA number, Sentinel Supertro 6.5 Developer's Guide 37 Chapter 2 - Using the Hardware Key Packaging the Keys for a Return Afier you have obtained an RMA number and are ready to package the keys for shipping, please read and follow these packaging guideline m Install an electrostatie-dissipating mat as a work surface, and make sure the mat is properly grounded. m= Wear grounding wrist or ankle straps while handling the keys. m= Use packaging materials designed to avold electrostatic charge during shipment. Plastic that docs not generate static (“cold plastic typically pink in color. You may also use “conductive plastic” is designed to drain off stati. Warning! Electrostatic charges can damage the Sentinel SuperPro keys. We strongly recommend following these guidelines at all times to pre- vent damage to your keys Be sure to write your RMA number on the shipping label to ensure prompt and correct handlings. 58 Sentinel SuperPro 6.5 Developer's Guide Chapter 3 Designing Your Protection Strategy The goal of any software protection strategy developed using Sentinel Super- Pro is to significantly reduce the chance that someone can defeat the protection and use your application without the hardware key. In general. the time and expense required for a skilled hacker to break your scheme is directly related to the number and complexity ofthe locks you place in your application, Protection can be as simple or as complex as you wish. Before you actually start adding protection to your source code, however, you should design your protection strategy, deciding what type(s) of protec- tion you'll use, which activation types you need, and more This chapter introduces you to the types of protection you ean use with Sen- tine] SuperPro, gives some guidelines for using varlous protection types, and describes advanced protection techniques you can use foreven greater secu: Once you have read through this chapter, you will be ready to start the SSP Toolkit and begin adding protection to your application. This chapter covers the following topics: Introduction to software secu m= Protection types Activation types Sentinel Superero 6.5 Developer's Guide og Chapter 3 - Designing Your Protection Strategy 60 Note: Using network licensing Guidelines for using various protection and activation types Controlling demo applications Reading stored data Using algorithms for encryption Advanced protection techniques Programming the key ‘All values and cell addresses used in this chapter's examples are in hexadec- imal format. Also, for simplicity, standard error-checking steps are omitted from the examples. f you recoive an invalid response to a query or another function, we recommend retrying the operation before taking action. Sentinel SuperPro 6.5 Developer's Guide Chapter 3 - Designing Your Protection Strategy Introduction to Software Security Concepts Before you start making decisions about the strategy you're going to use to protect your applications, it's important that you understand the concepts, behind software security. Protection Types Sentinel SuperPro provides two general types of protection: integrated and automatic, The protection type determines when and where software locks are implemented, Integrated When you choose integrated protection, you add software locks—API fune- tions to verily the presence of the key—directly Into your application's source code, You control the amount and location of the loc The frequency of software locks within your application, and the action taken ifno key Is found, is left up to you. The more locks you add to your application, the more difficult it will be for potential hackers to break your application's protection. Because you must understand the API calls used to support the protection strategy you have designed, and manually add them to your code, using integrated protection may take longer. Integrated protection is most commonly used when: = You want to have control over the protection techniques used to secure your application. m You have access to the source code and understand the API functions (for more information about the Sentinel SuperPro API go to “l the Sentinel SuperPro API” on page 301). Automatic (Shelled) Automatic protection is a simplified, fast, and easy way to protect your application against unauthorized access Sentinel Superero 6.5 Developer's Guide 61 Chapter 3 - Designing Your Protection Strategy When you use automatic protection, Sentinel SuperPro wraps a protective layer, called a shell, around your application’s executable file. This layer is encrypted, making it more difficult for a hacker to gain access to your appli- cation’s code. The shell layer makes no changes to your application’s source code, so there isno need to recompile. All software locks and communication with the hardware key (such as checking and verification) is handled by the shell, An application protected with a shell can be run only if the user has the correct hardware key. Refer to the section on page 7 for more details. How an Automatic Shell Protects an Application Automatic protection is most desirable when: You don't have access to the application's source code. You don't have the time or desire to design @ unique protection scheme. 2 ‘Sentinel SuperPro 6.5 Developer's Guide Chapter 3 - Designing Your Protection Strategy m= You want additional security by implementing a shell in conjunetion with API functions incorporated in your code. m You want to effortlessly include time/date/execution controls for a demo application, without having to manually add the elements and APL functions in code. Note: Some applications or DLLs (such as those using threaded local storage) may not work correctly with automatic protection applied. n this case, use integrated protection instead. Active v. Inactive Applications As part of your protection strategy, you choose to make your application either active or inactive. Anactive application is one that is ready (o run when shipped to your cus- tomer, [twill always remain active, as long as the hardware key is attached. ctivated, An inactive application will not run until it For example, you can make your main application active, but make addi- tional features inactive. This allows your customer to easily purchase and immediately activate upgrades in the field, because you can provide the acti- vation password for the additional features without shipping additional soltware or visiting the customer's site. Demo or metered applications are a special case, in that they are shipped as active, but usually become inactive after a specilie number of executions. See “Controlling Demo Applications” on page 94 for more information. Activation Types When you protect your applications with Sentinel SuperPro, you also choose how you want your customer (o activate future applications, or addi- tional features, alter installation, ‘The methods defining how customers activate your application are called activation types. There are four activation types el SuperPro: active, static, trusted and distributed. Sentinel Superero 6.5 Developer's Guide 3 Chapter 3 - Designing Your Protection Strategy ‘The following table describes each of the available activation types, what you must do to use each type, and suggestions for how you can use each type. Typically, the activation type you use is based on whether you want your application to be active or inactive, ‘Active * Your application js always | * You want your main prod- active when the hardware ct to be always active so key is attached. It needs no your customer can always activation password. run it. + You might ship add-on features (that you intend to charge separately for) as Inactive products, to be activated at a later time when your customer pur- chases them. Static * The application is inactive + This type is easier to until activated with an activa- | deploy, because the pass tion password, unloss ts a word is always the samo, demoormetered application. | making it easier to update + The activation password is several keys on different ‘the same for every hardware | computers. key used to protect the appli. | * If you are writing a sepa: cation. This means one pass- | rate activation password, word works for multiple utility, you must use this keys. ‘type because you know what the password will be 64 ‘Sentinel SuperPro 6.5 Developer's Guide Chapter 3 - Designing Your Protection Strategy The application s inactive Provides excellent security, until activated with an actva- | because al passwords are tion password, unoss itis a unique demo or metered application. |» Bost for use with applica Activation passwords aro tions using automatic generated by Sentinel Super- (shelled) protection, Pro and are unique for each You cannot use this type hardware key and each appli- | when you are writing your cation twin activation password Requires distribution of tho | utility, Bacause you never Field Exchange Utility or the | know what the password Sentinel Client Activator for for a specific key will be. field activation. Distributed | + The application is inactive ‘Must be used if you want until activated by a product. ‘to keep track of the num- distributor, unlessitisa demo | ber of product activations or metered application performed by your Activation passwords are gen- distributors. erated by Sentinel SuperPro | * Ifyou want to charge your and are Unique for each hard- | distributors for product ware key and each applica- activations, The distribu- tion. ‘tor key keeps track of the Distributor uses the Field number of activations, and Exchange Utlty or Sentinel when the counter reaches lent Activator to activate zero, no more activations the application. Each activa. | are allowed. You can tion decrements the distribu. | update and charge for) a tor keys counter. distributor key with more Requires programming and activations in the same distribution ofa distributor ‘way that product keys are keyin adcition tothe product | updated keys Example: Using the Trusted Activation Type ‘The following simple example is designed to give you a feel for how the trusted activation type is used. The trusted activation type is the most often used, and is appropriate for most protection strategies. Sentinel Supertro 6.5 Developer's Guide 6 Chapter 3 - Designing Your Protection Strategy Assume you want to create 100 copies of your application to ship to your customer . Your product line is defined as follows: You havea main application—named Se: torun immediately at the customer's site. jeryEditor— that you want You have a demo of SceneryLiditor that you want to run immediately al the customer site, but it will expire at some point. You have ten other add-on features for customer may purchase in the future a ceneryBditor that your upgrades. In general, the following procedure describes how you would use Sentinel SuperPro to protect and distribute SceneryEditor and its add-on features: 4. Use the SSP Toolkit to define the following: Assign SceneryLditor an aetive activation type. by applying elther integrated or automatic application protection. Assign the demo version a trusted activation type. Assign each of the add-on features (separately) a trusted activation type. Each add-on feature is treated as a separate application by Sentinel SuperPro. Add the protection to your applications by using the pseudocode pro- tection plan generated during the Implementation stage to add the appropriate calls to your source code, or add the shell(s) to the appro- priate executable fies. Produce 100 copies of SceneryBditor and its user documentation. Program 100 Sentinel SuperPro hardware keys with the protection strategy you defined in step 1, using the Make Keys stage, Ship Sceneryfiditor, along with one product key and the Sentinel Cli- ent Activator or Field Exchange Utility: If your customer decides to upgrade from the demo version, or decides to purchase additional features for SceneryLiditor, the Client Activator or Field 66 Sentinel SuperPro 6.5 Developer's Guide Chapter 3 - Designing Your Protection Strategy Exchange Utility may be used in order to obtain a locking code. Your cus- tomer sends you the locking code, and you do the following: 1, Start the SSP ‘Toolkit and navigate to the Implementation stage. 2. Click the Field Activation (ab, and then click License Generator, You can also use the License Generator Utility to generate a license code. 3 Enter the locking code provided by your user. and select the actions you want to perform on the key in the field. The actions you select determine which features the user will have access to, Sentinel SuperPro generates a license code that will apply the selected actions to the user's key. 4. Send the license code to your user, who then enters the code in the Cli- ent Activator or Field Exchange Utility. automatically activating the product or upgrade. Sentinel Supertro 6.5 Developer's Guide eo Chapter 3 - Designing Your Protection Strategy 68 Example: Using the Distributed Activation Type ‘The next example Is designed to give you a feel for how the distributed actt- vation type is used. The distributed activation type is used when you want to give your sales distributors the ability to activate or update your application. Assume you want to create 50 copies of your application to ship to custom- ers, but these copies will be shipped to your distributors to sell. So that you can keep track of how many products your distributors sell, you decide to use the distributed activation type. Your product line is defined as follows m= You have a main application—named SceneryEditor—that the distributor must activate in the product key before shipping it to the customer. m= You have three other add-on features for SceneryEditor that customers may purchase in the future as upgrades. th distributor to sell a You have five distributors, and you want maximum of 10 copies of SceneryEditor. In general, the following procedure describes how you would use Sentinel SuperPro to protect and distribute SceneryFiitor through your distributors. 1. Use the SS P Toolkit to define the following: Assign Scenerylditor a distributed activation type. by applying cither integrated or automatic application protection, Assign each of the add-on features (separately) a distributed activation type. Each add-on feature is treated as a separate application by Sentinel SuperPro. 2, Add the protection to your applications by using the pseudocode pro- tection plan generated during the Implementation staze to add the appropriate calls to your source code, or add the shell(s) to the appro- priate executable files. 3. Produce 50 copies of SceneryEditor and its user documentation. Sentinel SuperPro 6.5 Developer's Guide Chapter 3 - Designing Your Protection Strategy 4, Program 50 Sentinel SuperPro hardware keys with the protection strategy you defined in step I, using the Make Keys 5. Programa distributor key (with the protection strategy you defined in step 1) for each of your distributors who will be selling Scenerykditor, using the Make Keys stage. The activation counter for each key should be set to 40—10 licenses to activate SceneryEditor, and 10 licenses each to activate each of the add-on features. 6. From the Project stage, export the protection strategy you defined in step 1 toa DST fle. Ship the following items to each distributor: 4 Ten copies of SceneryEditor @ Ten programmed product keys that have not yet been activated u Ten coples of the Sentinel Client Activator or Pield Exchange Utility for distribution to customers with SceneryEditor @ One ofthe distributor keys you programmed in step 5 4 The DST file you created in step 6 The License Generator Utility As soon as the application from has been received by the customer through. distributor, i the decision of purchasing additional features for SceneryFdi- tor has been made, the customer must activate the application or features before using them. To do so, the Client Activator or Field Exchange Utility may be used in order to obtain a locking code. The customer sends the distrib- utor the locking code, and the distributor then does the following: L. Connects the distributor key to the workstation. 2. Verifies that the Sentinel Protection serveris installed and running on the workstation Sentinel Supertro 6.5 Developer's Guide 6 Chapter 3 - Designing Your Protection Strategy 3. Starts the License Generator Uti provided with the protected applic ¥y and opens the .DST file you 4. Enters the locking code provided by the customer, and selects the actions to perform on the key in the field, ‘The actions the distributor selects determine which features the cus tomer will have access to. 5. Generates a license code that will apply the selected actions to th tomer'skey Each time a license code is generated, the activation counter in the distributor's key is decremented by one. Once the counter reaches zero, the distributor can no longer activate or update SceneryBditor. Note: The activation counter is decremented only when a distributor generates a license code to activate or update a distributed application. Distributors can activate or update an unlimited number of static or trusted applica- tions; the activation counter is not decremented by these types of applica- tions. In fact, distributor keys do not need to be connected at all in order to generate license codes for static or trusted applications. 6, Sends the license code to the customer, who then enters the code in the Client Activator or Field Exchange Utility, automatically activat- ing the appropriate product or upgrade. When the license limit counter on a distributor's key reaches zero, you can increment the limit counter through field activation, much in the same way that a customer's product key is updated by the distributor. You may want to charge for incrementing the distributor's key. To increment the license limit counter in a distributor's key 1, Start the SSP Toolkit and navigate to the Implementation stage. 2. Click the Id Activation tab, and then click License Generator. 70 Sentinel SuperPro 6.5 Developer's Guide Chapter 3 - Designing Your Protection Strategy 3. Ask the distributor to generate a locking code for his distributor key using the Field Exchange Utility. The distributor key, not a product key, must be connected the distributor's system to generate the appro- priate locking code. Enter the locking code provided by the distributor. and select the Increment Distributor Counter action. You should have already programmed this action, and the increment value, when you initially created your protection strategy. ode. 5. Generate a licens 6, Send the license code to your distributor, who then enters the code in the Field Exchange Utility, automatically incrementing the license limit for his distributor key. ‘The distributor can now continue to activate and upgrade product keys for Scenerylditor, as described above. Choosing an Activation Type for Demo Applications ‘When you want to provide your application as a demo, you must use an acti- vation type other than active. Thisis because. by definition, a demo must expire (become inactive) after itis run a specific number of times. You will want to activate the demo when you ship itto your customers, so that itwill run, Therefore, you should use the static or trusted activation type. The demo Is then active until it expires. If you want your distributor to activate the demo, you should use the distributed activation type. ‘The distributed activation type Is similar to the trusted activation type; the only difference is that activations of distributed applications are metered. For more information on protecting demo applications, sce “Controlling Demo Applications” on page 94. Sentinel Superero 6.5 Developer's Guide ” Chapter 3 - Designing Your Protection Strategy R Network Licenses Another decision you need to make while protecting your application is how you want to use licenses with your application, With Sentinel SuperPro 6.5, every user of your application needs to obtain a license before running the application. The license allows the user to start the application and. the hardware key, ‘The license limit indicates the maximum number of concurrent users of the application. Each instance of an application uses a license when itis started. Licenses can be used in two ways—with a stand-alone application or with a network application. If the application is stand-alone, each user needs his own hardware key, as only one license can be obtained from each key. If the application is a network application, only one key—located on the net- work—is required, but the single key can isstre multiple licenses, allowing for simultaneous use of your application by several clients. ‘The type of licensing model to use is up to you. It depends on how you will be selling your application, and how you expect your users to deploy it within their organization. Sublicensing Sublicensing is useful when you want to apply a license limit to a specific feature of the protected application. If you have specified a user limit in your protection strategy, you can allow sharing the sub-licenses issued on the : ser Name and MAC Address (ie. 3 so that if a request for accessing that feature of the protected application comes more than once from the same seat, then no extra license is consumed. You can program up to 232 separate sublicense license limits in each key— each sublicense is a custom element occupying asingle cell on the hardware key. The total number of sublicense limits you can program is dependent on the number of cells being used by other elements of your strategy ‘Sentinel SuperPro 6.5 Developer's Guide Chapter 3 - Designing Your Protection Strategy Getting Started Now that you understand the concepts behind software security. you are ready to get started with designing your own protection strategy. The first decision you need to make is whether you want to use quick and easy pro- tection, or if you want to take more time and create your own custom protection strategy. Quick and Easy Protection Ifyou don’t have a lot of time and you need to quickly protect your software before shipping if to your customers, you may want to consider using auto- matic protection With Sentinel SuperPro, implementing automatic protection for your appli- cation can take 30 minutes or less, while still giving you options for activation types, time and date controls and algorithm values. When you choose automatic protection, the SSP Toolkit does most of the work for you, with no need to modify your source code, Ifyou want to start protecting your applications right away, skip to page 99 toread important information about programming the hardware key, then 20 immediately to Chapter 5. “Starting the Sentinel SuperPro Toolkit,” on page 113 to get started. Customized Protection Ifyou have more time to work on your protection strategy, a custom strategy may be the answer for you. Customizing your strategy allows you to take advantage of a number of protection techniques, both basic and advanced, using those that work best for your application, Customized protection allows you to: = Choose how to use each memory cell in the key. = Select the algorithms used in your protection strategy: Add data words or counters where appropriate. Sentinel Superero 6.5 Developer's Guide 73 Chapter 3 - Designing Your Protection Strategy 7 m Add API function calls to your source code to support your protection strategy. m Create a very secure level of protection for your application, Note: Creating your own customized protection scheme requires you to under- stand the API functions and all rules governing how cells can be pro- grammed. Be sure you have thoroughly reviewed the information in this chapter, as well as Chapters 3 and 14, before you begin programming the key and writing code. Ifyou decide you want to create your own unique protection strategy, con~ tinue with the next sections in this chapter, which provide information on the various techniques you can use to protect your application. Once you've completed this chapter, go to Chapter 5, “Starting the Sentinel Super?'ro ‘Toolkit,” on page 113 to get started with implementing your strategy. Basic Protection Guidelines Ifyou decide to create your own customized protection strategy, keep in mind the following guidelines to ensure your strategy is effective. Send Frequent Queries One of the most basic and effective techniques you can tse to confuse hack- ersisto call the hardware key frequently. Ifyou rely on a single call at the beginning of your code, itis relatively easy for a skilled hacker to isolate the call and defeat your protection. Another potential problem with querying only once is that a user could remove the key after starting the application. The key could then be used to run another copy of the application. The first copy would continue to run, because no queries are being performed to check for the key's continued presence. This process of removing a key after starting an application and then using the same key to start the application on other computers is known as “lamplighting,” Ifyou decide to implement network licensing as part of your protection strategy, you must send a message to the key every 90 seconds in order to Sentinel SuperPro 6.5 Developer's Guide Chapter 3 - Designing Your Protection Strategy ‘maintain the license, Failure to send this “heartbeat” message to the server (and thus the hardware key) will result in loss ofthe license and an error being sent to the application. Heartbeat messages let the server and key know that the license is still in use by the client running the application. For ‘more Information about heartbeat messages, see page 109. Scatter Lock Code Software locks consist of multiple steps: calling the key, evaluating the returned value, and acting on the evaluation results. For added protection, separate these lock components in your code. A software lock is harder to break ifits code components are physically separated into different sections of the application instead of being located together. Manipulate Returned Data Use the data returned from the hardware key in various ways. For example, leave the result In a vartable, then check itlater. Sentinel Superero 6.5 Developer's Guide 75 Chapter 3 - Designing Your Protection Strategy Commonly Used Protection Techniques %6 ‘This section describes several common techniques you can use, individually or together, to protect your application. Many of these schemes are based on one or more of the following general methods; m= Overloading potential hackers with data by calling the hardware key many times throughout your code. = Decentralizing your locks throughout the code, rather than restricting them to a few places that can be easily detected and eliminated, = Distracting potential hackers with locks that make your application perform long series of meaningless operations. These calls mislead hackers and make your valid locks harder to isolate. Some techniques can be used with returned values sent from any of the three type of words (data, counter and algorithms). Other techniques can be used with only one type of word. Note: Areturned value is the value recelvad from any type of cell In response to a query or read sent from your application. When evaluating a returned value, always compare the response to the expected value. Do not rely on receiving a specific invalid response. Reading Stored Data For a simple protection scheme, program a single cell with a value. Then, have your application read that cell and verify it contains the correct data. If it does, continue execution. Ifthe correct data is not found, assume the key isnot attached or has been tampered with and proceed accordinaly. Example In this example, we programmed one cell in the key with a two-byte value. We then had our application read that cell during execution, taking appro- priate action alter the read. Sentinel SuperPro 6.5 Developer's Guide Chapter 3 - Designing Your Protection Strategy 1, Select a two-byte value. We used 1234. 2. Select a cell to program this value Into. We used cell 20. 3. Use the SSP Toolkit to program the selected cell with the value. In this example, we programmed the value 1234 into cell 20, To add a data word cell to your key, you need to create a custom element. See Chapter 7, "Working With Design Elements,” on page 185 for detalled instructions. Use the Data Word cell type if you want the application to be able to modify the cell later. Use the Locked Data Word cell type if you want the cell to be read-only. 4, Add the required API functions cation code: in your appl 4 RNBOsproFormatPacket() ~ Initializes the packet, a RNBOsprotnitialize() — Performs required initialization. 4 RNBOsprofindFirstUni the key and gets a license. ) Establishes communication with, a RNBOsproRead() — Reads the cell and returns the value in it. 5. Code your application to evaluate the response to the read. 6, Code your application to display an error or abort ifthe read operation does not return the value you programmed. We recommend retrying the operation at least once before taking a negative action, Note: For more information about the API functions used in this example, see Chapter 14, “API Function Reference,” on page 301, Using Algorithms to Encrypt Data A more complex form of protection send to the key, ng algorithms to encrypt data you us Sentinel Superero 6.5 Developer's Guide 7 Chapter 3 - Designing Your Protection Strategy 8 In this case, you send a data string to the key that is encrypted by the key using a preprogrammed algorithm. Your application then examines the returned value, verifying that the correct encrypted string was returned, ot using the value to control your application's execution in some way. Tip: Longer query strings generally offer greater protection. We recommend YOUF query strings be at least 22 bits (@ hex characters) long. Example ‘This example describes how to set up your application to require a correctly encrypted response from the key. 1, Select two 16-bit hex values to use for the algorithm, We used 1234 and €000 to create an active algorithm using the enhanced algo- rithm engine. Remember, the second word must be between 8000 and FI the algorithm active. tomake 2. Select two cells to program these values in. We used cells OA and OB. Note: Throughout the SSP Toolkit, only valid and available cell addresses are pro- vided in Address drop-down lists, preventing you from selecting an inap- propriate address. For more information about algorithm address restrictions, see “Valid Algorithm Addresses” on page 37. intinel SuperPro will select an address for you if you select Auto instead of a cell; see page 189 for more information. 3. Select a query string to send to the key to be encrypted. We used ‘SEAS IBAB. 4, In the SSP Toolkit, open the Design stage. 5. Add an Algorithm as a custom element, Enter the values you selected in step 1 as the first and second words of the algorithm, Sentinel SuperPro 6.5 Developer's Guide Chapter 3 - Designing Your Protection Strategy See Chapter 7, “Working With Design Elements,” on page 185 for led instructions on adding algorithms to your protection strat- 6 Move to the Prototype stage, and click Go to program a test key with your specifications. Move to the Implementation stage, and click the API Explorer tab, 8. Click Query Response Generator. 9. On the Query Response Generator sereen, determine the encrypted value your key will return for the query value you selected in step 3. See “Querying Algorithms" on page 134 for more information on using the query response generator, ples from above, the query string 8FA31B4B returns ADL. Using our ex avalue of 3 1. Add the appropriate API func query. The following function ons in your application to make the are require a RNBOsproformatPacket() ~ Initializes the packet, & RNBOsprotnit 4 RNBOsprofindFirstUni the key and gets a license. 4 RNBOsproQuery() —Sends the query string and points to a location for the response value. e() — Performs required initialization. ) Establishes communication with, 2. Code your application to display a message and exit ifthe query does not return the appro} ssponsc (determined in step 9). Using Activation Passwords You can program the hardware key so an algorithm is associated with an activation password. The algorithm and the password are each two words Sentinel Superero 6.5 Developer's Guide 79 Chapter 3 - Designing Your Protection Strategy Jong, and the password must immediately follow the algorithm, For exam- ple, cells OC - OF can be used as follows: Cell oc cell 00 cell 0€ Cell OF Note: See “Valid Algorithm Addresses” on page 37 for more information about address restrictions for algorithms and activation passwords. By associating an activation password with an algorithm, you can activate the algorithm in the field, Ifan activation password Is not associated with an algorithm, it cannot be activated in the field ‘To set up your application to require an activation password: 1, Add an algorithm to your application via the SSP Toolkit, being sure toset it to Inactive. See Chapter 7, “Working With Design Elements,” on page 185 for detailed instructions. 2. Code your application so that it executes only alter receiving a valid response from the (currently inactive) algorithm. 3. Write a utility that uses the RNBOsproActivate() function to activate the algorithm once the user provides a password. 4. After buying your application, the user runs the utility you created in step 3, entering the password you provide. The algorithm is then acti- vated and returns the correct response, allowing the protected ap, cation to execute. For added security. you may want to use a different activation password for cach key. 80 ‘Sentinel SuperPro 6.5 Developer's Guide Chapter 3 - Designing Your Protection Strategy Example ‘This example demonstrates how to activate an inactive application in the field, Usually; an application is deactivated because it is a demo that hi been “turned off” atter the specified number of executions. Alternatively. you may have set up your application so the user must enter an aetivation password before the application will run, You temporarily “urn off” an application by including an RNBOspro- Query() function call that requires the hardware key to return a correctly encrypted value. Then you make itimpossible for the hardware key to return the value because its algorithm has been set to inactive. By definition, an algorithm is inactive ifthe high-order bit of ts second word is. This is done as follows: = Ifa counter is used, when it reaches zero, the RNBOsproDecrement() function sets the bit (0 0, = Inyour factory, the SSP Toolkit is used to set the algorithm as inactive. You must write a utility, or add a feature or function to your applica- tion, to activate the algorithm once the user supplies the correct password. The query performed by the protected application then returns the correct response, and the application runs successfully. ‘Note: The utility used to enter activation passwords is not included with, nor can it be created with, the $5P Toolkit. You must design and code this utility for Use with your application yourself. The following example assumes you release your application in a deacti- vated state, and provide a password and utility to activate it 1, Use the SSP Toolkit to program an algorithm with password as a cus- tom element at address OC, as follows: 4 Algorithm: 0123 3456 a Password: AB16 09C Sentinel Superero 6.5 Developer's Guide 81 Chapter 3 - Designing Your Protection Strategy 82 Remember, the value in the second word of the algorithm must be between 0000 and 7FFF to make the algorithm inactive. See “Algo- rithm Values” on page 35 for detailed instructions. ‘Add API fanctions in your application to query the hardware key using the activated algorithm. The following functions are required: c RNBOsproFormatPacket() — Initializes the packet & ration. RNBOsprolnitialize() — Performs required init RNBOsproFindFirstUnit() — Establishes communication with the key and gets a license. © 4 RNBOsproActivate() — Passes the password input by the user, your write password, and the address of the algorithm's first word. Ifthe password Is correct, RNBOsproActivate() changes the algo- rithm’s active/inactive bit to active, making it available for queries, Note: You may want to send a query using the algorithm before calling RNBOsproActivate0. If the query returns the correct response, the algo- rithm is already activated. 3. Write a utility the user can use (o enter the password you provide. ‘This utility should also use the API calls listed above. Dealing With Missing Hardware Keys Ifno hardware key is attached to the computer or network server when a protected application is run, an error is returned by the RNBOsproF’ind- FirstUinit() API function, Ifa connection is established, but the key is later removed, subsequent API functions will return errors. See “API Status Codes” on page 352 for more information about these errors Ifyour application detects that the Sentinel SuperPro key is not present, itis up to you to decide what action you want to take. Typically, you should not shut down your application because of a single unexpected response. Sentinel SuperPro 6.5 Developer's Guide Chapter 3 - Designing Your Protection Strategy Instead, repeat your query; ifthe response is still wrong, then you can take action, Possible actions include: m= Display a message and walt for the user to respond, This method does not prevent users from running the application, but it makes doing so extremely annoying, especially if the application queries the hardware key frequently = Shutdown the application after a predetermined number of failed queries. (However, only under the most extraordinary circumstances should you terminate your application without allowing the user to first save his work.) = Allow the application to appear as ifit is fanctioning properly, while in fact itis not. (Be very careful if you use this method: less drastic actions should be considered first.) = Display a critical error message and tell the user to contact your technical support department. ‘These are just some suggested actions: you can implement any combination of them to suit your needs. Remember, other events, stich as network transmission errors or parallel port contention problems, can also cause your application to detect a hard- ware key problem. Since these are almost always innocent events, you. should design your strategy to be as forgiving of them as possible, while still ‘maintaining protection integrity. Note: All attempts have been made to guarantee error-free transmissions to and from the key. However, a small possibility exists that an invalid response ‘may be rocolved even if tha key is attached. As a rosult, we recommend, always retrying the query one or more times if you receive an invalid response. If the response Is consistently invali, then take the action you deem appropriate. Sentinel Supertro 6.5 Developer's Guide 83 Chapter 3 - Designing Your Protection Strategy Dealing With Newly Connected Hardware Keys Once a Sentinel Protection server is running on your user's network, addi- tional keys can be installed at any time without having to reboot the server—this Is called hotplugging. The Sentinel Protection server will automatically detect any new keys that have been attached since the last time the server was started. Thisallows the user to connect a new key to the server without shutting down the server and terminating those clients currently accessing the key and running the protected application. 84 Sentinel SuperPro 6.5 Developer's Guide Chapter 3 - Designing Your Protection Strategy Advanced Protection Techniques Once you understand how to use the baste tenets of sofiware protection, you may want {o further protect your application through the use of advanced techniques. Using Returned Values as Variables Because software is generally easier to break than hardware, most hackers will try to break your application by attacking the software. Therefore, any tricks or traps you can implement in your code by incorporating a respon: from the hardware key will add even more protection. One effective technique is to hide software locks in a high-level language by using returned values to control application flow. With this method, a value returned by the key becomes a logical pointer or selection key to the next exe- cution step or subroutine. This makes analysis of your code more difficult. Another way to use a returned value iso add it to the value ofa variable so the sum is the desired value of the varlable. Ifthe variable is used in other parts ofthe code, then that code is dependent on the call to the hardware key. For example, suppose that at some point in your application you want a variable to contain the value 13. Assume that one of the query strings you send to the key returns the decimal number 12,345, = Setthe variable to -12,332 m Send the query. m Add the response to the variable, Ifthe correct key is attached, the variable will contain the proper value. Implementing Encryption Techniques Another effective method for protecting your application is to use reversible encryption techniques to encrypt and decrypt data. ‘Todo this, use the RNBOsproQuery() function to scramble a data string, and then use the scrambled response to encrypt your application code. You then Sentinel Superero 6.5 Developer's Guide 85 Chapter 3 - Designing Your Protection Strategy ship your application to the field with encrypted code, which is decrypted only ifthe hardware key is Most encryption algorithms depend on a key value—sometimes called & sword or seed—to transform the data. Using a different seed produces different encrypted results, but reproduces the original data if that seed is also used for decryption. Note: Use of this technique requires advanced knowledge of encryption methods and thelr use in application code. Some of these techniques may be diffl- cult or impossible to implement in some languages. Using Returned Values as Encryption Seeds You can use the key’s returned values to disguise critical portions of da codeas random data until decrypted for use. Ifthe encryption seed is derived from values produced by Sentinel SuperPro, the correct key must be present before the code can be decrypted and executed. Tip: When decrypted data is “in the clear,” use some other form of protection to block interrupts used by debuggers to gain control. ‘The most common reversible algorithm SIVE OR (XOR). XOR works as follows: suse the Boolean operator EXCLU- m Ifasced bit has a value of 1. XOR reverses the state of the corresponding bit in the original string and copies it to the result. m Ifasced bit has a value of 0, XOR copies the corresponding bit in the original string to the result. Applying the same algorithm to the result reverses the encryption and restores the data to its original state. 86 Sentinel SuperPro 6.5 Developer's Guide Chapter 3 - Designing Your Protection Strategy Examples ‘The following example uses the XOR operator to encrypt a 16-bit hex num- ber (8EA3) using the seed 4B6A. Data to encrypt | SFA 11000117110100017 ‘Seed 486A, (0100101101101010 XOR algorithm = = Encrypted result | Caco 11100010011001007, Notice that everywhere a bit in the seed is 1, the result bit isthe opposite state of the data bit, Where the seed contains. 0, the result bit is the same as the original data bit. Without knowing the seed, the encrypted result is meaningless. ‘To reproduce the original data, apply the XOR algorithm to the encrypted result using the same seed. Encrypted result | Caco 11400010011001001 seed 4868 (0100101101101010 OR algorithm - Original data 8FAB 110001771 10700011 ‘The next example shows how (o use the SSP Toolkit with the XOR operator to encrypt and decrypt code in your application, 1. Select two 16-bit hex values to use for the algorithm. We used 4059 and F123. Remember, the second word must be between 8000 and FFF to make the algorithm active. 2, Select two cells to program these values in. We used cells OA and OB. Sentinel Superero 6.5 Developer's Guide 87 Chapter 3 - Designing Your Protection Strategy 88 Note: 10. ul. Sentinel SuperPro will select an address for you if you select Auto .ee page 189 for more information. For more information about algorithm address restrictions, sea “Vali Algorithm Addresses” on page 37. Select query data to send to the key to be encrypted. We used 7009AB12 In the SSP Toolkit, open the Design stage. Add an Algorithm as a custom element. Enter the values you selected in step 1 as the first and second words of the algorithm. See Chapter 7, “Working With Design Elements,” on page 185 for detailed instructions on adding algorithms to your protection strat- cay. Move to the Prototype stage, and click Go to program a test key with your specifications. . Move to the implementation stage, and click the API Explorer tab. Click Query Response Generator. On the Query Response Generator screen, determine the encrypted value your key will return for the query data you selected in step 3. See “Querying Algorithms” on page 134 for more information on using the query response generator. ‘The encrypted return value Is the encryption seed you will use to encrypt part of your code. Using our examples from above, the query string 7009AB12 returns a value of 60D6867D. Select an encryption method. We used the Boolean operator XOR. Select the data in your code you want to encrypt. We used the hex value SFA3 1B4B, Sentinel SuperPro 6.5 Developer's Guide Chapter 3 - Designing Your Protection Strategy 12. Apply the operator you selected in step 10 to the data, using the encryption seed. If you ship your application with the encrypted code, it will not execute correctly until the code is decrypted by a correct response. In our example, the result is A73FBASB. 13. Code your application so it decrypts the encrypted code ifthe hard ware key is present. To do this, query the key. Ifitis present, the RNBOsproQuery() function returns the response string you used as the encryption seed. Because XOR is a reversible operation, applying the same encryption seed to the encrypted data returns the data to its original state and your application should continue to execute properly. 14, Add the following required API functions in your application to make the query: a RNBOsproFormatPacket() ~ Initializes the packet, a RNBOsprotnitis 4 RNBOsproFindFirstUnit()— Establishes communication with the key and gets a license. iize() — Performs required initialization. 4 RNBOsproQuery() — Sends the query string and points to a location for the response value. Code your application to display a message and exit ifthe query does not return the appropriate value and the code cannot be decrypted, Using Longer Encryption Seeds Ifthe data to encrypt is longer, a longer seed can be constructed. The scheme for forming such a seed may be as complicated as you wish. For example, the number 4B6A can be expanded to a 32-byte string by “rotating” it left 15 times and stringing the results of each rotation together. ‘This yields the following hex string: Sentinel Superero 6.5 Developer's Guide 58 Chapter 3 - Designing Your Protection Strategy 4B6A 96D4 209 6A4B D496 A92D 5 6A4 6D49 DAS? BI 2 5B A4E6 496D 92DA 251 BS You can usc this string as a seed with the XOR algorithm to encrypt a 32-byte string, For example, the ASCIT string “This is the secret of my pro- gram” can be represented as the following hex string: 5468 6973 2069 7320 7468 6520 7365 6372 6574 206F 6620 4D59 2070 726F 6772 616D Using the 32-byte seed with the XOR algorithm produces the following encrypted result: a7 eo 2872 bop 1F02 ‘The result looks nothing like the original character string, yet the original ia can be easily recovered using the same algorithm seed that changed it. You can use this method with entire sections of code within your applica tion, expanding the seed as needed. Using Advanced Encryption Techniques You can make encryption even more complex, depending on how sophisti- cated you want (o make your application. For examp! = Use values returned by the key as seeds for a pseudo-random number generator that generates seed encryption patterns, m= Use returned values to decrypt subroutines that then decrypt code using an entirely different encryption method and seed. m= Instead of using the XOR operator, multiply each byte by a seed to encrypt it. Divide by the same seed to decrypt the data, Multiplying an 8-bit value can yield a 16-bit result, The result is dou- ble the size of a data string produced with the XOR operator, but is also harder to crack. Ifyou use this technique, make sure your multi- plier/divisor seed does not equal 0. 90 ‘Sentinel SuperPro 6.5 Developer's Guide Chapter 3 - Designing Your Protection Strategy Your local technical library should have several reference materials on encryption that can help you implement these techniques in your protec- tion strategy. Other topics you may wish to research include codes, cryptology and the National Security Agency (NSA). Querying Activation Passwords Normally, an activation password is used to activate an inactive algorithm, as described in “Using Activation Passwords” on page 79. However, because an algorithm password has an access code of 3 (meaning itis also an algo- rithm word), you can also use the password itself as an algorithm, ‘To make a password an active algorithm, you must set bit 7 ofits second word to 1 (set the value in the second word to a number between 8000 and EFER). ‘Then use the RNBOsproQuery() function to send an input string to the key, specifying the starting address of the password. The key encrypts the string according to the bit pattern of the algorithm password, and then returns the encrypted value to your application y. For exam- ‘This technique provides an alternate method of querying the ke ple, you may want to query the algorithm password belore invoking the RNBOsproActivate() function, to verify that the password appears to be Note: You cannot use this method if you use the trusted activation type, which creates a different activation password for each customer. Using Data Words In addition to reading the value in a single data word cell (see page 76), there are a number of other ways you can use cells programmed with read/ write data words (access code 0) or read-only data words (access code 1) as part of your protection strategy. = Store machine code in data words. This code can be read checksummed and executed in a way that is verified by a different part of the applica Sentinel Superero 6.5 Developer's Guide 31 Chapter 3 - Designing Your Protection Strategy 2 m= Program the application's serial number in a data word cell. Read the cell and compare the value to the correct serial number. Ifyou have multiple application packages, store the serial number for each in separate data word cells m Store the user's name In data words as ASCII bytes, then compare or display it Use the 56 programmable cells as one large, 896-bit bitmap. Various, combinations of bits can determine features or other responses, depending on your application Assembly Language Techniques Implementing Sentinel SuperPro protection in assembly language offers more flexibility than other languages. However, you can use only one Sentl- nel SuperPro subroutine to make hardware key queries. Ifyou try to link two different interface subroutines with your application, you may get dou bly defined symbols. Hiding Calls Ahacker may analyze your object code and examine addresses referenced by CALL instructions to find the calls to the Sentinel SuperPro interface rou- tines. The hacker could then analyze the code of the interface routine and the code following each call in order to defeat the lock, One method to avoid detection of your queries is to call the key without using the assembly language CALL instruction. Instead, push the return address onto the stack followed by the procedure address, and then execute a RET (return) instruction, Inserting Extra Data Analysis of your code can also be made more difficult by inserting frequent ‘garbage” data bytes. This process is effective at throwing static disassem- blers out of syne. Sentinel SuperPro 6.5 Developer's Guide Chapter 3 - Designing Your Protection Strategy For example, after each unconditional jump and return, insert a garbage data byte or two whose value is equal to the first byte of a very long assembly Janguage instruction ‘This same technique can be used following conditional branches, as long as the preceding code always guarantees the branch is invoked. Such a jump or branch may also be used immediately prior to the call, with an intervening data by! Using Stepped Access Ifyou market multiple versions of your application, you can use Sentinel SuperPro to control access to features within the application, based on crite- ria you specify. Th called stepped access. For example, you may offer a basic package, an expanded package with some additional features, and a deluxe package with all features. Using, stepped access, the application contains an array of conditions instructing the system to activate different features based on the value returned by the hardware key: You control the features implemented by the application by using a different algorithm for each package. Three algorithms produce three different values for the same string, For the string ABCD, for example, three algorithms might produce the values 2610, 1830 and 6287, Your application should contain statements that produce different responses based on the returned value, as illustrated by the following pseudocode: IE 2610 THEN «<: 1930 THEN SafeNet Senti- nel>SuperPro>6.5. 2. Select SuperPro Toolkit, The Sentinel SuperPro Developer Toolkit appears. Entering Your Passwords Before you can use Sentinel SuperPro, you must provide your Developer 1D, Overwrite Password 1 Overwrite Password2, and Write Pass- word Tip: You only need to enter these the first time you open Sentinel SuperPro Toolkit, as your passwords 14 are remembered for subsequent sessions. Even If you don't enter them, the toolkit stl allows you to continue, up through the Prototyping stage after which entering the Developer ID, Write Pass- ‘word, and Overwrite Passwords 1 and 2 is required to proceed further. Your developer ID isa unique identification code. You must use your devel- oper ID to program or establish a connection to your keys. All the keys used by your organization have the same developer ID. ‘The Overwrite Passwords allow you to set or change the value or access code of any cell other than a restricted cell. Keep these passwords secure, as they have the power to reprogram all other cells in your key! ‘The Write Password allows you to change or set the value or access code of a issword also allows you to decrement data word or undefined cell. This counter words. Sentinel SuperFro 6.5 Developer's Guide Chapter 5 — Starting the Sentinel SuperPro Toolkit The Secret Code ‘The secret code Is used to create matched dsale/usafe palrs.The same secret code across various platforms ensures that compatible dsafe/usafe created. Hence, any usafe will give a locking code that can be used by 4 ‘on Windows to generate the same license string For example, a Linux-based user can easily accept licenses from a Windows- based developer/distributor. A secret code string must be 9 (o 16 characters long—consisting of at least one numeric character. For Windows, you need to submit it when you configure your Toolkit, while on Linux you use the same string to configure the SafeCfg. ‘These passwords, and your developer ID, are provided by S: can be found on the password sheet inc package. ‘afeNet Inc., and ided in your Sentinel SuperPro Once you enter the developer ID and passwords, the field exchange DIES are created, These DLLs use the developer ID and passwords for the attached key. ‘These DLLs are used to activate or update keys in the field. Ifyou enter an incorrect developer ID or passwords, you wi program keys in the Prototype your protection strategy. be unable to age, and thus will be unable to implement ‘To enter your passwords: Sentinel SuperPro 6.5 Developer's Guide 15 Chapter 5 - Starting the Sentinel SuperPro Toolkit Developer Configuration Dialog Box 1 In the Developer ID field, enter your developer ID. Tip: tf you want to be able to see the actual password and developer ID characters, select the Show Passwords check box. Password characters are hidden (displayed as asterisks) by default. 2. In the Overwrite Password 1 field, enter the first Overwrite Pass- word for your key. 116 Sentinel Superfro 6.5 Developer's Guide Chapter 5 — Starting the Sentinel SuperPro Toolkit 3. In the Overwrite Password 2 ficld, enter the second Overwrite Pass- word for your key. 4. In the Write feld, enter the Welte Password for your key. Note: Cells 8 and 9 are used internally while configuring a key. If you are re-configuring an already programmed key, the information stored in cells 8 and 9 would be lost 5. Ifyou want to include the Overwrite Passwords in the field exchange DLLs, or use the one-time update feature, go to “Include Overwrite Passwords in DSAPE.DLL and USAFE.DLL” on page 118, Otherwise. 20 to the next step. 6. Enter a secret code in the space provided. You may however click on. Auto Generate to get an auto generated code. . Click on ENABLE or DISABLE under One-time only license code update to allocatea single cell in the Sentinel SuperPro key for storage of the one-time update values. Ifyou sclect on ENABLE, then you may also select a storage cell from the Storage cell drop down on its right. else go to next step. 8, Click OK. Ifyou have already created projects with the Toolkit, be sure to read the warning message that appears thoroughly and take the approprl- ate action. ‘The Toolkit window appears. 9. Go to “Navigating in the Sentinel SuperPro Toolkit” on page 121 Note: ‘The Toolkit prompts an error message if'a proper key is not attached to your machine, when setting the developer configuration parameters, Sentinel SuperPro 6.5 Developer's Guide "7 Chapter 5 - Starting the Sentinel SuperPro Toolkit 18 About the Field Exchange DLLs ‘The fleld exchange DLLs—dsafe32.dll and usafe 32.dll—are generated each time you enter or change the developer ID and/or passwords in the Devel oper Configuration dialog box. If DLLs already exist on this workstatio they will be overwritten, as each time DLLs are generated they are different. Ifnew DLIs are generated, and you have already distributed the old DLLs with your protected software, you will be unable to reprogram keys using the old DLLs because your dsaje 32.dll won't match with the user's uusafe32.dll. In this case, be sure to create backups of your old DLLs so you can continue to reprogram existing keys in the field, Include Overwrite Passwords in DSAFE.DLL and USAFE.DLL The overwrite passwords are necessary whenever you want to change the value ofa locked data word or read-only cell on the key. Ifyou will be imple- menting the one-time update option for license codes (see below), you must include the overwrite passwords in your field exchange DLLs. When included in the DLLs, the overwrite passwords are encrypted. How- ever, SafeNet Inc. strongly recommends against including these passwords in your field exchange DLLs, as they could pose a security risk to your application. A talented hacker could possibly decrypt these pass- words, and use them Lo gain unauthorized access to your application. Think carefully before you choose to include the overwrite passwords in the field exchange DLLs. To Include the overwrite passwords in the field exchange DLLs: 1 lect the Include overwrite passwords in DSAFE.DLL and USAFE.DLL check box. A warning message appears. Read the warning message, then click OK. 3. Goto the next section. Sentinel SuperFro 6.5 Developer's Guide Chapter 5 — Starting the Sentinel SuperPro Toolkit Enabling the One-Time Update Option for License Codes ‘The one-time update option allows you to prevent license codes from being applied to a key more than once. The license code includes information about how a key should be updated, such as incrementing a license counter or activating an application. (For more information about license codes, see “What Isa License Code?” on page 268.) For example, ifa single license code that increments a counter is applied toa key multiple times, the counter will be incremented multiple times also, This ‘means that if license code that increments a counter by five is applied three times, the total incremented value will be 15~10 more than you intended. ‘To prevent users from applying a license code more than once, enable the one-time update feature. This feature uses a single cell to determine the validity of a license code. Ifthe value in the cell is not what is expected by the license code, the license code cannot be applied, and the kev will not be updated. Note: The one-time update option is available for use with both product keys and distributor keys, The one-time update feature requires the overwrite passwords to be included in your field exchange DLLs (see page 118). You may want to weigh the benefits of using the one-time update feature against the security risks inherent in including the overwrite passwords in the DLLs. ‘To enable the one-time update option 1. the Include overwrite passwords in DSAFE.DLL and theck box has been selected, 2. Under One-time only license code update, select Enable. A warn- ing message appears. 3. Read the warning message. then click OK. 4. In the Storage Cell field, select the cell you want the one-time update feature stored in. Select Auto to allow Sentinel SuperPro to select a cell for you. Once you select this cell. it cannot be moved or changed Sentinel SuperPro 6.5 Developer's Guide 119 Chapter 5 - Starting the Sentinel SuperPro Toolkit 5. Click OK, Ilyou have already created projects with the Toolkit, be sure to read the warning message that appears thoroughly and take the appropri ate action, See “The Toolkit prompts an error message if proper key is not attached to your machine, when setting the developer configura- tion parameters.” on page 117 for more information, ‘The Toolkit window appears. 120 Sentinel Superfro 6.5 Developer's Guide Chapter 5 — Starting the Sentinel SuperPro Toolkit Navigating in the Sentinel SuperPro Toolkit When you open the SSP Toolkit, the toolkit window appears with the Home stage open. This window contains the following components: Title Bar Menu Bar Orientation, Pane Navigation Pane Stage window Navigation Buttons Stage window (stages and sections) Navigation pane and buttons Orientation pane Menu bar ‘Title Bar Help buttons Sentinel SuperFro 6.5 Developer's Guide r21 Chapter 5 - Starting the Sentinel SuperPro Toolkit 122 Toolkit Window (with Design Stage Open) Stages and Sections The SSP Toolkit is made up of eight different stages. Stages appear in the stage window, where sections and sub-sections within the window help you navigate to the tasks necessary to implement your protection strategy. The stages are as follows: + Home ~The default stage th: No tasks are performed in th appears when the stage. SP Toolkit opens, + Overview — Sections in this stage introduce you fo Sentinel SuperPro concepts. This stage also features the API Explorer, where you can test APL function calls, view the key’s cell layout, and send queries to the key to obtain return values. + Project — This stage provides setup and configuration information, Create or open projects and enter your developer ID and passwords in this stage + Design ~The Design stage has two sections: Element List View and Flement Layout View. Use the Element Definition Wizard, accessible via Element List View, to define cell types and cell values. Element Layout View allows you to view and modify the location of algorithm, counter and data word cells on the hardware key. + Prototype —In this stage, you program the cells in the hardware key with the values defined in the Design stage, generating pseudocode for use in adding APT functions to your source code. This stage isa required stage. + Implementation —When you implement your strategy, you add the appropriate protection to your application code, either by adding a shell o the application's executable file, or adding API functions to the source code based on the pseudocode generated during prototyping, This stage also allows you to define the actions that can be taken through field activation, and is used to create license codes for distri- bution to customers who have purchased upgrades in the field. Sentinel SuperFro 6.5 Developer's Guide Chapter 5 — Starting the Sentinel SuperPro Toolkit + Make Keys — Hardware keys programmed with your protection strategy, as defined in the Design st .e, must be distributed with each copy of your software. The Make Keys stage allows you to program keys prior to distribution, + About — For more information about the version of the SSP Toolkit ‘you are using, of links to SafeNet Inc. information on the Web, go to this stage. No tasks are performed in this stage ‘The following table defines the tasks required to implement your protection strategy and what stage they arc located in: Sentinel SuperPro Toolkit Tasks and Corresponding Stages Home ‘Overview No tasks are performed in this stage. Tasks performed in this stage are for informational use only and are not required to Implemant a protection strategy. Project Create a new project or opan existing project. Enter your developer ID and passwords. Save an existing project Design Select integrated or automatic protection type. Select an activation type. Dafine time/date/execution controls (for demos only). ‘Add counters, passwords, sublicense limits and/or data words. Prototype Program attached hardware key memory cells. Generate pseudocode and field exchange data, Sentinel SuperFro 6.5 Developer's Guide 123 Chapter 5 - Starting the Sentinel SuperPro Toolkit 124 Sentinel SuperPro Toolkit Tasks and Corresponding Stages Implementation | Shell applications, View pseudocode and add appropriate API functions to application source code. Define field activation actions and commands. Generate license codes based on locking codes received from customers in the field who have purchased upgrades. Make Keys Program product keys for distribution to customers and distributor keys for use by distributors who will activate your application, ‘About No tasks are performed in this stage. Moving From Stage to Stage ‘To move from stage to stage, click on the stage name in the navigation pane. Once you have visited a stage, a check mark appears to the left of the stage name. Your navigation history for the current project is saved in the project file. You can also use the Back and Next navigation buttons, located beneath the navigation pane, to move sequentially through the stages. Stages are arranged in the order you will typically use them; however, you do not need to visit the stages in this order, nor do you need to complete all the sections in cach stage before moving to another stage. For example, you can go o the Project stage without first going to the Overview stage. ‘There is one exception to this rule, The Prototype stage is a required stage (identified by an asterisk [*] to the left ofthe stage name). You cannot g0 to the Implementation or Make Keys stages until you have completed the Prototype stage. The following diagram shows how you can move from stage to stage and section to section within the SSP ‘Toolkit: Sentinel SuperPro 6.5 Developer's Guide Chapter 5 — Starting the Sentinel SuperPro Toolkit 2 a é ‘.DAT file contains the data used to program your keys. and was created using the Sentinel Wizard in previous versions of Sentinel SuperPro. Sentinel SuperPro 6.5 Developer's Guide 137 Chapter 5 - Starting the Sentinel SuperPro Toolkit Note: .DAT files were created by Sentinel SuperPro versions 5.1 and earlier. Projects created using Sentinel SuperPro 6.0 were saved with a SPP extension, and may be opened using the pro: cedure on page 139. Files saved in NotSentinel cannot be openad in Sentinel SuperPro 6 5, ‘To import a .DAT file: 1. Navigate to the Project stage in a new project. 2. Click Import DAT File. The Open dialog box appears. 3. Browse to locate the .DAT file you want to import, then click Open. The DAT file, with the elements you defined in the previous version, is Imported into the current project, The elements are added to the cur- rent project, Ifthere are cell conflicts during the import process, a aused the conflict is, warning message appears and the element that not imported. You can merge two .DAT files into one project file by importing both DAT files into the same project file. Changing Your Developer ID or Passwords When creating a project, you may need to change the developer ID and/or passwords (for example, if you are using a different Sentinel SuperPro key). See “Entering Your Passwords” on page 114 for more information about your Developer ID, the Overwrite Passwords and the Write Password. ‘To change your developer ID and/or passwords: 1. Navigate to the Project stage. 2. Click Configure. The Developer Configuration dialog box appears, Note: Cells 8 and 9 are used internally while configuring a key. If you are re-configuring an already programmed key, the information stored in calls 8 and 9 would be lost. 138 Sentinel Superfro 6.5 Developer's Guide Chapter 5 — Starting the Sentinel SuperPro Toolkit 3. In the Developer ID field, enter your developer ID. Tip: If you want to be able to see the actual password and developer 1D characters, select the. Show Passwords check box. Password characters are hidden (displayed as asterisks) by default. Password 1 field, enter the first Overwrite P: 4. In the Overwrit word for your key. Password 2 field, enter the second Overwrile P 5. In the Overwrit word for your key. 6. Inthe Wi fleld, enter the Write Password for your key. 7. Click OK. A warning message appea 8, Read the warning message thoroughly, and take the appropriate action. See “The Toolkit prompts an error message if a proper key is not attached to your machine, when setting the developer configura tion parameters,” on page 117 for more information. ‘You are returned to the Project stage. Opening an Existing Project Once you have saved a project, you can re-open it later to edit it, program, keys, or generate license codes for customer upgrades. ‘To open an existing project: 1. Navigate to the Project stage. 2. Click Open. ‘The Open dialog box appears. 3. Browse to locate the Sentinel SuperPro project you want to open, then click Open. Sentinel Superfro 6.5 Developer's Guide 139 Chapter 5 - Starting the Sentinel SuperPro Toolkit All Sentinel SuperPro projects have an extension of SPP 4, Iyou haven't saved the currently open project, you are asked if you want to save the current project. Click Yes to save your changes, or No to discard them. the project unlock pa s locked, the Password dialog box appears. Enter the ford. The project opens in the SSP Toolkit. See “Adding Password Protection to Your Project” on page 140 for more information about locked projects. Saving Your Project We recommend saving your project often, particularly when you first open or before you close the SSP Toolkit. wwe your project with the existing name, from the File menu, select, Tip: You can verity the name of the project you are currently viewing by looking at the Sentinel ‘SuperPro window title bar, where the name of the project is displayed + To save the project under another file name: 1. From the File menu, select Save As. The Save As dialog box appears. 2. Enter the new project name in the File Name fleld, then click Save. ‘The project is saved under the new file name. Adding Password Protection to Your Project To protect against unauthorized access to your project, we recommend you lock your project. Locking adds password protection (o your project, so that you must enter a password to open it in the SSP Toolkit. 140 Sentinel SuperFro 6.5 Developer's Guide Chapter 5 — Starting the Sentinel SuperPro Toolkit Password-protecting your project is particularly important, as whoever has \ecess to your project file also has access to your Developer ID, Write Pass- words, commands and actions. When you open a locked project, you have three tries to enter the correct password. Ifthe correct password is not entered after three attempts, you are locked out of the project, Open the project again to continue trying to enter the correct password. Warning! f you forget your password, you will need to recreate your project. There is no “back- door” that SafeNet Inc, Technical Support can use to give you access to your project. ‘Thus, It Is VERY Important that you remember the password you use to lock your project. Locking a Project 1. In the SSP Toolkit, open the project you want to lock. 2. Navigate to the Project stage. 3. Click Lock. The Password dialog box appears. eer Password Dialog Box Sentinel SuperFro 6.5 Developer's Guide 141 Chapter 5 - Starting the Sentinel SuperPro Toolkit 4, In the New Password field, enter the password you want to use to lock the project. Ps sensitive and are limited to 12 characters, 5. In the Confirm Password field, enter the same password again for confirmation. 6. Click OK. The project is locked. ‘The next time you open it, you will be required to enter the password you selected in step 4 Changing the Password for a Locked Project You can change the password for a locked project at any time, as long as you know the existing password. To change the password: 1, Open the project whose password you want to change. 2. Navigate (o the Project stage. 3. Click Lock. The Password dial 1g box appears. 4. In the Old Password field, enter the existing password. 5. In the New Password field, enter the new password, 6. In the Confirm Password ficld, enter the new password again for confirmation, Click OK. The password for the locked project is changed. The next time you open the project, you will need to enter the new password. Unlocking a Project ‘To unlock a project and remove the password protection: 1, Open the project you want to unlock. 2. Navigate to the Project stage. 3. Click Unlock. The Password dialog box appears. 142 Sentinel Superfro 6.5 Developer's Guide Chapter 5 — Starting the Sentinel SuperPro Toolkit 4. Enter the password for the locked project, then elick OK. Password protection is removed from the project and the Unlock but- ton becomes unavailable, indicating the project is no longer locked. Creating a Project File for Distributors ‘To avoid giving your distributors access to your passwords—which would also give them the ability to change field activation commands or other cle ‘ments in your protection strategy—we recommend creating a project file specifically for your distributors. This special file, a .DST file, allows your distributors to activate and update product keys, but prevents them from making changes to your strategy. The DSY Dll also prevents distelbutors from increasing the number of licenses able on their distributor keys by incrementing the distributor counter. Your distributor will need to open the .DST file in the License Generator Util- ity in order to generate license codes and activate or update product keys. For more information about how the distributor updates keys using this file, see “How Distributors Activate an Application” on page 269. ‘To create a DST file: 1. In the SSP Toolkit, open the project you want to create a distributor's file from, While in any stage, from the File menu, select Export .DST File, The Save As dialog box appears. 3. Enter the distributor file name in the File Name field, then click Save. ‘The distributor file is saved under the file name you entered, with a DST extension. Itis now ready to be sent to your distributors. Sentinel SuperPro 6.5 Developer's Guide 143 Chapter 5 - Starting the Sentinel SuperPro Toolkit Closing the Sentinel SuperPro Toolkit ‘To close the SSP Toolkit: 1. From the File menu, select Exit Ifyou have made changes to your project, but haven't saved them, you are prompted to do so. Click Yes to save your changes or No to discard them. 144 Sentinel SuperPro 6.5 Developer's Guide Chapter 6 Protecting Your Application When you start designing your protection strategy, the first decision you need to make is whether you want to protect your application using one of the predefined protection types—integrated or automatic—or if you want to add your own custom elements, Custom elements are individual algorithms, counters, sublicense limits or data words. You define not only the values for these elements, but also their location on the key. For more information about using custom elements, see Chapter 7, “Working With Design Elements,” on page 185. This chapter explains how to protect your application using one of the pre- defined application protection types. We recommend selecting and imple- ‘menting one of these types for every application you are protecting. If you want (o also use custom elements, you can do so in addition to the standard application protection, This chapter covers the following topics: m= What Is application protection? m Selecting a protection type = Using integrated protection = Using automatic protection Sentinel Superero 6.5 Developer's Guide 145 Chapter 6 - Protecting Your Application What Is Application Protection? 146 Application protection is an algorithm with an associated activation type as determined by the options you choose to include in your strategy. Applic tion protection can be either integrated or automatic. The protection type determines when and where software locks are implemented When you choose integrated protection, you add software locks—API func- tions—directly into your application's source code. You control the amount and location of the locks. ‘When you use automatic protection, Sentinel SuperPro wraps a protective layer, called a shell. around your application's executable file. This layer encrypted, making it more difficult for a hacker to gain access to your appli- cation’s code. Whatever level of protection you decide to implement, the overall goal is to have your application periodically check that the key is present. As long as your application takes appropriate measures ifthe key Is not attached, only legitimate purchasers will be able to use your application.Both stand-alone and network applications can use either protection type. Note: If you apply both automatic and integrated protection to your application, ‘when the automatic portion of the application executes it will run in the ‘mode set during protection (i.e. either Standalone, Network, or dual). ‘When the integrated portion of the application executes, it will run in the access mode you set in code, or dual mode If no access mode was specified. See "Setting the Access Mode” on page 103 for more information, For more information about application protection types. and examples of when you should choose one over the other, please see “Protection Types" on page 61. Demo Applications With both types of application protection, you can designate your applica- tion as being a demonstration (demo) or trial version through the use of a counter that controls the number of times the application can run before it expires. Sentinel Supertro 6.5 Developer's Guide Chapter 6 - Protecting Your Application For example, set the demo counter value to 5, Bach time the application is run, the counter is decremented by one. The sixth time the user tries to run. the application, it won't allow him to run, because the execution counter has expired, which deactivates the algorithm, and the algorithm returns an invalid response. ‘The action to tke fa key is mtsing or the Heense s denied is upto the developer How a Demo Application Runs Ifyou choose to use automatic protection, Sentinel SuperPro provides increased control over demo applications. In addition to the execution counter, you also have the ability to control the length of time or number of days the application can be run. You can also define a static expiration date for the demo application. ‘When an application (using elther protection type) Is designated as a demo, itsactivation type must be static or rusted, so that it can be re-activated with Sentinel superrro 6.5 Developer's Guide 147 Chapter 6 - Protecting Your Application password when itexpires and you have verified purchase of the full version ofthe application, For more information about designating demo applications, see “Control ling Demo App! 148 ‘Sentinel SuperPro 6.5 Developer's Guide Chapter 6 - Protecting Your Application Selecting a Protection Type ‘The first step in applying application protection Is to select whether you want (o use automatic or integrated protection, The Element Definition Wiz ard, accessible via the Element List View tab, will walk you though the process of adding protection to your application. ‘To add protection to your application: 1. Navigate to the Design stage. 2. Verify you are on the Element List View tab. 3. Select Automatic Protection or Integrated Protection, then click Next. Note: Before you create the first element in your protection strategy, you need to decide whether you will be using SuperPro XM or SuperPro keys for your design. When you click on one of the buttons in the “Add element” group, you will be asked to specify whether the design will be used with SuperPro XM or SuperPro keys. Alternatively, you can specify SuperPro XM keys by clicking on the “Enable SuperPro XM Features” check box in the lower right-hand corner before creating the first element. 4, In the Name field, enter a name for this element. We recommend using the name of the application you are protecting ‘There is a 16-character limit for element names. For example, if you are using automatic protection to protect the SceneryLditor application, you might name the element Scenery (Auto). ent list, you'll quickly be able to rec~ cons in the ele- ‘This way, when viewing the ele ognize what applications you have protected. The ment list show you what kind of application prote each application. jon is used for Sentinel Superero 6.5 Developer's Guide 149 Chapter 6 - Protecting Your Application Tip: This name will be used throughout the SSP Toolkit to identify this element, so be sure it adequately describes the element. 5. In the Comments field, ent er any additional information about the clement you want to sav field optional, 6, Click Next « Do one of the following: 4 Ifyou selected Integrated Protecti mn, go to the next section to u Ifyou selected Automatic Protection, select show advanced options check box (o view the advanced options, Go to “Using Automatic Protection” on page 157 to continue. 150 Sentinel Supertro 6.5 Developer's Guide Chapter 6 - Protecting Your Application Using Integrated Protection Complete the steps in the following sections to finish defining your applica- tion protection. Defining integrated Protection Options Selecting the Cell Address L, From the Address drop-down list, select the address of the cell you want the first word of the element to be placed in. Ifthe location is unimportant to you, select Auto to allow the SSP Toolkit to select a location for you. Sentinel superrro 6.5 Developer's Guide 151 Chapter 6 - Protecting Your Application Overriding the Default Algorithm Values Sentinel SuperPro generates random algorithm values. We recommend that you accept the default algorithm values. ‘To accept the default algorithm values, skip this section and go to “Selecting the Activation Type” on page 155. Ifyou want to define your own algorithm values, review the information in “Algorithm Values” on page 35, then do the following: 2. Select the Override Default Igorithm check box 3. The algorithm value fields appear, Note: Throughout the SSP Toolkit, only valid and available coll addresses are pro- vided in Address drop-down lists, preventing you from selecting an inap- propriate address Numeric Assistant dialog box 4. In the Algo 1 field, click the arrow button to access the Numeric Assistant dialog box. Numeric Assistant Dialog Box 5. Do any of the following, as neces value: ary to generate your hexadecimal 152 Sentinel Supertro 6.5 Developer's Guide Chapter 6 - Protecting Your Application To generate a random value, click Randomize. ‘The Numeric Assistant generates a random value, and provides you with the hexadecimal, decimal and binary equivalents of that, value, You can click Randomize as many times as you like. wu To convert a decimal value to a hexadecimal value, enter the value in the Decimal field. The Numeric As lly calculates the corresponding hexadecimal a stant automatic \d binary values. 6. Click Close. [he value from the Hexadecimal field Is transferred to the Algo 1 fleld, —4 for the Algo 2 fleld. Repeat steps Note: If you already know the value you want to use for the algorithm words, you can enter it directly in the Algo 1 and Algo 2 fields. Algo 1's the first algorithm word and Algo 2 is the second algorithm word. When you select an activation type, the Algo 2 value will be automatically changed, as nec- essary, to make the algorithm active or Inactive. 8, ‘The AES algorithm engine is selected by default for protection strate- gies using the SuperPro XM key. This is the most secure algorithm engine. However, you can select one of the other two algorithm engines (Enhanced and Simple) if desired for backward compatibility with previous protection strategies, The Enhanced algorithm engine is selected by default for protection strategies using the SuperPro key. This is the most secure algorithm engine for that key type. The AES algorithm engine is unavailable in SuperPro keys, however, you may select the Si gorithm engine ckward compatibility reasons. Sentinel Supertro 6.5 Developer's Guide 153 Chapter 6 - Protecting Your Application 154 Adding a Demo Counter ‘This is an optional setting. If you don't want to make this application a demo application, skip this section and go to “Selecting the Activation Type” on’ page 155. Ifyou want to make this application a demo application that can be used for a limited number of times. as explained in “Demo Applications” on page 146, do the followin, 9, Select the Demo Counter check box. 10. In the counter value box, enter a number representing the number of times you want to allow the demo application to be executed. For example, ifyou enter 5, the application can be run five times. The sixth time the user tries to run the application, they will be unable to. 11, Click Next Goto the next section, Sentinel Supertro 6.5 Developer's Guide Chapter 6 - Protecting Your Application Selecting the Activation Type Next, you need to choose an activation type to use. Selecting Activation Type Options ‘To select an activation type: 1, Select the activation type you want to use for this application: Active, Static, Trusted or Distributed. Tip: For more information about activation types, including when to use each ‘ype, please see “Activation Types” on page 63. Do one of the following: Ifyou chose Active, go to step 6. Sentinel superrro 6.5 Developer's Guide 155 Chapter 6 - Protecting Your Application 156 Note: Tip: Ifyou chose Static and want to override the default activation passwords, select the Override default passwords check box. The activation password fields appear. Go to step 3. Ifyou chose Trusted or Distributed, or you chose Statie but don't want to override the default activation passwords, go to step 5. I you selected Trusted or Distributed, you cannot override the default act!- vation passwords. Unique activation passwords are generated based on the developer ID, serial number and product information. See the table “activation Types” on page 63 for more information about the Trusted and Distributed activation types. In the Password I field, click the arrow button to access the Numeric Assistant dialog box. and enter an activation password for the first word of the algorithm, See page 152 for Instructions on using the Numerle Assistant dialog box. Repeat step 3 for the Password 2 ficld to enter a password for the see- Do one of the following: 4 Ifyou want to use the Client Activator to develop product-specific ation information for the application, select the Use Client rator check box, then click Configure to launch the Activation Wizard. ‘When you have completed defining your application's activation information, save your project and close the Activation Wizard to return to the SSP Toolkit. w_ Ifyou don't want to use the Client Activator, go to the next step. For more information about the Client Activator, see "Using the Client Acti vator” on page 271. You may also want to rafer to the Client Activator docu- mentation, included in the Client Activator package. Sentinel Supertro 6.5 Developer's Guide Chapter 6 - Protecting Your Application 6, Click Next. Flement definition is complete and you are returned to the Blement List View tab, where your application now appears in the list. Using Automatic Protection Complete the steps in the follo tion protection, 1g sections to finish defining your applica- Entering a Name for the Protection Element a Feteetecrecel Defining Automatic Protection Options 1. Enter a name for the protection element in the Name field 2, Enter your comments in the Comments text area. Tip: Be sure to select the Show advanced options check box to view the Sentinel superrro 6.5 Developer's Guide 157 Chapter 6 - Protecting Your Application advanced automatic protection options, later in the wizard. Selecting the Cell Address ‘Ss etary apes ep Selecting the Cell Address 1. From the Address drop-down list, select the address of the cell you ‘want the first word of the element to be placed in. If the location fs unimportant to you, select Auto to allow the SSP ‘Toolkit to select an appropriate location for you. Note: Be sure to review “Valid Algorithm Addresses” on page 37 for more infor- mation about where elements can be placed on the key. 158 ‘Sentinal SuperPro 6.5 Developer's Guide Chapter 6 - Protecting Your Application Overriding the Default Algorithm Values Sentinel SuperPro generates random algorithm values. We recommend that you accept the default algorithm values. m= Ifyou want to accept the default values, skip this actlion—go to “Selecting the Input and Output Files” on page 160. = Ifyou want to define your own algorithm values, review the information in “Algorithm Values” on page 35, then return to this procedure, ‘To select your own algorithm values: 2. Select the Override default algorithm values check box. ‘The algorithm value flelds appear. 3. In the Algo 1 field, click the arrow button to access the Numeric Assistant dialog box. Numeric Assistant Dialog Box 4. Do any ofthe following, as necessary to generate your value: @ To generate a random value, click Randomize. The Numeric Assistant generates a random value, and provides you with the hexadecimal, decimal and binary equivalents of tha value. You can click Randomize as many times as you like. Sentinel superrro 6.5 Developer's Guide 159 Chapter 6 - Protecting Your Application 160 uw Toconvert a decimal value to a hexadecimal value, enter the value in the Decimal field ‘The Numeric Assistant automatically calculates the corresponding hexadecimal and binary values. 5, Click Close. ‘The value from the Hexadecimal field is transferred to the Algo 1 field, 6, Repeat steps 3 ~4 for the Algo 2 field. Note: If you already know the value you want to use for the algorithm words, you can enter it directly in the Algo 1 and Algo 2 fields. Algo 1 is the first algorithm word and Algo 2s the second algorithm word. When you select an activation type, the Algo 2 value will be automatically changed, as nec- essary, to make the algorithm active or inactive. ‘The AES algorithm engine is selected by default for protection strate- gles using the SuperPro XM key. This is the most secure algorithm. engine. However, you can select one of the other two algorithm engines (Enhanced and Simple) ifdesired for backward compatibility with previous protection strategies ‘The Enhanced algorithm engine is selected by default for protection strategies using the SuperPro key. This is the most secure algorithm engine for that key type. ‘The AES algorithm engine Is unavailable in SuperPro keys, however, you may select the Simple algorithm engine iftdesired for backward compatibility reasons. 8. Goto the next section, Selecting the Input and Output Files Next, you need to select the executable fle (EXE or DLL) you want to apply the shell to, This file fs the ipuct file, You also need to select the path and file name you want the protected application's executable fle written to. This is Sentinel Supertro 6.5 Developer's Guide Chapter 6 - Protecting Your Application the output file—the file you will ship to your customers. You must select both an input file and an output file. Sect tet meri nmeteni moter aed Selecting the Input and Output Files ‘To select the input and output files: 1, Click the browse button [712] located above the Input field. The Open dialog box appears. Browse to locate and then select the executable file you want to pro- tect. then click Open. The executable file's path appears in the Input File field, Note: There is a 127-character limit for the path of the input or output files. if the file you want to shell isin a path that exceeds this limit, an error mes- sage will appear at the Prototyping stage. Move the file toa path with Sentinel superrro 6.5 Developer's Guide 161 Chapter 6 - Protecting Your Application shorter directory names, then update the location and click Next again to continue. 3, Click the browse button |i J located above the Output File field. The Open dialog box appears. 4, Browse to locate the directory path you want the protected executable file placed in aficr the shell is added, Be sure to enter a file name for the shelled executable file at the end of the path. 5, Ifyou want the shelled file to overwrite an existing file with the same name, select the Overwrite existing output file check box. Warning! If you specify the shelled application's executable file to have the same name as the non-shelled file, and you select the overwrite option, the non shelled file will be overwritten with the shelled file. ‘We recommend changing the name of the output file to something different than the original file to preserve an original, unshelled copy of your application's executable file. You may also want to make a backup copy of your unshelled executable file. 6. You must also decide how and where you want your protected appli- cation to access the key. Choose any of the options given below before clicking Next m= Stand-Alone: The RNBO_STANDALONE access mode is followed. Network: This option requires the SuperPro server. The RNBO_SPN_SERVER_MODES access mode is followed, unless a specific server is set through the configuration file sntlconfig.xml. This is also the default mode. ‘The sntleonfig.xml is preferred over NSP_HOST environment variable over the settings done using the automatic protection wizard in ‘Toolkit is available only with the Network option. 162 Sentinel Supertro 6.5 Developer's Guide Chapter 6 - Protecting Your Application All Modes: ‘The RNBO_SPN_ALL_MODES access mode is followed. You can also enable license sharing by selecting Enable license sharing check box. Selecting the Use Sublicensing check box will enable your application to acquire a single license if more than one for opening the protected application originates from the cat (ic. a combination of User Name and MAC Address) 8, You can optionally choose a cell address from the Address drop down orsimply select Auto to let the Toolkit assign a cell automatically. You add a counter value for the Value field. It allows to restrict the number of sublicense issued to a protected application, 9, Goto the next section. Selecting Automatic Protection Execution Options Using automatic protection gives you more control over demo applications, than integrated protection. You have three options for limiting the execu- tion of an application: You can specily the last date the application can be run. = You can limit the number of executions allowed. © Youc: limit the time allowed to use the demo application. Ifyou select two or three limits, the applic limitis reached, ion will expire as soon as amy ‘You must also select a cell in which to store the desired limit—Sentinel SuperPro programs the limits you set into the cells you select. For execution and time control, these cells are programmed as counters, For date control the cell is programmed as a locked data word. Ifyour application uses execution or time control, it reads the value of the selected counter when it is run. Depending on the value, one of the follow ing occurs: Sentinel Superero 6.5 Developer's Guide 163 Chapter 6 - Protecting Your Application = Counter Value = 0: The application is not allowed to start, and an error message appears. Iftime control isbeing used, the application is, allowed to finish the current session & Counter Value = 1-65534: The counter is decremented every time the application is launched or time elapses, depending on the option selected. = Counter Value = 65535 (Offffh = -1): The application rans without decrementing the counter. This allows the same executable to function as both a demo and an unlimited usage product. Selecting Execution Options 164 ‘Sentinal SuperPro 6.5 Developer's Guide Chapter 6 - Protecting Your Application Use the following table to decide which options you want to use. You can select any, all or none of these options. Expiration Date ‘Allows you to control when the application can be run, by specifying a static expiration date. When the date Is reached, the application will no longer run. Uses a data word cell that is queried ‘each time the application is run. A second data word stores the date the application was last executed, to protact against date tampering. 1. Select the Expiration Date chack box. 2. In the date fiald, click the arrow to ‘access a calendar, than select the expi- ration date by clicking on It. 3. In the Cell field, solect the cell you ‘want the data placed in. Select Auto if you want Sentinel SuperPro to select a ‘ell for you. Execution Control ‘Allows you to limit the number of ‘times the application can be run. Uses a counter cell that Is decremented by one each time the application is run. 1. Select the Execution Control check box. 2. In the Cell field, select the cell you want the counter placed in. Select, Auto if you want Sentinel SuperPro to select a cell for you. 3. In the Value field, enter a number rep- resenting how many times you want. to allow the application to be run. Sentinel Supertro 6.5 Developer's Guide 165 Chapter 6 - Protecting Your Application Option Description To Enable: Time ‘Allows you to control how long the | 1. Select the Time Control check box. Control application can be run for, in days, 2. In the Days, Hours, and/or Minutes hours and/or minutes. The timer fields, enter numbers representing ‘begins the first time the application is | how long you want the application to executed, Uses a counter cell. be active. 3. In the Cell field, select the cell you For example, if you set the time want the timing data placed in, Select control to10 minutes, the counter Auto if you want Sentinel SuperPro to cell value Is 2 (two increments of 5 select the cell for you. ‘minutes each). When the user runs the application for the fist time, the counter is decremented right away by ‘one (5 minutes). Time Five minutes later, the counter is Control | decremented again to 0. At this (cont'd) | point, the application will continue to run for an unlimited amount of ‘time, until the user closes it. However, ‘once the user closes the application, she won't be able to run It again because the counter = 0. Thus, its possible for the application to run for a shorter or longer amount of time than that you identity in the time control. You can select a maximum of 225 days, 24 hours and 60 minutes. Note: In Sentinel SuperPro 6.0, you were able to control how often the applica- tion checked for the presence of the key (the “background check” option), This option is now automatically set forall applications using automatic protection. The application will check for the presence of the key every ‘minute; if the key does not respond, the application will shut down. 166 Sentinel Supertro 6.5 Developer's Guide

You might also like