A quick overview of the cryptographic algorithms used by TrustNote, including hash function, signature algorithm, PoW algorithm
For detailed technical information, please visit https://github.com/trustnote/document/blob/master/TrustNote-TR-2018-01.md
3. Institute of Technology
0
5
10
15
20
25
BLAKE2b BLAKE2s MD5 SHA-1 SHA-256 SHA-512 SHA3-256 SHA3-512
CyclesperbytespeedonIntelSandyBridge
Hash Function Name
mebibytes per second at 3.1 GHz
890
554 550 571
169
266 271
144
Blake2 comes in many flavours but
the main category is Blake2b and
Blake2s. The difference between b
and s mostly relies on their Digest
length, microcontroller/CPU
structure they are optimized to
support.
Max Digest Length:
Blake 2s = 256 bit
Blake 2b = 512 bit
5. Institute of Technology
Parameter Blocks of Blake2s
Offset 0 1 2 3
0 Digest length Key length Fanout Depth
4 Leaf length
8 Node offset
12 Node offset (cont.) Node depth Inner length
16
20
Salt
24
28
Personalization
BLAKE2s parameter block structure (offsets in bytes)
6. Institute of Technology
C/C++ Addon Implementation of Blake2b and Blake2s:
6,605,304 hashes for Blake2b with maximum digest length
7,128,410 hashes for Blake2s with maximum digest length
7. Institute of Technology
TrustNote uses Ed25519 as the signature algorithm. The reasons are:
1. Fast single-signature verification Reliability.
2. Very fast signing
3. Fast key generation
4. High security level
5. Collision resilience
6. Foolproof session keys
7. And so on
Public-Key Cryptography Algorithm
9. Institute of Technology
A is the public key point
a is the public key
H(*) is the Blake2 hash of *
B is the unique point (x, 4/5) ∈ E for which x is positive
M is the message
l is the prime 2^252 + 27742317777372353535851937790883648493
Ed25519 Terms
10. Institute of Technology
Ed25519 Sign / Verify
Steps for signature
1. computing r = H(hb, . . . , h2b−1, M)
2. computing R = rB
3. computing S = (r + H(R, A, M)a) mod l
Verification
SB = R + H(R, A, M)A
18. Institute of Technology
C/C++ Addon Implementation of Ed25519:
During 5 seconds, this package generates, signs and verifies 4,198 keys.
19. Institute of Technology
TrustNote uses Equihash based on CPU and GPU. The reasons are:
1. ASIC resistant.
2. More fair for users.
3. More randomness.
PoW Algorithms