Comet Cryptographic Support

From CometWiki

(Difference between revisions)
Jump to: navigation, search
(Internet Basic Support)
(Internet Basic Support)
Line 38: Line 38:
Cryptography in Comet is accomplished through the use of the below listed IB (Internet Basic) statements.
Cryptography in Comet is accomplished through the use of the below listed IB (Internet Basic) statements.
*[http://wiki.signature.net/index.php/IB_Statements/encrypt Encrypt]
*[http://wiki.signature.net/index.php/IB_Statements/encrypt Encrypt]
 +
**This statement is used to encrypt a block of data.
*[http://wiki.signature.net/index.php/IB_Statements/decrypt Decrypt]
*[http://wiki.signature.net/index.php/IB_Statements/decrypt Decrypt]
 +
**This statement is used to decrypt a block of data.
*New - [http://wiki.signature.net/index.php/IB_Statements/cryptosetkeyinfo CryptoSetKeyInfo]
*New - [http://wiki.signature.net/index.php/IB_Statements/cryptosetkeyinfo CryptoSetKeyInfo]
**This statement is used to identify the desired algorithm and to supply all of the parameters required for encryption/decryption. Because a Key and IV must be specified at this time, the SEED value normally supplied to the encrypt/decrypt functions is not used and will be ignored.
**This statement is used to identify the desired algorithm and to supply all of the parameters required for encryption/decryption. Because a Key and IV must be specified at this time, the SEED value normally supplied to the encrypt/decrypt functions is not used and will be ignored.

Revision as of 23:08, 6 June 2010

Contents

[hide]

Comet Cryptographic Capabilities

Supported Encryption Algorithms

  • RC4 - Rivest Cipher 4: Wiki
  • 3DES - Triple Data Encryption Standard: Wiki
  • AES - Advanced Encryption Standard: Wiki

Supported Hashing Algorithms

  • SHA1 - Secure Hash Algorithm 1: Wiki
  • MD5 - Message Digest 5: Wiki

Encryption Algorithm Implementation

The following text describes the specifications/requirements for each of the supported algorithms.

RC4 - Rivest Cipher 4: Wiki

  • Key Length: Typically 40-256 bits (5-32 bytes)
  • Block Size: NA
  • Mode: NA
  • IV Required: No
  • This is the simplest and fastest of the supported algorithms and is the algorithm currently used by Comet-16 and is the default algorithm used by Comet-32. See Encrypt/Decrypt

3DES - Triple Data Encryption Standard: Wiki

  • Key Length: 168 bits although 192 bits (24 bytes) must be supplied (parity bits are discarded).
  • Block Size: 8 Bytes
  • Mode: CBC - Introduces feedback by combining ciphertext and plaintext
  • IV Required: Yes

AES - Advanced Encryption Standard: Wiki

  • Key Length: 128, 192, 256 bits
  • Block Size: 16 Bytes
  • Mode: CBC - Introduces feedback by combining ciphertext and plaintext
  • IV Required: Yes

IV - Initialization Vector Wiki

In Comet the AES and 3DES algorithms are implemented using CBC (Cypher Block Chaining) mode which incorporates feedback from previous cypher operations while encrypting the plaintext. Because at the onset of the encryption there is no feedback information available, it becomes necessary to supply some initial data that can be used to ensure adequate concealment of the initial block of data. To ensure proper concealment of your data a IV or "Initialization Vector" must be supplied to the encryption code. The size of a IV should be the same size as the chosen algorithm's Block Size (8-3DES, 16-AES). This IV value should be unique and must be used for both encrypt and decrypt operations. There is no need to conceal the IV as it cannot be used to learn anything about the key or plaintext and as such it may be stored with the encrypted data. You can use the IB statement CryptoGenerateRandom to create an IV of any desired length.

Internet Basic Support

Cryptography in Comet is accomplished through the use of the below listed IB (Internet Basic) statements.

  • Encrypt
    • This statement is used to encrypt a block of data.
  • Decrypt
    • This statement is used to decrypt a block of data.
  • New - CryptoSetKeyInfo
    • This statement is used to identify the desired algorithm and to supply all of the parameters required for encryption/decryption. Because a Key and IV must be specified at this time, the SEED value normally supplied to the encrypt/decrypt functions is not used and will be ignored.
  • New - CryptoGenerateRandom
    • This statement will generate a binary string of random characters of any length. It can be used for Key and IV generation.
  • New - CryptoCreateHash
    • This statement will generate a hash of the supplied string as defined by the specified hashing algoritm.
Personal tools