os_ crypto

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