Java Cryptography Concepts: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
Line 10: Line 10:


{{External|https://docs.oracle.com/javase/8/docs/api/javax/crypto/Cipher.html}}
{{External|https://docs.oracle.com/javase/8/docs/api/javax/crypto/Cipher.html}}
Cipher instances are not threads-safe. If multiple threads need to perform encryption/decryption, Cipher instances need to be stored in ThreadLocal, obtain a new instance every time is needed, or wrapped in a synchronized block.


==Cryptographic Algorithm==
==Cryptographic Algorithm==

Latest revision as of 08:20, 24 November 2018

Internal

Java Cryptographic Extension (JCE) Framework

Cipher class is the core of JCE.

Cipher

https://docs.oracle.com/javase/8/docs/api/javax/crypto/Cipher.html

Cipher instances are not threads-safe. If multiple threads need to perform encryption/decryption, Cipher instances need to be stored in ThreadLocal, obtain a new instance every time is needed, or wrapped in a synchronized block.

Cryptographic Algorithm

Example: "AES"

Feedback Mode

CBC

CBC requires IV.

ECB

Padding Scheme

Example: "PKCS5Padding"