Java Cryptography Concepts: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Java Cryptography =Cipher= {{External|https://docs.oracle.com/javase/8/docs/api/javax/crypto/Cipher.html}}")
 
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:


* [[Java Cryptography]]
* [[Java Cryptography]]
=<span id='JCE'></span>Java Cryptographic Extension (JCE) Framework=
[[#Cipher|Cipher]] class is the core of JCE.


=Cipher=
=Cipher=


{{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==
Example: "AES"
==Feedback Mode==
===CBC===
CBC requires IV.
===ECB===
==Padding Scheme==
Example: "PKCS5Padding"

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"