Oracle Consulting Oracle Training Oracle Support Development
Home
Catalog
Oracle Books
SQL Server Books
IT Books
Job Interview Books
eBooks
Rampant Horse Books
911 Series
Pedagogue Books

Oracle Software
image
Write for Rampant
Publish with Rampant
Rampant News
Rampant Authors
Rampant Staff
 Phone
 800-766-1884
Oracle News
Oracle Forum
Oracle Tips
Articles by our Authors
Press Releases
SQL Server Books
image
image

Oracle 11g Books

Oracle tuning

Oracle training

Oracle support

Remote Oracle

STATSPACK Viewer

Privacy Policy

 

   
  SQL Server Tips by Burleson

Helix Stream Cipher

Helix is a high-speed cipher developed by Niels Ferguson, Doug Whiting, Bruce Schneier, John Kelsey, Stefan Lucks, and Tadayoshi Kohno. It includes encryption / decryption and a Message Authentication Code (MAC) in the one algorithm. It incorporates a 128-bit key and is designed to operate quickly on modern CPU’s such as a Pentium 2 and later. Because the MS CryptoAPI does not include support for this algorithm, we must implement support directly for it in XP_CRYPTOAPI. A C++ implementation of the algorithm is available from PJ’s web site at www.naughter.com and we simply incorporate this code directly into the XP_CRYPTOAPI code. Because it includes hashing as well as encryption, the parameters to the Helix XP’s are different than the MS CryptoAPI examples provided so far. For encryption we have an additional output parameter, which contains the MAC. For decryption, this MAC becomes an additional input parameter. The code continues to use the CryptoAPI to create the contents for the key from the password parameter. The key is setup using the following code:

BYTE* pHashData = (BYTE*) _alloca(dwHashSize);
if (CryptGetHashParam(hHash, HP_HASHVAL, pHashData, &dwHashSize, 0))
{
CHelix helix;
helix.SetKey(pHashData, dwHashSize);


The encryption process is implemented by calling the ‘CHelix::Encrypt’ method as follows:

helix.Encrypt(m_pParameterData[HELIX_ENCRYPT_DATA_TO_ENCRYPT_INDEX].m_pData, m_pParameterData[HELIX_ENCRYPT_DATA_TO_ENCRYPT_INDEX].m_cbActualLen, nonce, pbyEncryptedData, mac)

The decryption XP is implemented using similar code.


The above book excerpt is from:

Super SQL Server Systems
Turbocharge Database Performance with C++ External Procedures

ISBN: 0-9761573-2-2
Joseph Gama, P. J. Naughter

 http://www.rampant-books.com/book_2005_2_sql_server_external_procedures.htm  

Linux Oracle commands syntax poster

ION Oracle tuning software

Oracle data dictionary reference poster



Oracle Forum

BC Oracle consulting support training

BC remote Oracle DBA   

 

   

 Copyright © 1996 -2016 by Burleson. All rights reserved.


Oracle® is the registered trademark of Oracle Corporation. SQL Server® is the registered trademark of Microsoft Corporation. 
Many of the designations used by computer vendors to distinguish their products are claimed as Trademarks
 

Hit Counter