Skip to content

Commit 8a3ace2

Browse files
committed
Update README
- Better Formatting
1 parent a4f0b3f commit 8a3ace2

File tree

1 file changed

+57
-58
lines changed

1 file changed

+57
-58
lines changed

README.md

+57-58
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Java-Crypto-Utils
22
## Java Cryptographic and Hash Utilities
3-
[![CircleCI](https://circleci.com/gh/tunjos/java-crypto-utils.svg?style=svg)](https://circleci.com/gh/tunjos/java-crypto-utils)
4-
5-
Build: [Maven](https://maven.apache.org/)
3+
[![CircleCI](https://circleci.com/gh/tunjos/java-crypto-utils.svg?style=svg)](https://circleci.com/gh/tunjos/java-crypto-utils) Build: [Maven](https://maven.apache.org/)
64

75
Install Maven
86

@@ -16,87 +14,87 @@ To run the unit tests:
1614

1715
Term | Description
1816
---------- | ----------
19-
**AES** | Advanced Encryption Standard
17+
**AES** | **Advanced Encryption Standard**
2018
**Encryption** | The process of encoding information making in away that makes it unreadable for unauthorized users. `Plaintext` -> `Ciphertext`
2119
**Decryption** | The reverse process of `encryption`. It is the process of decoding the data which has been encrypted making it readable for authorized users. `Ciphertext` -> `Plaintext`
2220
**Cryptographic key/Key** | Is a piece of information (a parameter) that determines the functional output of a cryptographic algorithm.
23-
**RSA** | Rivest-Shamir-Adleman (Surnames of the creators)
21+
**RSA** | **Rivest-Shamir-Adleman** (Surnames of the creators)
2422
**Symmetric Cryptography/Symmetric-Key Cryptography** | Makes use of the same cryptographic keys for both `encryption` of `plaintext` and `decryption` of `ciphertext`.
25-
**Asymmetric Cryptography/Public-Key Cryptography** | Makes use of different cryptographic keys(pair of public and private keys) used for encryption of plaintext and decryption of ciphertext.
23+
**Asymmetric Cryptography/Public-Key Cryptography** | Makes use of different cryptographic keys(pair of `public` and `private keys`) used for `encryption` of `plaintext` and `decryption` of `ciphertext`.
2624
**Public Key** | A key that is available to the public.
2725
**Private Key** | A key that is private and known only to the owner.
28-
**Cipher/Cypher** | An algorithm for performing encryption or decryption.
29-
**Plaintext/Cleartext** | An unencrypted information pending input into a cryptographic algorithm.
30-
**Ciphertext** | The result of encryption performed on plaintext using an algorithm - Cipher.
26+
**Cipher/Cypher** | An algorithm for performing `encryption` or `decryption`.
27+
**Plaintext/Cleartext** | An `unencrypted` information pending input into a cryptographic algorithm.
28+
**Ciphertext** | The result of `encryption` performed on `plaintext` using an algorithm - `Cipher`.
3129
**Block Size** | The length of the fixed length string of bits operated on by a `Block Cipher`. Both the input (`plaintext`) and output (`ciphertext`) are of the same length.
3230
**Key Size/Key Length** | The number of bits in a key used by a cryptographic algorithm.
33-
**Rounds** | In Block Ciphers, the number of times a cipher transformation is repeated over a block of plaintext to create a block of `ciphertext`. The number of rounds is determined by the key size/ key length.
31+
**Rounds** | In Block Ciphers, the number of times a `cipher transformation` is repeated over a block of `plaintext` to create a block of `ciphertext`. The number of `rounds` is determined by the `key size/ key length`.
3432
**Block Cipher** | A Symmetric-Key `Cipher` which operates on a groups of bits of fixed length, called `blocks`.
35-
**[Block Cipher Mode of Operation](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation)** | Is an algorithm that uses a **block cipher** to provide information security such as confidentiality or authenticity. It describes how to repeatedly apply a cipher's single-block operation to securely transform amounts of data larger than a block.
36-
**Common Block Cipher Modes of Operation** | **ECB**(Electronic Codebook), **CBC**(Cipher Block Chaining), **PCBC**(Propagating **CBC**[Cipher Block Chaining]), **CFB**(Cipher Feedback), **OFB**(Output Feedback), **CTR**(Counter)
37-
**Broken** | When brute-force attack is feasible i.e A key with a given key size can be permutated in feasible time to generate a key that correctly decrypts a `Ciphertext`.
38-
**Brute-force attack** | When an attacker guesses many keys with the hope of eventually guessing correctly usually using a Supercomputer.
33+
**[Block Cipher Mode of Operation](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation)** | Is an algorithm that uses a `block cipher` to provide information security such as `confidentiality` or `authenticity`. It describes how to repeatedly apply a cipher's single-block operation to securely transform amounts of data larger than a block.
34+
**Common Block Cipher Modes of Operation** | **ECB**(`Electronic Codebook`), **CBC**(`Cipher Block Chaining`), **PCBC**(`Propagating` **CBC**[`Cipher Block Chaining`]), **CFB**(`Cipher Feedback`), **OFB**(`Output Feedback`), **CTR**(`Counter`)
35+
**Broken** | When `brute-force attack` is feasible i.e A key with a given key size can be permutated in feasible time to generate a key that correctly decrypts a `Ciphertext`.
36+
**Brute-force attack** | When an attacker guesses many keys with the hope of eventually guessing correctly usually using a `supercomputer`.
3937

4038

4139
## Encryption/Decryption Algorithms - Symmetric
42-
- [AES](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard)
43-
Variants: AES-128, AES-192, AES-256
44-
Key sizes: 128 bits, 192 bits, 256 bits
45-
Block Size: 128 bits
46-
Rounds: 10, 12 or 14 (depending on key size)
40+
- **[AES](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard)**
41+
Variants: **AES-128**, **AES-192**, **AES-256**
42+
Key sizes: _128 bits_, _192 bits_, _256 bits_
43+
Block Size: _128 bits_
44+
Rounds: **10, 12 or 14** (depending on key size)
4745

4846
## Encryption/Decryption Algorithms - Asymmetric
4947

50-
- [RSA](https://en.wikipedia.org/wiki/RSA_(cryptosystem))
51-
Key sizes: 1,024 to 4,096 bit typical
52-
Rounds: 1
48+
- **[RSA](https://en.wikipedia.org/wiki/RSA_(cryptosystem))**
49+
Key sizes: _1,024 to 4,096 bit typical_
50+
Rounds: **1**
5351

5452

5553
### Hash Functions - Descriptions
5654

5755
Term | Description
5856
---------- | ----------
5957
**MD5** | Message-Digest Algorithm
60-
**SHA-1** | Secure Hash Algorithm 1
61-
**SHA-2** | Secure Hash Algorithm 2
62-
**SHA-3** | Secure Hash Algorithm 3
63-
**HMAC** | Keyed-Hash Message Authentication Code or Hash-Based Message Authentication Code
64-
**Cryptographic Hash function** | A mathematical algorithm that maps data of arbitrary size to a bit string of a fixed size (a digest/hash) and is designed to be a one-way function - a function which is infeasible to invert.
58+
**SHA-1** | **Secure Hash Algorithm 1**
59+
**SHA-2** | **Secure Hash Algorithm 2**
60+
**SHA-3** | **Secure Hash Algorithm 3**
61+
**HMAC** | **Keyed-Hash Message Authentication Code** or **Hash-Based Message Authentication Code**
62+
**Cryptographic Hash function** | A mathematical algorithm that maps data of arbitrary size to a bit string of a fixed size (a `digest/hash`) and is designed to be a one-way function - a function which is infeasible to invert.
6563
**Digest/Hash** | The output of a Cryptographic Hash function.
66-
**Digest size** | The size of the output of a Cryptographic Hash function.
67-
**Block size** | The length of the fixed length string of bits operated on by a Cryptographic Hash function.
68-
**Rounds** | In Cryptographic Hash functions, the number of times a digest transformation stage is repeated over a block of plaintext to create a digest.
69-
**Salt** | Random data that is used as an additional input to a one-way function that "hashes" data, a password or passphrase.
70-
**Data Integrity** | is the maintenance of, and the assurance of the accuracy and consistency of, data over its entire life-cycle.
71-
**Authentication** | Guarantees that a message has not been modified while in transit (data integrity) and that the receiving party can verify the source of the message.
72-
**Broken** | When a collision is found. i.e two different inputs generate the same hash usually using a Supercomputer.
64+
**Digest Size** | The size of the output of a `Cryptographic Hash function`.
65+
**Block Size** | The length of the fixed length string of bits operated on by a `Cryptographic Hash function`.
66+
**Rounds** | In `Cryptographic Hash functions`, the number of times a `digest` transformation stage is repeated over a block of plaintext to create a `digest`.
67+
**Salt** | Random data that is used as an additional input to a one-way function(`Cryptographic Hash functions`) that "hashes" data, a password or passphrase.
68+
**Data Integrity** | Is the maintenance of, and the assurance of the `accuracy` and `consistency` of, data over its entire life-cycle.
69+
**Authentication** | Guarantees that a message has not been modified while in transit (`data integrity`) and that the receiving party can `verify` the source of the message.
70+
**Broken** | When a `collision` is found. i.e two different inputs generate the same hash usually using a `supercomputer`.
7371

7472

7573
## Hash Functions
76-
- [MD5](https://en.wikipedia.org/wiki/MD5)
77-
Digest Size: 128 bit
78-
Block Size: 512 bit
79-
Rounds: 4/64 (depending of Point of View)
74+
- **[MD5](https://en.wikipedia.org/wiki/MD5)**
75+
Digest Size: _128 bit_
76+
Block Size: _512 bit_
77+
Rounds: **4/64** (depending of Point of View)
8078
Broken: Yes
8179

82-
- [SHA-1](https://en.wikipedia.org/wiki/SHA-1)
83-
Digest Size: 160 bit
84-
Block Size: 512 bit
85-
Rounds: 80
80+
- **[SHA-1](https://en.wikipedia.org/wiki/SHA-1)**
81+
Digest Size: _160 bit_
82+
Block Size: _512 bit_
83+
Rounds: **80**
8684
Broken: Yes
8785

88-
- [SHA-2](https://en.wikipedia.org/wiki/SHA-2)
89-
Variants: **SHA224**, `SHA256`, SHA384, SHA512, SHA-512/224, SHA-512/256
90-
Digest Size: [SHA-224: 224 bit], [SHA-256: 256 bit], [SHA-384: 384 bit], [SHA-512: 512 bit], [SHA-512/224: 224 bit], [SHA-512/256: 224 bit]
91-
Block Size: [SHA-224,SHA-256: 512 bit], [SHA-384,SHA-512,SHA-512/224,SHA-512/256: 1024 bit]
92-
Rounds: [SHA-224,SHA-256: **64**], [SHA-384,SHA-512,SHA-512/224,SHA-512/256: `80`]
86+
- **[SHA-2](https://en.wikipedia.org/wiki/SHA-2)**
87+
Variants: **SHA224**, **SHA256**, **SHA384**, **SHA512**, **SHA-512/224**, **SHA-512/256**
88+
Digest Size: [SHA-224: _224 bit_], [SHA-256: _256 bit_], [SHA-384: _384 bit_], [SHA-512: _512 bit_], [SHA-512/224: _224 bit_], [SHA-512/256: _224 bit_]
89+
Block Size: [SHA-224,SHA-256: _512 bit_], [SHA-384,SHA-512,SHA-512/224,SHA-512/256: _1024 bit__]
90+
Rounds: [SHA-224,SHA-256: **64**], [SHA-384,SHA-512,SHA-512/224,SHA-512/256: **80**]
9391
Broken: No
9492

95-
- [SHA-3](https://en.wikipedia.org/wiki/SHA-3)
96-
Variants: SHA3-224, SHA3-256, SHA3-384, SHA3-512, SHAKE128, SHAKE256
97-
Digest Size: [SHA3-224: 224 bit], [SHA3-256: 256 bit], [SHA3-384: 384 bit], [SHA3-512: 512 bit], [SHAKE128,SHAKE256: d (arbitrary) bit]
98-
Block Size: [SHA3-224: 1152 bit], [SHA3-256: 1088 bit], [SHA3-384: 832 bit], [SHA3-512: 576 bit], [SHAKE128: 1344 bit], [SHAKE256: 1088 bit]
99-
Rounds: 24
93+
- **[SHA-3](https://en.wikipedia.org/wiki/SHA-3)**
94+
Variants: **SHA3-224**, **SHA3-256**, **SHA3-384**, **SHA3-512**, **SHAKE128**, **SHAKE256**
95+
Digest Size: [SHA3-224: _224 bit_], [SHA3-256: _256 bit_], [SHA3-384: _384 bit_], [SHA3-512: _512 bit_], [SHAKE128,SHAKE256: _d (arbitrary) bit_]
96+
Block Size: [SHA3-224: _1152 bit_], [SHA3-256: _1088 bit_], [SHA3-384: _832 bit_], [SHA3-512: _576 bit_], [SHAKE128: _1344 bit_], [SHAKE256: _1088 bit_]
97+
Rounds: **24**
10098
Broken: No
10199

102100
## HMAC Functions
@@ -110,13 +108,14 @@ Broken: No
110108

111109
Term | Description
112110
---------- | ----------
113-
**[Binary-to-text Encoding](https://en.wikipedia.org/wiki/Binary-to-text_encoding)** | Encoding of data in plaintext. More precisely, it is an encoding of binary data in a sequence of printable characters.
114-
**Base64** | A group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. Each Base64 digit represents exactly 6 bits of data. Three 8-bit bytes (i.e., a total of 24 bits) can therefore be represented by four 6-bit Base64 digits.
115-
**URL encoding/Percent-encoding** | A mechanism for encoding information in a Uniform Resource Identifier (URI) under certain circumstances.
111+
**[Binary-to-text Encoding](https://en.wikipedia.org/wiki/Binary-to-text_encoding)** | Encoding of data in `plaintext`. More precisely, it is an encoding of binary data(bytes/bits) in a sequence of printable characters.
112+
**Base64** | A group of similar `binary-to-text encoding` schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. Each `Base64` digit represents exactly 6 bits of data. Three 8-bit bytes (i.e., a total of 24 bits) can therefore be represented by four 6-bit `Base64` digits.
113+
**URL encoding/Percent-encoding** | A mechanism for encoding information in a `Uniform Resource Identifier` (**URI**) under certain circumstances.
114+
115+
## Encoding Algorithms
116+
- **[Base64](https://en.wikipedia.org/wiki/Base64)**
117+
- **[URL encoding](https://en.wikipedia.org/wiki/Percent-encoding)**
116118

117-
### Encoding Algorithms
118-
- [Base64](https://en.wikipedia.org/wiki/Base64)
119-
- [URL encoding](https://en.wikipedia.org/wiki/Percent-encoding)
120119

121120

122121
Note: A hash function is not an encryption/decryption function.

0 commit comments

Comments
 (0)