Free Encryption / Cryptographic Libraries and Source Code

Add encryption and decryption (cryptographic) facilities to your software

Free Encryption / Cryptographic Libraries and Source Code (Security)

Listed on this page are encryption libraries and source code that will allow you to plug encryption and authentication facilities into your software without having to be an encryption and mathematical genius. It is useful if you are writing an application that needs to be secure or need to employ cryptography in any way. Note that not all the cryptographic libraries listed here include source code (some are free in their binary versions only), so you have to decide if this is acceptable to you (since you cannot verify the integrity of the algorithms employed, etc).

Note: if you are looking for encryption software (rather than libraries that you can use in programs you write) please check the Free Encryption / Cryptographic Software, Free On the Fly Encryption, Steganography, Free Disk Encryption, Free Public Key Encryption Software page instead.

Related Pages

Free Cryptographic / Encryption Libraries and Source Code

cryptlib New

This cryptographic library lets "even inexperienced crypto programmers add encryption and authentication services to their software" (quoted from their website). Features include S/MIME and PGP/OpenPGP secure enveloping; SSL/TLS and SSH secure sessions; Certification Authority (CA) services such as CMP, SCEP, RTCS, and OCSP and certificate handling; secure timestamping; ability to interface with external crypto devices; etc. It uses industry-standard data formats (eg, X 509, S/MIME, PGP/OpenPGP, and SSH/SSL/TLS data formats), Platforms supported include Windows, Mac OS X, Linux, FreeBSD, OpenBSD, BeOS, IBM MVS, OS/2, and lots more, including embedded system environments like AMX, ChorusOS, eCos, FreeRTOS/OpenRTOS, uITRON, MQX, PalmOS, RTEMS, ThreadX, T-Kernel, uC/OS II, VDK, VxWorks, and XMK. (Note that my list is not exhaustive; I couldn't be bothered to list everything here, especially the list of Unix versions supported. See their site for the complete list.) The library is written in C, but there are also language bindings (interfaces) for other languages, like C++, C#, NET, Delphi, Java, Python and Visual Basic. It is open source, released under a dual licence, either the (GPL-compatible) Sleepycat licence or a commercial licence.

libsodium - The Sodium crypto library

The libsodium library is a softwre library for encryption, decryption, signatures, password hashing, etc. It is a fork of the NaCl library (see elsewhere on this page), providing a portable, cross-compilable and installable package with a API compatible with NaCL (although it also has additional API). In addition to Linux (and probably other Unix-like systems), the library also supports Windows (with the MinGW and Visual Studio compilers), iOS and Android. It includes bindings for languages other than C and C++, such as PHP, Perl, Python, JavaScript, Ruby, Rust, Swift, Java, Erlang, Haskell, Ada, etc (too many to list here). It is licensed under the ISC licence.

NaCl: Networking and Cryptography Library

NaCl is a software library for network communication, encryption, decryption, signatures, etc. It tries to make such tasks easy for the programmer, who may not be cryptographic security experts, by preselecting the an appropriate "state-of-the-art signature system suitable for worldwide use in a wide range of applications", although if you are a cryptographer, you can also choose the cryptographic primitive you prefer. The library is written in C and works with C and C++ programs, is supported on Unix-like systems like Linux and BSD, and is in the public domain.

TurboPower LockBox

This cross-platform toolkit supports Windows and Linux X11 applications (and possibly other Unix X11 environments as well). It contains components and routines for Delphi, Kylix and C++Builder that support data encryption. Algorithms supported include Blowfish, RSA, MD5, SHA-1, DES, triple-DES, Rijndael AES (Advanced Encryption Standard), etc. It also provides support for digitally signing messages with the standard Digital Signature Algorithm (DSA). LockBox is open source.


If you are writing an application (browser, email, server, etc) that requires the use of either Secure Sockets Layer (SSL versions 2 or 3), or Transport Layer Security (TLS version 1), you can obtain this free open source "commercial-grade" OpenSSL library. The library allows you to add cryptographic functionality to your programs, apparently both server programs as well as SSL supporting clients. You can use it in both commercial and non-commercial programs. This is the successor to the well-known SSLeay library. (Trivia: in case you don't see the connection, OpenSSL = Open plus SSLeay minus eay where "eay" stands for Eric Young, probably his initials.)

Network Security Services

Used in Netscape and Mozilla products, NSS (Network Security Services a.k.a Netscape Security Services) allows you to develop security-enabled server applications that support SSL v2 and v3, TLS, PKCS #5, PKCS #7, PKCS #8, PKCS #9, PKCS #10, PKCS #11, PKCS #12, S/MIME, X 509 v3 certificates, RSA, DSA, Triple DES, DES, RC2, RC4, SHA-1, MD2, MD5, etc. The software is released under the Mozilla Public License and the GNU General Public License.

Crypto++: C++ Class Library Of Cryptographic Schemes

This free C++ class library is a class hierachy with an API defined by the base abstract classes. It handles a large number of cryptographic schemes (including public key cryptography) and cipher modes. In no particular order, here's a list of some stuff supported: RC6, MARS, Rijndael, Twofish, Serpent, IDEA, DES, Triple DES (DES-EDE2 and DES-EDE3), DESX (DES-XEX3), RC2, RC5, Blowfish, Diamond2, TEA, SAFER, 3-WAY, GOST, SHARK, CAST-128, Square, CBC padded, CBC ciphertext stealing (CTS), CFB, OFB, counter mode, ARC4, SEAL, WAKE, Sapphire, BlumBlumShub, RSA, DSA, ElGamal, Nyberg-Rueppel (NR), BlumGoldwasser, Rabin, Rabin-Williams (RW), LUC, LUCELG, Elliptic Curve Cryptosystems, PKCS#1 v2.0, OAEP, PSSR, IEEE P1363 EMSA2, Diffie-Hellman (DH), Unified Diffie-Hellman (DH2), Menezes-Qu-Vanstone (MQV), LUCDIF, SHA-1, MD2, MD5, HAVAL, RIPEMD-160, Tiger, MD5-MAC, HMAC, XOR-MAC, CBC-MAC, DMAC, Luby-Rackoff, MDC, ANSI X9.17 appendix C, PGP's RandPool (for pseudo random number generation, PRNG), Shamir's secret sharing and Rabin's information dispersal schemes, DEFLATE (the gzip/zip/unzip compression), 32 bit CRC, prime number generation and verification, etc. Platforms supported include Win32, Unix and Macintosh.

Putty: Win32 SSH / SFTP Client with Source Code

Putty is not a library, but a set of programs that implement Secure Shell access, Secure FTP (SFTP), Telnet, etc. Its components are sometimes used by other open source programs (such as FTP clients) to handle things like SSH and SFTP.


This is not a library but an open source suite of programs that support Secure Shell access (SSH), namely ssh (which replaces telnet and rlogin), scp (which replaces rcp and ftp), sftp (Secure FTP, which also replaces ftp), sftp-server, sshd (server-side), etc. Since the programs are open source, providing strong authentication and secure sessions, it may presumably provide the base for your implementation of SSH. It is supports a wide number of operating systems: OpenBSD, NetBSD, FreeBSD, AIX, HP-UX, IRIX, Linux, NeXT, SCO, SNI/Reliant Unix, Solaris, Digital Unix/Tru64/OSF, and Mac OS X. In SSH1 mode, the encryption algorithms supported include 3DES and Blowfish. In SSH2, 3DES, Blowfish, CAST128, Arcfour, and AES are supported.

GnuPG: The GNU Privacy Guard

This is not a library but a fully functioning program that functions as a replacement for PGP. Since the primary function of the software is encryption, you can probably extract the encryption source code (released under the GNU GPL) for your own application if you wish.

Related Pages

Newest Pages

Popular Pages

How to Link to This Page

It will appear on your page as:

Free Encryption / Cryptographic Libraries and Source Code Free Webmaster Tutorials, Scripts and Articles Free How-To Guides Free Programmers, Webmasters and Security Resources
If you find this site useful, please link to us.