An arbitrary precision integer math (also known as bignums) implementation in pure Tcl under the BSD license can be found at http://wiki.hping.org/108. Hopefully it will be available in Tcllib in short time. In this page you can also found usage examples about [RSA] and [Diffie-Hellman].