Hash function, or hash algorithm, is a method creating digital finger print from any kind of data. Hash function compresses message or data into a digested version to shrink the data into a fixed data size. This function disorganizes and remixes data, rebuilding a data fingerprint as a hash-value. Hash value is always represented by a short string consisting of random letters and digits.
RIPEMD is a cryptographic hash function published by Hans Dobbertin, Antoon Bosselaers Bart Prenee from COSIC research team, University of Leuven in 1996.
RIPEMD160 is a 160-bit improvement based on RIPEMD. This algorithm produces a 160-bit hash, which can be presented in hexadecimal format. One feature of this algorithm is avalanche effect, i.e. any slight changes can result in a totally different hash value.
NEO generates 160-bit hash of contract script with RIPEMD160.
|String value||Hash value|
- To generate contract hash.
SHA256 is a kind of SHA-2 algorithm. SHA-2 is a cryptographic hash function algorithm standard produced by NSA. It belongs to SHA family. It is a successor of SHA-1. SHA-2 has 6 different algorithm standards, including SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224 and SHA-512/256.
For any length of message, SHA256 will generate a 256-bit hash value (can be represented by a hex string)
|String value||Hash value|
Compute contract hash.
Signing & Signature validation.
Base58Check encoding / decoding.
db3、NEP6 wallet secret key storation, export & validation.
Murmur is kind of non-cryptographic hash algorithm and suits general hash indexing. It is proposed by Austin Appleby in 2008. Later several derived variants are released. Compared with other popular hash functions, Murmur's random distribution features perform better for regular keys.
Low collision probability.
Fast computing rate.
Good peformance for large files.
Scrypt is a kind of secure-cryptographic algorithm based on PBKDF2-HMAC-SHA-256 algorithm. It's developed by Colin Percival, a famous FreeBSD hacker, for his backup service Tarsnap. The original design was to reduce CPU load, minimize CPU reliance, and use CPU idle time for calculations. Therefore, scrypt not only takes a long time to calculate, but also consumes a lot of memory, making it difficult to calculate multiple digests in parallel. Therefore it is more difficult to use the rainbow table for brute-force-attacks.
Neo mainly uses SCRYPT algorithm to generate encryption secret key satisfying NEP-2 standard. Parameters are defined as follows:
N: CPU/RAM cost. Generally is a power of 2. Default value is 16384.
p: Parallelization parameter, a positive integer that ranges from 1 to 255. Bigger value represents a heavier reliance upon concurrent computation. Default value is 8.
r: Block size，theoretically ranges from 1 to 255. Bigger value represents a heavier reliance upon RAM & bandwidth. Default value is 8.
|Hello World||key:"I love code"
The hash value above is in single line.
NEP2 format secret key export.
Password verification for NEP6 wallet.
In case of dead links, please contact firstname.lastname@example.org