Perhaps you could make use of one of the many open source cryptography libraries, in which the algorithms are freely available for you to make use of.
For example, gnupg or libgcrypt, covered by the GPL, or OpenSSL, covered by its own licence which permits redistribution and use of both binary and source, with various conditions that in no way stop you using them in your own programs.
Long story short, I think I'm saying that it is incorrect to state that all crypto algorithms are copyright and not free to use in your programs; there's lots out there you can play with. Here are some more words on the subject:
http://security.stackexchange.com/questions/1300/copyright-issues-with-encryption-algorithms
My understanding of the issue, which of course applies only in some legal regimes, is that copyright applies only to a specific, copyable expression of an idea (the source code, for example), not the idea itself (the actual concept of how that crypto works). Any number of people can express the same algorithm in different ways, and when they commit those expressions to some tangible form such as a program, every one of them is separate for purposes of copyright.