- All data along with their criticality have been identified.
- A matrix indicating the data and the means to secure it is available in the design document.
- All data required to be kept confidential is encrypted.
- All data that absolutely must not be tampered is digital signed using private key or using HMAC.
- Private information (secrets) is not persisted to disk until necessary.
- Private information (secrets) is kept in memory for only as longs as it is necessary.
- Private information (secrets) are not stored as literal values in code (no hard-coded values)
- Database connection information such as user name and password are not stored in plaintext on disk.
- No sensitive data is stored in persisted cookies.
- No custom-built algorithms are being used to encrypt data.
- If standard algorithms are being used, then the library used to implement them are tested sufficiently. (Watch out for algos like AES, RSA etc. implemented by local app teams)
- If standard algos are being used, there is a documented rationale for chosen key sizes.
- The encryption key is stored in a secure manner.
- There is a provision in the application for changing the keys used for encryption.
- There is a provision in the application for rolling over data (i.e. data encrypted with "old" key to be re-encrypted using "new" key)
- There is a provision in the application for handling scenarios like "lost key", "lost password to key" and "key compromise"
- Sensitive data is not transmitted using GET, as it can be directly seen in the browser address bar.
- Sensitive information is not being sent in the HTTP headers as these can be easily changed.
- Audit logs are encrypted (if required) , but should be definitely be protected against tampering and loss of integrity.
- Where possible, WS-Security or SSL/TLS is used to protect ephemeral data rather than implement crypto schemes out of primitives.
- For .NET code, System.Security.Cryptography namespace will be used.
- For Java code, JCE providers will be used (Bouncycastle or SunOne)
- For C/C++ code CryptoAPI (CSP) will be used
- For scripting, CAPICOM will be used
- For Windows kernel mode, statically linked version of RSA32.LIB will be used."
- The crypto algorithm being used will be easily replaceable. Hard coding is not being done. It is easy to upgrade the algorithms in the future.
- If the user of the software does not specify it, strong algorithms are used by default. The software will not "automatically" fall back to a weak crypto.
- If symmetric key-based cryptography will be used, then the CBC mode will be used.
- If hash functions will be used, then the SHA-2 family of hash functions (SHA-256, SHA-384 or SHA-512) will be used.
- The application will DP API (Data Protection API) to store secure data and passwords.
- If the application requires random numbers, a strong quality random number generator will be used.
- If a secret key is required to be generated from a user password, the user password should not be merely hashed. Instead a KDF (Key derivation function) should be used to derive a key from a password. (Eg. CryptDeriveKey on Windows)
- Are cache-control : no-cache or cache-control : no-store used to prevent caching in browser?
- Application caters if 128-bit SSL is not supported in the web browser.
Friday, October 27, 2006
Security considerations when handling sensitive data
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment