Advisory Notes and Best Practices
This article lists some constraints, requirements and best practices with respect to security to be followed when using CADP for Java.
When using block ciphers, CBC mode is preferable to ECB when data exceeds the block size. More specifically: when using block ciphers (DES, DESede, SEED, ARIA, and AES), you should always use these ciphers in CBC mode, unless you have a compelling reason to use ECB mode.
When encrypting with RSA keys, the data to encrypt must be larger than 0 bytes.
When importing RSA keys, you must import both the public and private keys.
TLS v1.2 should be used for communication with Key Manager.
Password used must be obfuscated. Use the Passphrase utility or IngrianProvider.obfuscate API to obfuscate password.
User specified passwords, such as Client_Cert_Passphrase and Key_Store_Password should not be used as cryptographic keys.
SHA1 should not be used to hash a message for signing purpose.
Single DES and two-key Triple DES should not be used unless the EMV standard requires it.
IV should not be re-used.
Use cipher suites with strong key exchange for SSL communication.
For RSA encryption, the Optimal Asymmetric Encryption Padding (OAEP) should be used.
It is recommended to avoid using cipher algorithms RSA for Key Exchange, CBC mode, SHA1 in TLSv1.2 protocol while communicating with Key Manager.
It is recommended to use only trusted Third party signed certificates for TLS channel.
For AES-GCM algorithm, same combination of nonce (IV) and key must not be reused during encryption/decryption operations.