Call now: (800) 766-1884  


 SQL Server Tips
 SQL Server Training

 SQL Server Consulting
 SQL Server Support
 SQL Server Remote DBA

 SQL Server Scripts
 Scripts Menu




  SQL Server Tips by Gama and Naughter

Comparing Rijndael encryption

AES is the new name for the now ratified Rijndael algorithm and it is the strongest encryption algorithm present in the CLR.

Unfortunately, Microsoft's Crypto API doesn't have this algorithm on Windows 2000, only Windows XP and Windows 2003 have it. There are many implementations online, based on the original code from Vincent Rijmen and K.U.Leuven. The XP used in this test is based on Szymon Stefanek's C++ implementation.

In .NET the Encryption class supports this algorithm and Microsoft has sample code on how to use it. Still, the best article I read so far, with very well commented code was made by Deon Spengler on his blog:

Symmetric Key Encryption using Rijndael and C#

Deon's code was turned into a SP called spRijndaelVB to be used for testing.

This is the result of encrypting 10,000 rows of data with the .NET implementation, the pure C++ implementation in XP_RIJNDAEL and the XP_CRYPTOAPI implementation on a record with 1000 bytes:

Execution time


Time (seconds)












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


Burleson Consulting Remote DB Administration







Burleson is the America's Team

Note: The pages on this site were created as a support and training reference for use by our staff of DBA consultants.  If you find it confusing, please exit this page.

Errata?  SQL Server technology is changing and we strive to update our SQL Server support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:and include the URL for the page.

Burleson Consulting
SQL Server database support


Copyright 1996 -  2013 by Vaaltech Web Services. All rights reserved.

Hit Counter