|
|
|
||||||
|
|
|||||||
HbCrypt REFERENCECopyright© 2001. Dogtec, LLCVersion 2.0.0 Expand all
Retract all
HbCrypt Hybrid Encryption LibraryThe HBCrypt library is interfaces the following components:
HbEngine ComponentThe HbCrypt ASP Component allows to encrypt and decrypt using hybrid encryption. Description:
The symmetric encryption uses the Rijndael algorithm, recently adopted by NIST as the new AES (Advance Encryption System). It is implemented with a 256 bits key and 16 bytes blocks in CBC mode. A random session key is generated each time a string is encrypted; The session key is then encrypted with the public algorithm and appended to the encrypted string. The public algorithm used by HbCrypt is RSA. All RSA key lengths are supported, but the Key Manager Utility currently allows the creation of 512, 1024 and 2048 bits keys. This is what is practical given the current computer processing power. The random data used to generate the keys are obtained with the ISAAC algorithm form Bob Jenkins. New in version 2: The private keys can optionally be encrypted in the key ring file so that no intruder can use the keys without knowing a secrete pass phrase. The private keys are encrypted with the Rijndael algorithm with a key derived from the secrete pass phrase using the SHA-256 hash function. The user interface of the component is multilingual. English and French are supported in a single DLL at this time. Usage:The Hb engine is easy to use.
HbCrypt Properties property: ActiveLanguage: Integer
Use this property to read or set the active language for the components. English is 0, French is 1. property: KeyProtected: Wordbool
This property returns true if the loaded private key is encrypted. If it is encrypted, it is protected by a secrete pass phrase. properties: PublicKeyBits and PrivateKeyBits: String
Use this property to read the length of the RSA public or private key. The possible values are: 512 bits key. 1024 bits key. 2048 bits key. Read only. property: PrivateKey: String
Use this property to read or write the private RSA key string. The key string is a base 64 encoded string representing the key. property: PublicKey: String
Use this property to read or write the public RSA key string. The key string is a base 64 encoded string representing the key. properties: PublicKeyFileName and PrivatekeyFileName: String
Use this property to read or write the file name of the RSA public or private key. The file name should include the complete path. properties: PublicKeyFileName and PrivatekeyFileName: String
Use this property to read or write the name or description of the RSA public or private key. HbCrypt Methods Method: Burn()
The Burn method deletes all sensitive RSA information in memory. It should be called after every use of HbCrypt. This will not affect the performance of HbCrypt. No return value Method: DecryptString(InputString, Pass: String)
The DecryptString method decrypts the string passed in the parameter InputString. The parameter is passed on the stack so you risk a stack overflow if you try to pass to long of a string. If the loaded private key is encrypted, you must pass the pass phrase in the Pass parameter, otherwise, pass an empty string. To decrypt large amounts of data, save them to a file and use the DecryptFile method. The return value is the decrypted string. A valid key must first be loaded in the HbCrypt object before this method can be used. Normally the key will have been loaded from a file with the LoadPrivateKey method. Method: DecryptFile(FileName, Pass: String)
The DecryptFile method decrypts the file passed in the FileName parameter. The FileName parameter should include the whole path of the file. If the loaded private key is encrypted, you must pass the pass phrase in the Pass parameter, otherwise, pass an empty string. The return value is an OLEVariant containing the stream of decrypted data. A valid key must first be loaded in the HbCrypt object before this method can be used. Normally the key will have been loaded from a file with the LoadPrivateKey method. Method: EncryptString(InputString: String)
The EncryptString method encrypts the string passed in the parameter InputString. The parameter is passed on the stack so you risk a stack overflow if you try to pass to long of a string. To encrypt large amounts of data, save them to a file and use the DecryptFile method. The return value is the encrypted string. A valid key must first be loaded in the HbCrypt object before this method can be used. Normally the key will have been loaded from a file with the LoadPublicKey method. Method: EncryptFile(FileName: String)
The encryptFile method encrypts the file passed in the FileName parameter. The FileName parameter should include the whole path of the file. The return value is an OLEVariant containing the stream of encrypted data. A valid key must first be loaded in the HbCrypt object before this method can be used. Normally the key will have been loaded from a file with the LoadPublicKey method. Method: LoadPrivateKey(FileName, KeyName: String)
The LoadPrivateKey method loads a private RSA key from a private key ring file. The FileName parameter is the complete path of the file. The KeyName parameter is the name of the key previously saved in the key ring. The file format is a text file with the first line being the base64 encoded private key (PrivateKey property) and the second the name or description of the key. You can generate the keys and the key files with the standalone encrypt/decrypt utility or the MS Outlook com add-in component. Method: LoadPublicKey(FileName, KeyName: String)
The LoadPublicKey method load a public RSA key from a public key ring file. The FileName parameter is the complete path of the file. The KeyName parameter is the name of the key previously saved in the key ring. The file format is a text file with the first line being the base64 encoded public key (PublicKey property) and the second the name or description of the key. You can generate the keys and the key files with the standalone encrypt/decrypt utility or the MS Outlook com add-in component. HbKeyManager ComponentThis is the utility component to create and manage RSA public and private keys. HbKeyManager Methods Method: Execute()
The Execute method opens the dialog box that allows you to manage and create keys. First, you select the length of the keys you want to use. Then you click on the Create Keys button. Then you enter some random data to seed the ISAAC random number generator. You decide if you want to protect your private key by a secrete pass phrase. If you want you may protect your key with a pass phrase later, but in either case, this cannot be undone. Then you enter a name or description for each key in the name field. When the keys are created, you normally save them to files. You can also load keys that you created before or that someone sent you. In this dialog, you can merge keys from multiple key ring files. You may change the active language by selecting it from the language combo box. Method: GetPassPhrase(const ACaption, Prompt: WideString): WideString
The GetPassPhrase method opens a dialog box that asks for the secrete pass phrase. The ACaption parameter is displayed in the caption of the window. The Prompt parameter is displayed as a prompt. The return result of the function is the pass phrase or an empty string if the user did not press the OK button. HbCryptAddIn ComponentThe Microsoft Outlook com add-in allows you to encrypt and decrypt email messages in the Microsoft Outlook user interface. Description:
The add-in has to be registered with outlook to be loaded when outlook starts. The following lines in a reg file with do that: [HKEY_CURRENT_USER\Software\Microsoft\Office\Outlook\Addins\HbCrypt.HbCryptAddIn] "FriendlyName"="Hb Encryption" "LoadBehavior"=dword:00000003 After the add-in is registered, there should be 5 new buttons and menu items to encrypt or decrypt messages or files and do the key management. The add-in calls the HbKeyManager component to do do the key management.
|
||||||||