I have a need for a cross-platform (hopefully C) library that can create and mount encrypted filesystem containers. The same functionality of TrueCrypt but as a library so I would not have to externally include and invoke the Truecrypt executables.
Any alternate suggestions or solutions are also very welcome.
Thanks!
Try openSSL
libssl supports a lot of popular cryptography algorithms. It also has wrapper methods for some (at least blowfish) which will simulate a stream cipher on a block cipher such as blowfish.
SYMMETRIC CIPHERS
blowfish(3), cast(3), des(3), idea(3), rc2(3), rc4(3), rc5(3)
PUBLIC KEY CRYPTOGRAPHY AND KEY AGREEMENT
dsa(3), dh(3), rsa(3)
CERTIFICATES
x509(3), x509v3(3)
AUTHENTICATION CODES, HASH FUNCTIONS
hmac(3), md2(3), md4(3), md5(3), mdc2(3), ripemd(3), sha(3)
http://openssl.linux-mirror.org/docs/crypto/crypto.html
I wrote a simple cross-platform C++ library (work name RC5Simple) for encrypting/decrypting files and byte arrays by RC5-32/12/16. May be it helpful to you.
Source and sample:
http://webhamster.ru/db/data/articles/157/rc5simple_1_23.zip
Tested on Linux-32, Linux-64, Windows-32, Windows-64, MacOSX, FreeBSD.
Official page: http://webhamster.ru/site/page/index/articles/projectcode/157 (rus).
You may easily include source files to your project. Licenses: GPL3 and BSD.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With