Skip to main content
. 2022 Aug 8;22(15):5921. doi: 10.3390/s22155921
Algorithm 1 Proposed Algorithm
Input: In the blockchain, Input “data.” Data can be anything like a word, a line, a paragraph, or multiple paragraphs.
data can be transactions of any digital currency.        {dataevent [22561]}
Output: A block created for every set of data. And as a result, a chain of the block is created known as the blockchain.
{ Hash Value of medical input data }
in the interval of positive integer [0, 2256 )
Assumption: Blockchain is a giant public ledger that tracks all bitcoin transactions ever made. These incoming transactions are referred to as “inputs. “Transactions entered in the order in which they occurred.
START: FOR EVERY {dataevent [22561]}
Step 1: Pre-processing: Generate a hash for the data. The hash depends upon the previous hash and the data in the current hash. Initial hash value (ph = 2,3,5,7,11,13,17,19)
int (( p mod 1)168)
Step 2: Hash Computing Using Preprocessing Data:
Now, we compute additional 48 words, totaling the number of words to 64. Here we compute the 10th word ( W9 ).
Wt=ROTL (σ1(Wt2)+Wt7+σ0(Wt8)+Wt9)
σ0=ROTL9 (m1)  ROTL12(m1)SHL3(m1)
σ1=ROTL11 (m1)  ROTL13(m1)SHL34(m1)
t=10 and m1= Wt9
ROTLLeft Rotate
Step 3: A small change in data creates a new hash known as AVALANCHE EFFECT. Create a block for a particular set of data. A block is accepted when 51% of the nodes verify the data within the block. That is known as BYZANTINE FAULT TOLERANCE.
Step 4: Generate a new block with hash values (a, b, c, d, e, f, g, h) for other sets of data.
For t=0 to 63
T1=h+1256e+ch(e,f,g)+ kt256+Wt
 T2=h+1256a+maj(a,b,c)
h=g=f
f=d+ T1
e=f+T1
d=c
c=b=a 
and a= T1 + T2

Step 5: The chain of the block created is known as the blockchain.
Step 6: TO COMPUTE THE FINAL HASH, RUN THE 64 ITERATIONS OF STEP 4.