HashCryptStreams HashCryptStreams

HashCryptStreams components

Documented version: 1.0.0

The initial version of this library aims at establishing a standard infrastructure of objects and object behaviors for Hash/HMAC functions and symmetric cryptography algorithms. Over this base the library will grow in time with new algorithms/functions support providing the same programming interface for them. The applications can adopt the future versions by simply allowing other algorithms to be initialized and taking some care about the length of the keys for them - no code change.

The public key (asymmetric) cryptography is not so straightforward as the symmetric algorithms, thus there is no way to standardize a programming interface for all the asymmetric algorithms. In this direction the library aims at supplying not only the ready-to-use algorithms but also means to enable the developer to build specialized implementations over the base algorithm and even implement custom/other algorithms using the utility objects (e.g. the BigNumber object). 

Read more:

Implemented algorithms and functions list

Usage techniques for HashObject and Symmetric objects

About the public key/asymmetric cryptography. How to employ it, how to obey standards and specific kinds of usage etc.

Stream filters - what is it?

Stream filters

The Hash/HMAC and the symmetric cryptography algorithms are available in two forms: Direct and Stream filters. The "direct" objects (HashObject and Symmetric object) are used directly - the application configures the object, sets algorithm a key and passes data for processing in several possible forms. On the other hand the stream filters are intended for use together with other newObjects ActiveX Pack1 stream objects such as those from Storages and Files (file, stream in an OLE file, memory stream) or network streams (SocketStream from NetStreams.dll). The trick is that the application can create and initialize such a stream filter, connect it to another stream (file, network connection etc.) and pass it to other routines that will just read or/and write to it as if it is a stream like any other. In the process the data will be en/de-crypted or a hash/HMAC will be generated, but the routines that do the reading/writing do not need to care about that.   

Read about the Stream filters concept for more details about how and when to make effective use of them.

Licensing

The library is partially freeware. Some functions/algorithms require a license. Thus if a license is required depends on what algorithm you want to use and not on the object you are using. A license will be needed if you want to initialize an algorithm/function that needs it, for the rest the objects will function without such.

See the algorithms and functions list for details about which algorithms are freeware and which require a license.

The license is one and enables all the non-free algorithms/functions.

Note that all the algorithms/functions in version 1.0.0 are free and will remain free in all the future versions.

Distribution and requirements.

The library's DLL is HashCryptStreams.dll. It is self-registering COM DLL and can be included with any setup solutions that support COM DLL installation (virtually all the installer solutions do). 

The DLL can be included without any other part of AXPack1 as long as the SFStreamCrypt and SFStreamDigest objects are not used. If you use them in your application you need also to deploy the AXPack1 core DLL together with HashCryptStreams. Furthermore if you are filtering other streams with these objects (for example a SocketStream) you would need to deploy the respective DLL as well. The RSA, BigNumber and the other asymmetric cryptography oriented objects are self dependent and do pose additional requirements. Still, the actual code often uses other objects from AXPack1 for miscellaneous tasks (such as composing strings, structuring data etc.). If you are using AXPack1 objects extensively, but still want to remove the unneeded DLL be careful to determine which of them are actually involved. If not sure or you just lost the count - redistribute all the DLL to make sure everything is in place.

Classes list

Hash and HMAC functions
MD5,SHA

HashObject
(newObjects.crypt.HashObject)

Implements Hash and HMAC functions. Can be used to hash data in single step or in series of chunks.

SFStreamDigest
(newObjects.crypt.SFStreamDigest)

Implements Hash and HMAC functions as a stream filter (what is stream filter).

Symmetric cryptography
DES,AES

Symmetric
(newObjects.crypt.Symmetric)

Implements symmetric cryptography algorithms. Enables you to encrypt data in a single step or in series of chunks.

SFStreamCrypt
(newObjects.crypt.SFStreamCrypt)

Implements symmetric cryptography algorithms as a stream filter.

Public key/asymmetric cryptography
RSA

RSA
(newObjects.crypt.RSA)

Implements the RSA public key cryptography algorithm. Establishes a base over which the developers can build more specialized code.

BigNumber
(newObjects.crypt.Number)

Implements arithmetic with big numbers (unlimited size). RSA algorithm uses these. Furthermore some other less popular asymmetric algorithms can be implemented with this object.

...

newObjects Copyright 2001-2006 newObjects [ ]