About Chain Consensus

Hashcash

Proof-of-Stake (PoS). The aim is brute forcing partial hash collision for the 𝑏 first bits of the hash target which initiated with 0 π‘˜ = 0000 ⏟ … … … .000 (k times). Prerequisites:

  1. Parameter 𝒔 is defined to distinguish between service names

  2. Parameter 𝑏 is defined as the number of bits from the left side of bit-string

  3. The notation of 𝐴 ≑b 𝐡 is defined for whether two sub bit-string of A,B from the left side (𝑖𝑛𝑑𝑒π‘₯ 0 π‘‘π‘œ 𝑏) are equal or not. The output of the comparison is True or False.

  4. Notation || is defined as concatenation between two bit-string

  5. π‘₯ is a random bit-string

  6. 𝑉 is True if 𝐻 (𝑠 || π‘₯) starts with 𝑏 bits filled with zero.

Cost-function interactive algorithm between client and server [8]:

Input: 𝑠, π‘₯ Output: True, False

  1. π‘†π‘’π‘Ÿπ‘£π‘’π‘Ÿ π‘π‘œπ‘šπ‘π‘’π‘‘π‘’π‘  𝐢 = πΆβ„Žπ‘Žπ‘™π‘™π‘’π‘›π‘”π‘’ (𝑠, 𝑏) π‘Žπ‘›π‘‘ 𝑠𝑒𝑛𝑑𝑠 π‘‘π‘œ π‘‘β„Žπ‘’ 𝑐𝑙𝑖𝑒𝑛𝑑

  2. The client searches for π‘₯ such that π»π‘Žπ‘ β„Ž (𝑠 || 𝐢 || π‘₯) ≑𝑏 0 π‘˜

  3. 𝐼𝑓 π»π‘Žπ‘ β„Ž (𝑠 || 𝐢 || π‘₯) ≑𝑏 0 π‘˜ 𝑖𝑠 π‘‡π‘Ÿπ‘’π‘’ π‘†π‘’π‘Ÿπ‘£π‘’π‘Ÿ ← 𝐢𝑙𝑖𝑒𝑛𝑑 𝑠𝑒𝑛𝑑𝑠 𝑠, π‘₯

  4. π‘†π‘’π‘Ÿπ‘£π‘’π‘Ÿ π‘π‘Žπ‘™π‘π‘’π‘™π‘Žπ‘‘π‘’π‘  𝑉 = πΈπ‘£π‘Žπ‘™π‘’π‘Žπ‘‘π‘’ 𝐻(𝑠 || 𝐢 || π‘₯) ≑𝑏 0 π‘˜

  5. 𝐼𝑓 𝑉 = π‘‡π‘Ÿπ‘’π‘’ π‘…π‘’π‘‘π‘’π‘Ÿπ‘› 𝑉 Else Return πΉπ‘Žπ‘™π‘ π‘’

Cost-function non- interactive algorithm [8]

Input: 𝑠, π‘₯ Output: True, False

  1. Client finds π‘₯ such that 𝐻 (𝑠 || π‘₯) ≑𝑏 0 π‘˜

  2. Client publishes 𝑠, π‘₯ 9

  3. 𝐴𝑙𝑙 π‘›π‘œπ‘‘π‘’π‘  π‘π‘œπ‘šπ‘π‘’π‘‘π‘’ 𝑉 = πΈπ‘£π‘Žπ‘™π‘’π‘Žπ‘‘π‘’ (𝑠 || π‘₯)

  4. 𝐼𝑓 𝑉 = π‘‡π‘Ÿπ‘’π‘’ π‘…π‘’π‘‘π‘’π‘Ÿπ‘› 𝑉 Else π‘…π‘’π‘‘π‘’π‘Ÿπ‘› πΉπ‘Žπ‘™π‘ π‘’

Elliptic Curve Digital Signature Algorithm (ECDSA)

As far as all curves in Elliptic Curve Cryptography (ECC) are not efficiently secure therefore numerous standard organization evaluate how equations of curves are secure for example, NIST introduced fifteen curves as standardized to be used in industry and financial technology [20]. ECDSA is based on asymmetric ECC and is more efficient in processing and bandwidth sake of short keys and more performance compared with RSA or Elgamal cryptosystem [21]. We take a brief look at the elliptic curve cryptosystem but not with all details. (Appendix A) The elliptic curve is simplified form of Weierstrass equation over algebraic field 𝐾 as a form of

For cryptographic purposes, coefficients, and variables belong to field 𝐾 that can be prime finite field or binary field. All points lie on the equation plus with abstract notation ∞ forms an Abelian algebraic group with additive operation. This cryptosystem is based on the hardship of discrete logarithm elliptic curves. Curve 𝑒𝑑25519 (twisted Edwards curves) and 𝑒𝑐𝑝256π‘˜1 are two well-tested and robust secure, applied cryptographic curves with specified parameters. 𝐸𝑐𝑝256π‘˜1 was implemented in either Bitcoin and Ethereum but still, processing time, key size, memory usage and resistance against quantum attacks can be more optimized. Therefore, there are much controversial debates to new implementation for new digital signature schemes. The first exposed solution was changing to 𝑒𝑑25519 sake of optimized key features rather than 𝑒𝑐𝑝256π‘˜1 with fast signing process and small signature and high level security [22]. Still 𝑒𝑑25519 is 11 vulnerable against quantum attack. Other alternatives can be evaluated for instance, Lamport signatures in Ethereum.

Key generation in ECC

Input: π‘Œ 2 = π‘₯ 3 + aX + b , π‘Ž, 𝑏, prime number 𝑍𝑝, Base point 𝐺, The order of subgroup 𝑛, cofactor β„Ž Output: private and public key

  1. π‘ƒπ‘Ÿπ‘–π‘£π‘Žπ‘‘π‘’ π‘˜π‘’π‘¦ ← πΆβ„Žπ‘œπ‘œπ‘ π‘’ π‘Ž π‘Ÿπ‘Žπ‘›π‘‘π‘œπ‘š π‘›π‘’π‘šπ‘π‘’π‘Ÿ π‘Žπ‘šπ‘œπ‘›π‘” {1, 2, 3, … . , 𝑛 βˆ’ 1}

  2. 𝑃𝑒𝑏𝑙𝑖𝑐 π‘˜π‘’π‘¦ ← πΆπ‘œπ‘šπ‘π‘’π‘‘π‘’ π‘π‘Ÿπ‘–π‘£π‘Žπ‘‘π‘’ π‘˜π‘’π‘¦ Γ— 𝐺 ( π‘›π‘œπ‘‘π‘’ π‘‘β„Žπ‘Žπ‘‘ π‘‘β„Žπ‘’ 𝑝𝑒𝑏𝑙𝑖𝑐 π‘˜π‘’π‘¦ 𝑖𝑠 π‘π‘œπ‘–π‘›π‘‘ π‘œπ‘› π‘π‘’π‘Ÿπ‘£π‘’)

  3. π‘…π‘’π‘‘π‘’π‘Ÿπ‘› private key and public key

Signing ECDSA

Input: π‘Œ 2 = π‘₯ 3 + aX + b a, b, prime number ZP, Base point G, The Order of Subgroup = n, Private key, message=M Output: 𝑀, signature 1, signature 2

  1. π‘Ÿ ← πΆβ„Žπ‘œπ‘œπ‘ π‘’ π‘Ÿπ‘Žπ‘›π‘‘π‘œπ‘š π‘–π‘›π‘‘π‘’π‘”π‘’π‘Ÿ π‘Ÿ , π‘Ÿ ∈ [1, 𝑛 βˆ’ 1]

  2. 𝑒 (π‘₯𝑒 , 𝑦𝑒) ← πΆπ‘œπ‘šπ‘π‘’π‘‘π‘’ π‘Ÿ Γ— 𝐺

  3. 𝑆0 ← πΆπ‘œπ‘šπ‘π‘’π‘‘π‘’ (π‘₯𝑒 π‘šπ‘œπ‘‘ 𝑛)

  4. 𝐼𝑓 𝑆0 == 0 π‘‘β„Žπ‘’π‘› Go to 1 Else 𝑆 ← πΆπ‘œπ‘šπ‘π‘’π‘‘π‘’ [ π‘Ÿ βˆ’1 (𝑀

𝑆0 Γ— π‘π‘Ÿπ‘–π‘£π‘Žπ‘‘π‘’ π‘˜π‘’π‘¦) ] π‘šπ‘œπ‘‘ 𝑛 (π‘Ÿ βˆ’1 𝑖𝑠 π‘šπ‘’π‘™π‘‘π‘–π‘π‘™π‘–π‘π‘Žπ‘‘π‘–π‘œπ‘› π‘–π‘›π‘£π‘’π‘Ÿπ‘ π‘’)

  1. π‘…π‘’π‘‘π‘’π‘Ÿπ‘› (𝑆0 , 𝑆)

Verifying ECDSA

Input: 𝑆, 𝑆0 , 𝑃𝑒𝑏𝑙𝑖𝑐 π‘˜π‘’π‘¦, π‘€π‘’π‘ π‘ π‘Žπ‘”π‘’ = 𝑀 , π‘œπ‘Ÿπ‘‘π‘’π‘Ÿ π‘œπ‘“ π‘ π‘’π‘π‘”π‘Ÿπ‘œπ‘’π‘ = 𝑛 , π‘π‘Žπ‘ π‘’ π‘π‘œπ‘–π‘›π‘‘ 𝐺 Output: True, False

  1. 𝑉1 ← πΆπ‘œπ‘šπ‘π‘’π‘‘π‘’ (𝑆 βˆ’1 Γ— 𝑀) π‘šπ‘œπ‘‘ 𝑛

  2. 𝑉2 ← πΆπ‘œπ‘šπ‘π‘’π‘‘π‘’ (𝑆 βˆ’1 Γ— 𝑆0) π‘šπ‘œπ‘‘ 𝑛

  3. 𝑃 ← πΆπ‘œπ‘šπ‘π‘’π‘‘π‘’ 𝑉2 Γ— 𝐺 + (𝑉2 Γ— 𝑃𝑒𝑏𝑙𝑖𝑐 π‘˜π‘’π‘¦ )

  4. 𝐼𝑓 π‘₯𝑝 == 𝑆0 (π‘šπ‘œπ‘‘ 𝑛) π‘‘β„Žπ‘’π‘› π‘…π‘’π‘‘π‘’π‘Ÿπ‘› π‘‡π‘Ÿπ‘’π‘’ Else π‘…π‘’π‘‘π‘’π‘Ÿπ‘› πΉπ‘Žπ‘™π‘ π‘’

Last updated