CryptoSys Home > API

CryptoSys API

The CryptoSys API is a developer's toolkit of fast, efficient symmetrical cryptographic functions in Visual Basic, VBA, VB.NET/VB20xx, C/C++, C#, and ASP. You can incorporate it in your own apps or call it from VBA applications like Access, Excel and Word. It provides four of the major block cipher algorithms, three stream cipher algorithms, including ChaCha20, key wrap, secure message digest hash algorithms including SHA-3, the HMAC, CMAC and KMAC message authentication algorithms, the Poly1305 one-time authenticator, a data compression facility, a password-based key derivation function (PBKDF2), the SCRYPT key derivation function, the ASCON cipher suiteAscon (Ascon-128 AEAD, Ascon-Hash and Ascon-Xof), a secure random number generator, and other cryptographic utilities. If you need to do "asymmetric" public key cryptography, look at our alternative product, the CryptoSys PKI Toolkit (see comparison API vs PKI).

Read the API Manual | Features | BUY NOW | Download Trial | Examples

Latest news:
2023-05-27: New versionReleased new version 6.21. See Changes in this version,
2021-09-25: Released version 6.20 "20th Anniversary Issue". See Using the interfaces for C++ (STL) and VBA wrappers and Looking back 20 years.
2018-09-16: Released version 5.3 with support for the SHA-3 family.
2016-08-15: Released version 5.2 with support for the SCRYPT key derivation function.
2016-01-27: A complete rewrite of the Delphi/FreePascal interface to CryptoSys API.
2015-07-18: Released version 5.1 with support for Authenticated Encryption with Additional Data (AEAD) using AES-GCM and ChaCha20-Poly1305.
See Using the AEAD functions.
2015-04-29: Released version 5.0 with support for ChaCha20 and Poly1305. See Changes in Version 5.0.
2010-06-25: Writing an interface in another programming language.

xmlsq 2020-06-02: New Released xmlsq our new free XML Simple Query utility. xmlsq is a simple lightweight utility to query XML documents using XPath 1.0. Use from the command line or via its programming interface.

2020-01-17. Note that the CryptoSys API is not affected by the Windows CryptoAPI vulnerability (CVE-2020-0601). We do not use the Windows CryptoAPI in any way!

Feedback on CryptoSys API

“ This message is simply one of thanks for you developing this API. I have spent the last 2 days trying (in vain) to generate SHA256 and MD5 hashes in MS Access vba to support an interface to Amazon's REST MWS API. ”
  -Phill E.

“ I downloaded the Personal package about two hours ago, and my application is up and running with no problems! You have done a great job. ”
  -Anthony W.

“ First thanks for the great documentation with your product. I had spent three days trying some other solutions to my HMAC problem, and 1 hour after downloading your trial, my problem was solved. ”
  -James S.

“ For developers, your product is great. ”
  -Mark H, US Navy

“ Thanks for putting together such a great and easy to use library. Your product is great and support is excellent as well. ”
  -Mark W.

“ Thanks for an awesome product! ”
  -James H.

“ Thank you very much. Your software worked great for our project. ”
  -Chris C.

“ Thanks for your quick response. And thanks for Cryptosys API and other related tools. You have done a great job. I like the fact that Cryptosys comes in the form of a DLL whose cipher algorithms can be called from VB and C/C++. ”
  -Jalal R.

“ Thanks for your response...truly stellar, and I appreciate your company's great product. ”
  -Steve J.

“ One finds that rarely! So clear information and so clean program code: Access VBA, CryptoSys API, Cryptography generally. Thank you! ”
  -Felix S.

“ Thank you very much. This answers our questions and we have everything working correctly. Your support was very timely and precise. We are very pleased to have worked with you. ”
  -Dan B.

“ Thank You very much for pointing me out to CryptoSys API. I was able to fix my issues related to inter-operability between java and VBScript. I am going to be using your libraries. ”

“ The CryptoSys API was easy to master and provided ARMP with a fast solution to our Smart Card encryption software developed with Visual Basic. ”
  -Army Recreation Machine Program.

Please give us your feedback.


The block cipher algorithms in the CryptoSys API are:

The one-way message digest hash functions the Secure Hash Algorithm (SHA-1), SHA-224, SHA-256, SHA-384, SHA-512, SHA-3, MD5, MD2 and RIPEMD-160.

The random number generator complies with the Federal Information Processing Standards Publication FIPS PUB 140-2 Security Requirements for Cryptographic Modules. Data compression functions are included based on Jean-loup Gailly's excellent 'zlib' product. One technique of compression and encryption is shown in our demonstration VB6 project of MySecret with CryptoSys API.

Random Number Generator (RNG): Version 4 of CryptoSys API includes an improved thread-safe random number generator (RNG) based on the strict NIST SP 800-90 standard†. This is compliant with FIPS PUB 140-2. To that end, we publish the full details of the random number algorithms used in CryptoSys. Your comments and review are welcome.

Note 2013-09-21: Our implementation does not use the Dual EC_DRBG component of NIST 800-90 that is alleged to contain an NSA backdoor.

Introduction to the CryptoSys API

The CryptoSys API functions allow you to encrypt, decrypt, hash and authenticate data in a variety of formats, as well as generating secure random keys to use in your applications. Your input data can generally be in a byte array, encoded as a hexadecimal string, or in a file. The functions can process the data in a one-off manner, or, for longer inputs, you can call the "update" functions sequentially after initialising. The block cipher algorithms work in Electronic Codebook (ECB), Cipher Block Chaining (CBC), Cipher Feedback (CFB), Output Feedback (OFB) and Counter (CTR) modes. AES with Galois/Counter Mode (AES-GCM) is provided. You can generate random keys and nonces in a secure manner. All functions are thread-safe. See the Examples page.

For a quick guide on how to create a C# project see Creating a C# command-line app with CryptoSys API.

How does it work?

The CryptoSys API uses a straightforward and independent Win32 DLL which is compatible with all modern versions of Windows XP and above (W10/W8/W7/2008/Vista/2003/XP). A 64-bit DLL is also provided. There is no "COM", no "Active-X", and no requirement to "register" it with Windows to use it. The products do not use or rely on the Microsoft Cryptographic API (CRAPi [sic]) cryptographic providers in any way. Developers can distribute to their clients by simply copying a single file into the correct directory. For those users who do want ActiveX capability so they can call it from an ASP page, there is a free (unsupported) ActiveX Interface (32-bit platforms only).

Testbed Demo

There is a test bed demo program CryptoSys5A.exe distributed with CryptoSys API. Use this to experiment with different combinations of encryption algorithms, block cipher modes, padding, hex and alpha input, and more.

Testbed Demo (click to view full size image)

See CryptoSys API Testbed Demo Help for more information.


Download the latest Trial Edition of CryptoSys API now.

Most recent production version 6.21.0 compiled 26 May 2023. Use either

Unzip the zip file and run the install.exe program inside it, or download the exe program directly and run it.

Please note it is a breach of copyright to put a copy of these installation files on another server or to distribute them in any manner except by providing a link to this page.

The Trial Edition is fully-functional and the download includes a set of test functions in Visual Basic (VB6/VBA), VB.NET, C, C++ (STL) and C#. Please read the licence conditions for the Trial Edition. The trial period is 60 days from the date first installed on your system. For programming references see the documentation page.

Trouble installing: If Microsoft Defender Smartscreen gives you a warning, see Unrecognized app error. (TL;DR Click "More info" then "Run anyway"). Check that you see "Publisher: D.I. MANAGEMENT SERVICES PTY LIMITED".

You need to have administrator rights when installing and uninstalling. (The option Install for Server when installing just means it disables pop-up messages if you try and run it without installing correctly or if it's expired. Leave the option unchecked for a desktop.)

You can purchase a licenced version here. Existing licence holders can download the latest Developer Edition here.

Interfaces to other programming languages

See Writing an interface in another programming language for advice and examples in how to use CryptoSys API with other programming languages, including Visual FoxPro and Team Developer.

For Delphi, see the page Using Delphi with CryptoSys API, CryptoSys PKI and FirmaSAT for more details and some sample code.

Using with Microsoft Excel

See Using CryptoSys API with Microsoft Excel for an example of how to call a function in CryptoSys API from an Excel spreadsheet.

Using with VBA in 64-bit versions of Office

As of version 6.20, all the necessary 32- and 64-bit declarations are included in the one module basCryptoSys.bas. The old ~64.bas and ~64_32.bas files are now redundant. VB6 programmers (yes, we know you are still out there) should check Why are some lines showing in red in my IDE?.

Do I have a valid version?

Check the integrity of your CryptoSys API software.

How do I create keys and manage padding when encrypting?

Please refer to our brief introductions to Using Keys in Cryptography and Using Padding in Encryption.

Does CryptoSys API do Public Key Cryptography?

No. For public key cryptography, see our CryptoSys PKI Toolkit.


For more information, please send us a message.

This page last updated 27 May 2023