moved signature, crypt_stream around
cleanups