Coherence
Search…
Hash

Hash

Security

1
Symmetric | ECC | DH/DSA/RSA | HASH
2
-----------+---------+--------------+-----
3
80 | 163 | 1024 | 160
4
112 | 233 | 2048 | 224
5
128 | 283 | 3072 | 256
6
192 | 409 | 7680 | 384
7
256 | 571 | 15360 | 512
8
9
Comparable Key Sizes (in bits)
Copied!

SHA3

spec
Descriptopn: It is the latest member of the Secure Hash Algorithm family of standards, released by NIST.
Outputs: 512, 384, 256, 224.
Uses: General propuse, 3GPP TS 35.231, FIPS 202 , SP 800-185. TUAK, NIST, FIPS.

SHA2 & SHA1

spec
Description: NSA cryptographic hash functions.
Outputs: SHA2: 512, 384, 256, 224. SHA1: 160
Uses: General propuse, backward compatibility. NIST, FIPS.

Whirlpool

Description: Hash based on AES.
Outputs: 512
Uses: Performance is not impportant, ISO/IEC 10118-3, NESSIE, ISO ,IEC.

Blake2b

spec
Description: Faster hash than SHA-3, SHA2, SHA1, MD5 and at least as secure as the latest standard SHA-3.
Outputs: 512
Uses: Performance is impportant, RFC 7693,

SipHash

spec
Description: SipHash is a family of pseudorandom functions (a.k.a. keyed hash functions) optimized for speed on short messages.Target applications include network traffic authentication and defense against hash-flooding DoS attacks.
Outputs: 128

How to ???

1
#!/usr/bin/env python
2
3
import requests
4
import json
5
import os,binascii
6
7
def sending(message):
8
url = 'http://127.0.0.1:6613/'
9
response=requests.post(url, data=message)
10
print response.content
11
12
data_js='{"version":1,"algorithm":"SHA3_512","type":"string","plaintext":"Hello world!"}'
13
sending(data_js)
Copied!
In this example we get SHA3512 for _Hello world! string
    On data_js["algorithm"] can be one of {SHA3_512, SHA3_384, SHA3_256, SHA3_224, SHA_512, SHA_384, SHA_256, SHA_224, SHA_1, WHIRLPOOL, BLAKE2B, SIPHASH}
1
data_js='{"version":1,"algorithm":"WHIRLPOOL","type":"string","plaintext":"48656c6c6f20776f726c64210d0a0d0a","hex":1}'
Copied!
In this example We get WHIRLPOOL for 48656c6c6f20776f726c64210d0a0d0 string.
    "hex":1 indicates the string is a hex string
    "hex":0 indicates the string is a ascii string
    When hex doesn't appear indicates the same as "hex":0
    hex parameter only applies for when "type":"string"
    hex parameter indicates if the string is hex or ascii.
1
data_js='{"version":1,"algorithm":"SHA_1","type":"file","file":"mayhem.txt"}'
Copied!
In this example we get SHA1 for _mayhem.txt file
    On "type":"file" the parameter "hex" isn't needed
    On "file":"route to file" indicates where is the file. It depends on where Coherence is running.
    On data_js["type"] can be file or string
    type indicates if you are going to apply the algorithm on a file or on a string.
Json to hash string
1
{"version":1,"algorithm":" hash flavor","type":"string","plaintext":"your string", "hex":BOOL}
Copied!
Json to hash file
1
{"version":1,"algorithm":"hash flavor","type":"file","file":"your file"}
Copied!