PolarSSL Source Code overview
Source repository
If you want to dive directly into the source, either go directly to the source browser website or access the subversion repository with:
svn co http://polarssl.org/repos/polarssl/polarssl/trunk polarssl-trunk
Browsing the library source
Each cipher and hashing algorithm in PolarSSL (AES, MD5, SHA-1, etc.) is self-contained and can be easily reused as a standalone module.
Block and stream ciphers
- AES source code ( aes.h aes.c )
- ARC4 source code ( arc4.h arc4.c )
- Camellia source code ( camellia.h camellia.c )
- DES/3DES source code ( des.h des.c )
- XTEA source code ( xtea.h xtea.c )
Hash functions
Public-key cryptography
Cryptographic protocols
Browsing the example source
PolarSSL also comes with a set of example programs to show basic ways to use the library and perform standard operations and functionalities. These examples may help you get started with using PolarSSL:
Block and stream ciphers
- AES-256 file encryption ( aescrypt2.c )
- Generic cipher layer example ( crypt_and_hash.c )
Hash functions
- Generic digest layer example ( generic_sum.c )
- MD5 of "Hello, world" ( hello.c )
- md5sum source code ( md5sum.c )
- sha1sum source code ( sha1sum.c )
- sha2sum source code ( sha2sum.c )
Public-key cryptography
- MPI demonstration ( mpi_demo.c )
- RSA key generation ( rsa_genkey.c )
- RSA signature creation ( rsa_sign.c )
- RSA signature verification ( rsa_verify.c )
- RSASSA-PSS signature creation ( rsa_sign_pss.c )
- RSASSA-PSS signature verify ( rsa_verify_pss.c )
- RSA simple data encryption ( rsa_encrypt.c )
- RSA simple data decryption ( rsa_decrypt.c )
- Diffie-Hellman prime generation ( dh_genprime.c )
- RSA/Diffie-Hellman client ( dh_client.c )
- RSA/Diffie-Hellman server ( dh_server.c )
Random generation
- Generate HAVEGE random data ( gen_random.c )
Cryptographic protocols
- Simple SSL/TLS client ( ssl_client1.c )
- Advanced SSL/TLS client ( ssl_client2.c )
- SSL/TLS forked server program ( ssl_fork_server.c )
- SMTP client (STARTTLS and TLS) ( ssl_mail_client.c )
- SSL/TLS server program ( ssl_server.c )
Miscellaneous
- Crypto benchmark ( benchmark.c )
- Self-test program ( selftest.c )
- SSL/TLS testing program ( ssl_test.c )
X.509
- X.509 Certificate printing (file/server) ( cert_app.c )
- X.509 CRL printing (file) ( crl_app.c )


