os_crypto

Some cosmetic and security changes in os_crypto.
See single commits for details.