CryptoSys API Library Manual

Data Compression in Cryptography

Compressing data before encryption not only makes for shorter messages to be transmitted or stored, but also improves security by reducing the redundancy in the plaintext and making cryptanalysis harder.

CryptoSys API includes compression (deflate) and decompression (inflate) functions based on Jean-loup Gailly's excellent zlib product.

You will need to devise a packet format to store the uncompressed length of the data along with the compressed data itself. There is an example of this posted on our web site - see Using Compression with CryptoSys. Just remember to compress before you encrypt.

[Contents] [Index]

[HOME]   [NEXT: Secure Random Number Generator...]

Copyright © 2001-11 D.I. Management Services Pty Ltd. All rights reserved.