Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

Article

Crypto Hash Algorithm-Based Blockchain


Technology for Managing Decentralized Ledger
Database in Oil and Gas Industry
Lukman Adewale Ajao 1, *, James Agajo 1 , Emmanuel Adewale Adedokun 2 and
Loveth Karngong 1
1 Department of Computer Engineering, Federal University of Technology, Minna 920001, Nigeria
2 Department of Computer Engineering, Ahamadu Bello University, Zaria 810241, Nigeria
* Correspondence: ajao.wale@futminna.edu.ng; Tel.: +234-70-3735-9128

Received: 16 June 2019; Accepted: 1 August 2019; Published: 8 August 2019 

Abstract: This research work proposes a method for the securing and monitoring of petroleum
product distribution records in a decentralized ledger database using blockchain technology. The aim
of using this technique is to secure the transaction of distributed ledgers in a database and to
protect records from tampering, fraudulent activity, and corruption by the chain participants. The
blockchain technology approach offers an efficient security measure and novel advantages, such as
in the transaction existence and distribution ledger management between the depot, transporter,
and retailing filling station. Others advantages are transparency, immunity to fraud, insusceptibility
to tampering, and maintaining record order. The technique adopted for this secure distributed
ledger database is crypto hash algorithm-1 (SHA-1)-based public permissioned blockchain and
telematics, while this telematics approach is an embedded system integrated into an in-vehicle model
for remote tracking of geolocation (using Global Positioning System (GPS)), monitoring, and far-off
data acquisition in a real-time. The scope of the data in the secure distributed ledger database (using
blockchain) developed are identification (ID) of the tanker operator, Depot name, Source station ID,
Destination station ID, Petroleum product volume, Transporter ID, and Geographic automobiles
location. This system proved to be efficient, secure, and easy to maintain as it does not permit any
individual for records tampering, but supports agreement of ~75% of participants in the chain to
make changes.

Keywords: blockchain; database; petroleum product; security; telematics

1. Introduction
In the last decades, oil and gas (petroleum product) have been key sources of revenue, liveliness,
and industries for the national economy and its development [1]. Nigeria is recognized as one of
the highest ranked petroleum product exporting countries in the Organization of the Petroleum
Exporting Countries (OPEC) eleven [2]. However, the distribution process of this product in Nigeria
has been a great challenge over the years and generally caused fluctuation in the country’s economy.
These challenges are fuel scarcity, oil and gas hijacking, inflation in price, and many others.
The disruption in the supply of this inflammable resource in Nigeria has been a habitual problem
as its distribution has a multitude of problems. Aminu et al. proposed petroleum products (oil and gas),
aside from other occupation practices in the marketing supply chain, are generally an imperative source
of energy globally, and represent a major part of the economies of most developed nations, including
USA, UAE, Saudi Arabia, and so on [3]. One of the reasons for this product scarcity in the nation was
due to the transaction’s susceptibility to corruption, fraud, and lack of transparency among the parties

J 2019, 2, 300–325; doi:10.3390/j2030021 www.mdpi.com/journal/j


J 2019, 2 301

J 2019, 2, x 2 of 26
involved in the supply chain and distribution process [4]. Fraud, corruption, and mismanagement
in the distribution in
mismanagement process is traced back
the distribution to the usual
process is traced application
back toofthe manual
usualtransaction,
applicationcentralized
of manual
distributed
transaction,ledgers,
centralizedand pipeline
distributed network
ledgers,distribution
and pipeline vandalism
network[5]. distribution vandalism [5].
Althoughthe
Although theearlier
earlier transaction
transaction record
record is known
is known as a pictographic
as a pictographic tablettablet
(3200 BC)(3200 BC) ledger,
ledger, a recorda
record of transactions used for keeping information by any business organization in the earlier
of transactions used for keeping information by any business organization in the earlier century [6,7].
century
The [6,7]. Thetechnology
later advanced later advanced technology
of keeping records inof keeping isrecords
worksheet known as incomputerized
worksheet isspreadsheet.
known as
computerized
This spreadsheet.
digitized ledger This digitized
was designed ledger was
as a centralized ledgerdesigned as a centralized
that exposes ledgertothat
its vulnerability exposes
tampering
its vulnerability
and susceptibilityto totampering
corruptionand and susceptibility
fraud. Others to corruption
issues andcontrol
are central fraud. and Others issues are which
mishandling, central
control
led to theand mishandling,
emergence of thewhich led to the emergence
crypto-blockchain technology of the crypto-blockchain
proposed in this research technology proposed
for decentralized
in thissystem
ledger research for decentralized ledger system management.
management.
Blockchainisisthe
Blockchain thetechnology
technologybehind behindbitcoin
bitcoin[8] [8]and
andhas hasadvanced
advancedrevolutionary
revolutionaryservices
serviceswithwith
theability
the abilitytotoinfluence
influencefinancial
financialtransactions
transactionsand and render
render advantages
advantages of of transparency,
transparency,accurate
accuratetracing,
tracing,
permanentledger,
permanent ledger,costcostreduction,
reduction,and andrecord
record management
management [9].
[9]. This
This blockchain
blockchain technology
technology provides
provides a
a solution
solution to the todigital
the digital
confidenceconfidence of record-keeping
of record-keeping and informationand information
managementmanagement with a
with a timestamped,
timestamped,
transparent, andtransparent,
decentralized anddistributed
decentralized distributed
database block database
[10]. block [10].
Blockchain isis aa network
Blockchain network of of databases
databases that
that spread
spread across
acrossmultiple
multiple entities,
entities, which
which are
are kept
kept in
in
sequenceand
sequence andare arenotnot peculiar
peculiar to ato a single
single source source of control
of control [11,12].[11,12].
It givesItaccess
gives to access to information
information update,
update,
but but the historical
the historical data storeddatacannot
stored cannot be changed
be changed or modifiedor modified
without without
a broad a broad agreement
agreement fromfromthe
the partakers
partakers of theofnetwork.
the network. This means
This means that anthat an administrator
administrator from aunit
from a single single
of theunit of the distributed
distributed network
network
cannot cannot be
be allowed allowedortomodify
to tamper tamper theorstored
modify data the
heldstored
on a data held on
blockchain a blockchain
without agreement without
from
agreement from other participants in the network. Some of the major
other participants in the network. Some of the major advantages of blockchain include distributed, advantages of blockchain
include distributed,
efficiency, immutability, efficiency,
security,immutability,
transparency,security, transparency,
and resilience [13]. and resilience [13].
Theblockchain
The blockchain technology
technology hashas
beenbeen
widelywidely
adopted adopted as a security
as a security countermeasure
countermeasure against
against Internet
Internet
of Thingsof(IoT)
Things and(IoT) and software-defined
software-defined networknetwork
(SDN) (SDN) securitiessecurities
challenges challenges and cyberattacks
and cyberattacks [14].
[14]. Detection
Detection of fraudulent
of fraudulent rules is by
rules is proposed proposed
Ferra et by Ferra
al. for et al.contest
security for security
and as acontest and as a
countermeasure
countermeasure
against against man-in-the-middle
man-in-the-middle attack (MITMA) over attack the(MITMA)
SDN using over the SDN technology
a blockchain using a blockchain
[15], as
technologyin[15],
illustrated Figure as illustrated in Figure
1. A lightweight 1. A lightweight
cryptography cryptography
technique with Open-Flow technique with
rules Open-Flow
based on the
rules based on thenetworks
software-defined software-defined networks
and leveraged and leveraged
on blockchain on blockchain
technology is utilizedtechnology
to achieveis utilized
accurate to
achieve accurate detection of fraudulent attempts in the system.
detection of fraudulent attempts in the system. The result of the BLOOSTER system proposed The result of the BLOOSTER system
proposed demonstrates
demonstrates adequate adequate
detection detection
of tamperingof tampering and fraudulent
and fraudulent within within short detection
short detection time
time rate
rate
of of 100%.
100%. TheThe blockchain
blockchain technology
technology demonstrates
demonstrates thethe possibilityand
possibility andimprovement
improvement(including
(including
immutability,security,
immutability, security,and andtransparency)
transparency) over
over thethe traditional
traditional centralized
centralized ledger-based
ledger-based database
database as
as in
in the
the banking
banking industry,
industry, national
national population
population datadata management,
management, election
election voting voting
system system management,
management, and
and e-business
e-business transaction.
transaction.

(a) (b)
Figure1.1. (a)
Figure (a) Threat
Threatmodel
modelin
inaanetwork
networkand
and(b)
(b)proposed
proposedsecured
securedblockchain
blockchainarchitecture
architecture[15].
[15].

The
The authors
authors contributions
contributions in
in this
this research
researchare
arecentered
centeredon
onthe
thecrypto
cryptohash
hashblockchain-based
blockchain-based
database development for securing the decentralized ledger of petroleum distribution
database development for securing the decentralized ledger of petroleum distribution records recordsandandto
to safeguarddata
safeguard datatransaction
transactionregarding
regardingoil oiland
and gas
gas products
products within
within the
the supply
supply chain;
chain; also,
also, the
the
development of an embedded in-vehicle automated tracking system using a global positioning
system (GPS) approach for tracking the movement and geographical location of automobile
conveyance, as well as volume level of petroleum product in an automobile is inclusive monitored
J 2019, 2 302

development of an embedded in-vehicle automated tracking system using a global positioning system
(GPS) approach for tracking the movement and geographical location of automobile conveyance, as well
as volume level of petroleum product in an automobile is inclusive monitored using pairs of ultrasonic
sensors in case of leakages, tampering, or other theft activities. The GPS transmission–receiver and
its component are integrated and embedded in a strategic location of the automobile conveyance.
Consequently, all information acquired is dynamically sent to the crypto-database for update, storage,
and safeguarding using a miner algorithm as a distributed ledger principle.

2. Blockchain and Informatics Technology Investigation


Kogias et al. discussed a methodical survey of decentralized digital currencies (Bitcoin) and
its limitations as the first implementation of blockchain technology [16,17]. This work discussed
how to enhance the performance of Bitcoin security with consistency through collective signing.
It was proposed to achieve a high level of secretive consensus and safeguard Bitcoins in open
affiliation. The ByzCoin technique utilizes communication trees to augment transaction commitment
and authentication by ensuring safety and liveness against deceitful faults; it also provided near-optimal
tolerance for the group of membership. Therefore, optimizing the tree-structured communication of
Bitcoin further reduces the latency to less than 30 s, which achieved a throughput greater than Paypal’s
performance with an authorization latency of 15–20 s. Although, this technology (ByzCoin) has a
limitation of malicious that can hypothetically exclude nodes from the consensus process.
A Uniform Commercial Code (UCC) is proposed by Chima and Hill, (2007) to improve on
the supply chain management problems in the petroleum industry. This industry is involved in a
global supply chain product that includes local and international transportation, inventory, ordering,
import/export, visibility and control, and information technology. In this supply chain, a company is
connected to its upstream suppliers and downstream distributors as materials, data, and capital flow
through the supply chain [18].
Kshetri (2017) evaluates the roles of blockchain technology and whether it strengthens the Internet
of Things security architecture. It underlies the mechanisms associated with the blockchain-based IoT
security node and how blockchain-based resolutions could be implemented in many facets of the IoT
ecosystem [19].
Medical record (MedRec) based on blockchain technology is developed as a prototype for securing
electronic health archives and medical research data. This system secures logs and provides easy access
to their medical data and treatment diary. Using a blockchain technology approach safeguards some
sensitive medical records and information and it renders some security services such as authentication,
confidentiality, and accountability [20]. The MedRec technology, thus, facilitates the emergence of data
economics, delivering big data to empower scholars while appealing patients and providers in the
choice to release metadata.
The utilization and development of radio frequency identification (RFID)-based blockchain
technology was studied and the merits and disadvantages of using RFID with blockchain technology
in creating an agri-food supply chain traceability system were analyzed by Tian (2016). According
to this work, food safety has posed serious challenges on the China Nation as a result of traditional
agri-food logistics pattern that are no longer matches the demands of the market was described.
Therefore, this contest called for the urgent attention in building or developed agri-food supply
chain traceability system based blockchain technology. This system can enhance the traceability with
trusted information in the entire agri-food supply chain with a consistent guarantee of food safety by
gathering, transferring, and allocating reliable data of agri-food to the various production, processing,
warehousing, disbursement, and marketing links [21].
Telematics as a French ellipsis (telecommunication and informatics) is utilized as a wireless network
technology and communication technique for location tracking, monitoring, and surveillance [22,23].
All the information acquired through this telematics system is remotely transmitted to the crypto
hash decentralized database and is dynamically updated with permission of ~75% of the participants
J 2019, 2 303

in the chain agreement for any alteration. García et al. developed a service-oriented universal
J 2019, 2, x 4 of 25
computing
J 2019,model
2, x based on decentralized systems for public road transport monitoring. This system is 4 of 25
anJ 2019, 2, x
intelligence-based, 4 of 25
service-oriented utility developed to improve highway safety, transportation
highway safety, transportation system management, provide real-time information to travelers, and
systemhighway
manage management,
information
safety,providetransportation
about public real-time system
transportinformation management,
systemsto[24]. travelers,provide real-time
and manage information
information to travelers,
about public and
highwaymanage safety, transportation
information system management,
about public transport systems [24]. provide real-time information to travelers, and
transport systems
An autonomous [24]. vehicle in real-time implementation is developed for monitoring path-
manage information
An autonomous about public
vehicle transport systems
in implementation
real-time implementation [24]. isfordeveloped for monitoring path-
An autonomous
following vehicle in real-time is developed monitoring path-following
An of
following
the vehicle
autonomous of the
using
vehicle
vehicle
spatial
in
usingreal-timedual implementation
spatial
global positioning
dual global
satellite
is developed
positioning
(SDGPS).
for (SDGPS).
satellite
The system
monitoring The path-
of the vehicleisusing
performance satisfying spatial thedual global tracking
trajectory positioning satellite The
necessities. (SDGPS).
block The
diagramsystem forperformance
this The
proposed issystem
following of
performance the vehicle
is satisfying using spatial
the trajectory dual global
tracking positioning
necessities. satellite
The (SDGPS).
block diagram for this system
proposed
satisfying
method the trajectory
using spatial tracking
dual GPS necessities.
is illustrated The block
[25], and diagram
the model for this proposed
inblock
the design method
is for using
expressed spatial
as in
performance
method is satisfying
using spatial the
dual trajectory
GPS is tracking
illustrated necessities.
[25], and Themodel
the diagram
in the design this
is proposed
expressed as in
dual GPS(1)
Equation is illustrated
using [25], andbicycle
a standard the model model in the design
[26,27]. Aand is expressed
road safety as in Equation
notice anddesign
driver(1)assistance
using a standard
smart
method using
Equation spatial
(1) using dual
a GPS is bicycle
standard illustrated model [25],[26,27]. the
A model
road in the
safety notice and is expressed
driver assistanceas insmart
bicycle based
system modelon [26,27].
telematics A road safety notice
approach and and driver assistance
server-oriented system smart
is systemto
developed based
provideon telematics
real-time
Equation
system (1)based
using a standard
on telematics bicycle
approachmodel and [26,27]. A road
server-oriented safety notice
system is and driver
developed assistance
to provide smart
real-time
approach and
information server-oriented
assistance to the systemspeed
driver, is developed
safety to provide real-time
information, and data information
about roads assistance
with to the
obstacles,
system based on assistance
information telematics to approach
the driver, andspeedserver-oriented
safety system isand
information, developed
data to provide
about roads real-time
with obstacles,
driver, speed
rainfall, or snow safety[28].information,
Thetoalgorithm and anddata modelabout forroads
thesewith obstacles,
proposed rainfall,
objectives are or snow [28].
divided into The
two
information
rainfall, assistance
or snowfor [28]. the
The driver,
algorithmspeed safety
and model information,these and
fordivided data about
proposed roads
objectives with
are obstacles,
divided into two
algorithm
parts: and model
a highway-traffic these proposed objectives are into two parts: a highway-traffic
rainfall, or asnow
parts: [28]. parameter
highway-traffic The algorithm framework
parameter and model
framework
and for road
and
surface
theseroad
data model
proposed
surface
for monitoring
objectives
data model arefordivided speed
monitoring
vj
into two
speed vj
parameter
and distance framework
at time t onand the road
road surface
section data
j as model
expressed for monitoring
in Equation speed
(2). vj and distance at time t on
parts:and a highway-traffic
distance at time parameter
t on the framework
road section j and
as road surface
expressed in data model
Equation (2). for monitoring speed vj
the road section j as expressed in Equation (2).
and distance at time t on the road section ∝ ∝ j as expressed
∝ ∝ in Equation ∝ (2).
ὑ ∝ ѵ∝
ὑ − − ∝
∝ ∝
− − ѵ
ὑ = ∝ ∝ ∝ ∝
ѵ + ∝ 𝛿 (1)
𝑓 ∝− = ∝ −∝ ∝ ∝+ 𝛿 (1)
ṙ =ṙ
𝑓 ∝ ∝ ∝ 𝑟 ∝
+𝑟 𝛿 ∝
(1)
(1)
𝑓 ∝ ∝ ∝ ∝ ∝
ṙ 𝑟
where,
where,
y
where, is the vehicle longitudinal velocity (m/s)
y is the vehicle longitudinal velocity (m/s)
where,
ry is is
thetheyaw rate (%)
r isvehicle
the yaw longitudinal
rate (%) velocity (m/s)
𝛿r y the is
wheel the vehicle longitudinal
steering angle of thevelocity vehicle (m/s)
(rad)
r 𝛿 is the
is
yaw
the
the yaw
rate
wheel (%)
steering
rate (%) angle of the vehicle (rad)
𝐶∝𝑓𝛿 is the front wheels stiffness when curve (N/rad)
δ 𝐶∝𝑓
the wheel
is the steering
front anglestiffness
wheels of the vehiclewhen curve (rad)
the wheel steering angle of the vehicle (rad) (N/rad)
𝐶∝𝑟
𝐶∝𝑓 is the
is therearfrontwheelswheels stiffness
stiffness when when curve curve (N/rad)
(N/rad)
C∝ f 𝐶∝𝑟 isisthe
thefront
rearwheels
wheels stiffness
stiffness when when curve curve
(N/rad) (N/rad)
𝑙𝐶 is the length between CoG to front axle (m)
C∝r 𝑙 is the
∝𝑟 rear
isisthe
therearwheels
length
wheels stiffness
between when
stiffnessCoG when tocurve (N/rad)
front(N/rad)
curve axle (m)
𝑙𝑟 𝑙 l is is thethelength
length between
between CoGCoG toto rear
tofront axle (m)(m)
axle (m) (m)
f 𝑙𝑟 isisthe
thelength
length between
between CoG CoG front
to rearaxle axle
m 𝑙 lr the mass of vehicle (kg)
𝑟 m is thethe
is length
the massbetween
length between
of vehicle CoG
CoG
(kg) to rear axle (m)
to rear axle (m)
𝐼𝑧 mm Inertia the themoment
mass massof of around
vehicle
vehicle the Z-axis (kg/m2)
(kg)
(kg)
𝐼𝑧 Inertia moment around the Z-axis (kg/m2)
𝐼𝑧Iz Inertia
Inertia moment
moment aroundthe
around Z-axis (kg/m
theZ-axis (kg/m22))

2 · ₮ · 𝑣 (𝑡) + 𝛿(𝑡)· ₮
𝜇 (𝑡) = [₮(𝑡)+ ₮ + 2. ₮ . 𝑣 + 𝛿] . ₮ (2)(2)
𝜇 = [₮ + ₮ 2. +₮ (𝑡)
𝑔(𝑓 +(𝑡)
. 𝑣𝑔(𝑓 (𝑡))
𝜔(𝑡)
+ 𝛿+ 𝜔 [
. ₮ (𝑡)) (] )
[
( ) ]
( ) ( ) ]
(2)
𝜇 (𝑡) = [₮ + ₮ + ][ (2)
𝑔(𝑓 (𝑡) + 𝜔 (𝑡)) ( ) ( ) ]
where,
where,where,
(𝑡)
𝜇where, µ𝜇 ) the the
vj (t(𝑡)
mean mean
the
speed
speed
mean
at at
time
speedtime t on onthe
at ttime the road
t onroad sectionj in
thesection
j in(m/s)
road section
(m/s)
j in (m/s)
₮ 𝜇 (𝑡) is the
driver perception and response time section
(s)
₮ mean speed
is driver
is driver at time
perception
perception t on the
and response
and response road
time (s)time (s) j in (m/s)
𝛿₮ the vehicle distance + gap between vehicle
𝛿δ is the
driver
the perception
vehicle
vehicle +and
distance
distance gapresponse
+between
gap between time (s)
vehicle vehicle
g𝛿 is the
the vehicle
acceleration
distancedue+togap gravity
between rate,vehicle
9.8 (m/s)
gg is the
is the acceleration
acceleration due todue to gravity
gravity rate, 9.8rate,
(m/s)9.8 (m/s)
𝑓 (𝑡)
g f𝑓j ((𝑡) t) the frictional-road
is the
thethe
acceleration
frictional-road parameter
due
parameterto at
at time
gravity time period
rate, tononthe
9.8 t(m/s)
period the
roadroad section j
frictional-road parameter at time period t on section
the road j section j
𝜔 𝑓(𝑡)(𝑡)ω𝜔j (t(𝑡) thethelevel of road
thefrictional-road section j
parameterlink during collection period t (%)
) levellevel
the of road section
of road j at
j link during
section linktime period
collection
during t on thet (%)
period
collection road section
period t (%) j
t 𝜔 (𝑡) t is the
collection
level oftime
is collection time
road period
period
section (s)(s)
j link(s) during collection period t (%)
t is collection time period
j t j numbernumber of
is collection road
of roadsections.
sections.
j numbertime period
of road (s)
sections.
j number of road sections.
2.1.
2.1.Blockchain
BlockchainTechnology
Technology Types Types
2.1. Blockchain Technology Types
2.1.InBlockchain
In general,Technology
general, after
after the Types
the emergence
emergence of of Bitcoin
Bitcoin technology,
technology, there there are are three
three types
types of of blockchain
blockchain
In general, after the emergence of Bitcoin technology, there are three types of blockchain
technologies—public-based
technologies—public-based
In general, after the emergence permissioned,
permissioned, private-based
private-based
of Bitcoin private-based permissioned
permissioned
technology, there and
and permissionless,
are three typespermissionless, or
or
of blockchain
technologies—public-based permissioned, permissioned and permissionless, or
consortium
consortium or
or federated
federated blockchain
technologies—public-based blockchain [29]. [29].
consortium or federated permissioned, blockchain [29].private-based permissioned and permissionless, or
1. consortium or federated blockchain [29]. is a transparent and open permissioned-based Litecoin
1. The The public
1. public
permissioned
The publicpermissioned
permissioned
blockchain
blockchainblockchain is a transparent
is a transparent and open and permissioned-based
open permissioned-based Litecoin
Litecoin
1. system,
The system,
system, which
public
which allows
permissionedanyone
allowsallows
which anyone totoupdate
blockchain
anyone update or
isorareview
to update review anything
transparent
anything
or review andat
anything
aatime
atopen required. ThisThistechnology
atpermissioned-based
time arequired.
time required. ThisLitecoin
technology
technology
allows
system, anybody
which to participate
allows anyone in update
to managing the blockchain
or review anything as
at apublic.
time It is also known as a
allows anybody to participate in managing the blockchain as required.
public. It This technology
is also known as a
permissioned
allows anybody blockchain without any
toblockchain
participate centralized
in managing authority
the blockchain required for theItverification
as required
public. process
permissioned without any centralized authority foristhe
also known
verificationasprocess
a
aspermissioned
found in the Ethereum, blockchain Litecoin,
without and Bitcoin
any centralized technology
authority [30]. This
required type of technology allows
as found in the Ethereum, Litecoin, and Bitcoin technology [30]. for
Thisthe verification
type process
of technology allows
complete
as found node
in therunning,
Ethereum, easyLitecoin,
transaction, and review, or audit the[30].
Bitcoinreview,
technology blockchain
This typebyofany participant
technology in
allows
complete node running, easy transaction, or audit the blockchain by any participant in
the Bitcoins/Litecoin
complete node running, (BTC/LTC)easy chain of blockchain
transaction, explorer.
the Bitcoins/Litecoin (BTC/LTC) chainreview, or
of blockchain auditexplorer.
the blockchain by any participant in
J 2019, 2 304

allows anybody to participate in managing the blockchain as public. It is also known as a


permissioned blockchain without any centralized authority required for the verification process
as found in the Ethereum, Litecoin, and Bitcoin technology [30]. This type of technology allows
complete
J 2019, 2, x node running, easy transaction, review, or audit the blockchain by any participant in
5 of 26
the Bitcoins/Litecoin (BTC/LTC) chain of blockchain explorer.
2.2. Private
Privateblockchain
blockchainisisan anadvanced
advancedBitcoin
Bitcointechnology
technologythat thatisismanaged
managedcentrally
centrallyby
byan
anindividual
individual
orororganization
organizationfor for adequate
adequate security.
security. This
Thispermissioned-based
permissioned-basedblockchain blockchaindoes
doesnot
not allow
allow
negotiation
negotiation of the distributed network management as found in the BankChain practices. This
of the distributed network management as found in the BankChain practices. This
technology
technologydoes doesnotnotallow
allowanyone
anyonetotorunrunaafullfull node
node andand start
start mining
mining and
and does
does not
not grant
grant
transactions
transactionsaccess
accessor orreview/audit
review/auditby by anyone
anyone or or individual
individual on on the
the blockchain.
blockchain. The
The private
private
blockchain is a permissioned-based design for central authority and process
blockchain is a permissioned-based design for central authority and process authentication. authentication.
3.3. TheTheConsortium
Consortiumor orFederated
FederatedBlockchain
Blockchaineliminates
eliminatesthe thesole
soleautonomy
autonomyin inthe
theprivate
privateblockchain
blockchain
by making sure there is more than one person in charge of chain management.
by making sure there is more than one person in charge of chain management. Different authorities Different
authorities come together to make decisions that are good for the network
come together to make decisions that are good for the network such as a group of companies such as a group of
companies or representatives
or representatives of individuals
of individuals involved.involved.
It is also It is alsoas
known known as theblockchain
the hybrid hybrid blockchain
because
because it combines both the characteristics of a public blockchain and
it combines both the characteristics of a public blockchain and the private blockchain. the private blockchain.
The R3
The R3 companies
companies (New York (New York
City, NY,City,
USA)NY,andUSA)
EnergyandWeb Energy Web Foundation
Foundation (EWF) are (EWF) are open
open source and
source and scalable blockchain
scalable blockchain platforms. platforms.

2.2.
2.2.Secure
SecureHashing
HashingAlgorithm
Algorithm(SHA-1)
(SHA-1)
The
The most adoptedsecure
most adopted securealgorithms
algorithms associated
associated with
with the the blockchain
blockchain technology
technology are (SHA-1,
are (SHA-1, SHA2,
SHA2,
and SHA-256) encryption because of their unique quality of hash function that create unique unique
and SHA-256) encryption because of their unique quality of hash function that create outputs
outputs
when givenwhendifferent
given different
inputsinputs
[31,32].[31,32]. The hash
The hash function
function herehere
is aisunique
a uniquekeykey created
created totoidentify
identifya
atransaction
transactionthat
thatatatthe
thesame
sametimetimeidentifies
identifies anan individual
individual inin the
the petroleum
petroleum supply
supply chain.
chain. SHAwas
SHA was
originally
originallydesigned
designedby bythe
theUnited
UnitedStates
StatesNational
NationalSecurity
SecurityAgency
Agency(NSA)(NSA)andandUnited
UnitedStates
StatesFederal
Federal
Information
InformationProcessing
ProcessingStandard.
Standard.This Thisalgorithm
algorithmisisefficient
efficientin inverifying
verifyingfile
fileand
andmessage
messageintegrity
integrity
during
during transaction, data identification, and password verification. SHA-1 has a message of
transaction, data identification, and password verification. SHA-1 has a message size <2of
size 64

<2 512-bit
bits,
64 blockblock
bits, 512-bit size, 32-bit wordword
size, 32-bit size, and
size,160
andmessage digests
160 message [33]. [33].
digests
Blockchain
Blockchain technology is a combination of blocks in its architecture.Each
technology is a combination of blocks in its architecture. Eachblock
blockisismade
madeup upof
of
data and the hash of the previous block, except for the origin block that contains no
data and the hash of the previous block, except for the origin block that contains no previous hashing previous hashing
as
asshown
shownin inFigure
Figure2. 2.

Genesis Block

Data 1 2 3

Hash of
Hash Previous
Block Hash: 3Z5F Hash: 7AQ2 Hash: W85Y

3Z5F Previous Hash: 7AQ2


Previous Hash: 0000 Previous Hash:

(a) (b)
Figure
Figure2.2.(a)
(a)Hash
Hashblock
blockcomponent.
component.(b)
(b)Blockchain
Blockchainnetwork.
network.

Blockchaintechnology
Blockchain technologyfunctions
functionsare
arereliable
reliablefor
foruse
useininaa hashing
hashing crypto
crypto method,
method, which
which helps
helps
create an adequate and strong hashing code and convert it from a bit of fixed size data
create an adequate and strong hashing code and convert it from a bit of fixed size data to strings of to strings of
character. Each transaction proposed in a blockchain are hashed together before shoving
character. Each transaction proposed in a blockchain are hashed together before shoving in a block, in a block,
andthe
and thehash
hashpointers
pointersconnect
connecteach
eachblock
blockto tothe
thenext
nextblock
blockforforholding
holdingofofprevious
previoushash
hashdata
dataasasititisis
undisputable. Therefore, any changes in the blockchain transaction of hashing function
undisputable. Therefore, any changes in the blockchain transaction of hashing function will result will result
in
in different hash string of character and affect all the involved blocks. The efficient practice
different hash string of character and affect all the involved blocks. The efficient practice of this of this
technology(crypto-blockchain)
technology (crypto-blockchain)in inthe
thetransaction
transactionisisthat
thatany
anychanges
changespropagated
propagatedby byless
lessthan
than75%
75%of of
participants in the chain will result in attack; otherwise, more than 75% from the chain must agree
before any alteration. The generation of hash algorithm image using avalanche effect is shown in
Figure 3.
J 2019, 2 305

participants in the chain will result in attack; otherwise, more than 75% from the chain must agree
before any alteration. The generation of hash algorithm image using avalanche effect is shown in
Figure
J 2019, 2,3.
x 6 of 26

Engr Ajao is
from Futminna

Engr Ajao is
farm Futminna

Engr Ajao is
morf Futminna

Engr Ajao is
move Futminna

Figure
Figure 3. Crypto hash
3. Crypto hash function.
function.

2.3. Problems Statement


2.3. Problems Statement
Most developed and developing countries, including USA, UAE, Saudi Arabia, Iraq, and Nigeria,
Most developed and developing countries, including USA, UAE, Saudi Arabia, Iraq, and
among other African countries, are majorly dependent and have economies driven by oil and gas
Nigeria, among other African countries, are majorly dependent and have economies driven by oil
products, serving as the largest means of generating income. The distribution process of these oil and
and gas products, serving as the largest means of generating income. The distribution process of these
gas products is achieved through the pipeline network from refineries to the depot, to the marketer,
oil and gas products is achieved through the pipeline network from refineries to the depot, to the
and to the final consumers, which are threatened and vulnerable to different attacks, vandalism,
marketer, and to the final consumers, which are threatened and vulnerable to different attacks,
and materials expiration (corrosion). However, the road network is another means of conveying
vandalism, and materials expiration (corrosion). However, the road network is another means of
oil and gas products from one place to another over long distances, which in the past resulted in
conveying oil and gas products from one place to another over long distances, which in the past
serious hazards (accident), product diversification, automobile hijacking, and leakages [34]. Also, some
resulted in serious hazards (accident), product diversification, automobile hijacking, and leakages
developing countries, like ours (Nigeria), are still utilizing a centralized ledger or manual methods
[34]. Also, some developing countries, like ours (Nigeria), are still utilizing a centralized ledger or
for managing the records of oil and gas product distribution across the states, which is susceptible to
manual methods for managing the records of oil and gas product distribution across the states, which
fraud, record tampering, and solely autonomy. This shortcoming has become a serious challenge to
is susceptible to fraud, record tampering, and solely autonomy. This shortcoming has become a
the oil and gas industries as well as the governments of the nations. Therefore, this sabotage and threat
serious challenge to the oil and gas industries as well as the governments of the nations. Therefore,
requires maximum attention of the government and industries collaboration for adequate coordination,
this sabotage and threat requires maximum attention of the government and industries collaboration
planning, monitoring, and effective control to achieve maximum level of protection and reduces crisis
for adequate coordination, planning, monitoring, and effective control to achieve maximum level of
of fuel scarcity, hijacking, and many others threats.
protection and reduces crisis of fuel scarcity, hijacking, and many others threats.
3. Materials and Methods
3. Materials and Methods
The methods adopted in this research are two-fold: the development of secure hash-based
The methods
blockchain adopted
technology for theinsafeguarding
this researchofare two-fold: the
decentralized development
distributed ledgerof(petroleum
secure hash-based
products
blockchain technology for the safeguarding of decentralized distributed ledger
distribution data) using consolidation of programming languages and an embedded in-vehicle (petroleum products
distribution data) using consolidation of programming languages
geotracking and autoremote monitoring system using telematics technique. and an embedded in-vehicle
geotracking and autoremote
The development monitoring
of a distributed systemand
database using
webtelematics
applicationtechnique.
for the management of petroleum
Thedistribution
product development of aofdistributed
consists database
My Structured Query and web application
Language for theHome
(MySQL), Personal management
Page (PHP) of
petroleum product distribution consists of My Structured Query Language (MySQL),
scripting language, JavaScript, and cryptography hashing (SHA-1). The secure blockchain database Personal Home
Page
for this(PHP)
conceptscripting language,
was designed using JavaScript,
the phpMyAdminand cryptography
graphical userhashing
interface,(SHA-1). The secure
web application, and
blockchain
public databaseblockchain-based
permissioned for this concept was designed
hashing using
(SHA-1) wasthe phpMyAdmin
implemented withgraphical user interface,
PHP scripting language
web JavaScript.
and application,The
anddesign
public ofpermissioned
permissioned blockchain-based hashing
blockchain approach is (SHA-1)
classifiedwas
intoimplemented with
four basic nodes,
PHP scripting
which language and
are the regulator, JavaScript.
petroleum Thefiling
depot, design of permissioned
station, blockchain
and transporter nodes.approach is classified
These nodes are the
into four basic nodes, which are the regulator, petroleum depot, filing station, and transporter nodes.
These nodes are the network members in a decentralized ledger network. The method proposed for
crypto hash database functions of the decentralized petroleum products is illustrated in Figure 4. The
blockchain nodes (users) and the graphic user interface were created using PHP scripting language,
HTML scripting language, CSS scripting language, and JavaScript scripting language.
J 2019, 2 306

network members in a decentralized ledger network. The method proposed for crypto hash database
functions of the decentralized petroleum products is illustrated in Figure 4. The blockchain nodes
(users) and the graphic user interface were created using PHP scripting language, HTML scripting
language,
J 2019, 2, x CSS scripting language, and JavaScript scripting language. 7 of 26

Start

Access Denied Get


Registered First or Call for
Help Initialized System
No

Access Denied
Station
Registered Login As? Staff you are not our
Manager
Staff

Transporter
Can’t perform
Yes

Transaction,Please
No Registered ?
call for Help

Yes View Completed and


View Transporter Uncompleted
Status Initiate Transaction Transaction Status

Input Product Type,


Quantity, Destination,
Automobile ID and so on

Confirm Transaction Generate Transaction


Completed Hash & Add to the
Database

Real Data from


the Fleet
Database

End

Figure 4.4.
Figure AA crypto-database system
crypto-database flow
system diagram.
flow diagram.

3.1.Blockchain
3.1. Blockchain TransactionsArchitecture
Transactions Architecturefor
forPetroleum
PetroleumProduct
ProductDistribution
Distribution

AAtransaction
transaction is is aa copy
copyofoftransference
transference of assets (digital
of assets currency,
(digital units units
currency, of inventory, etc.) between
of inventory, etc.)
two or two
between moreorparties in a chain.
more parties To carry
in a chain. out a
To carry transaction
out in this
a transaction system,
in this system,a tanker
a tankerfleet
fleetdrives
drivesto
tothe
thedepot
depotand andaatransaction
transactionisisinitiated
initiatedbybythe
thedepot
depotoperator/administrator.
operator/administrator.After Afterthethetransaction
transactionis
is initiated, a hash of the transaction is generated using the SHA-1 hash function (public key),which
initiated, a hash of the transaction is generated using the SHA-1 hash function (public key), whichis
isgenerated
generatedbasedbasedon onthe the
previous transactions.
previous This transaction
transactions. detail isdetail
This transaction propagated to the participants
is propagated to the
in the blockchain with generated hash value of that particular transaction and
participants in the blockchain with generated hash value of that particular transaction and it can be it can be decrypted
using (private
decrypted usingkey). The transaction
(private of oil and gas
key). The transaction of product architecture
oil and gas product isarchitecture
presented inisFigure 5, which
presented in
comprises three major components (the source, third-party (transaction) and agent.
Figure 5, which comprises three major components (the source, third-party (transaction) and agent.
The source (φ) in this contest refers to the refineries/depot, third-party is the automobile
conveyance that is not trusted in the chain and is known as a transaction, and the agent/destination
(β) refers to the retailers (Filling station or distributor). Table 1 illustrates the transaction process
between the two parties (source A (φ) to different agent or destination B (β ) with many transaction
queues in the chain for petroleum distribution using public-permission blockchain.
J 2019, 2 307
J 2019, 2, x 8 of 26

Transaction is
represented as
Encryption
a block &
J 2019,
A 2, x
tanker is Truck A key 8 of 25
Hashing
loaded with fuel
at depot The block is broadcast to every
participant in the networks using
Truck B
3 public key
Truck C Transaction is
represented as
Encryption
a block &
A tanker is Truck A key
Hashing
loaded with fuel
at depot The block is broadcast to every
participant in the networks using
J 2019, 2, x
Truck B
J 2019, 2, x
Decryption 3 8 of 25
public key 8 of 25
Truck C
5
Key
Truck A, B,
Transaction is C& D
Transaction is All the blocks are added to
represented as
All the nodes in therepresented
networks as the chain which provides Encryption
Encryptiona block & Fuel is delivered to
a block & is
A tanker Truck A key
A tanker is must
Truck approve
A the indivisible
key Hashing & transparent Filling station
Hashing
loaded with fuel
loaded with fuel transactions atDecryption
depot
transaction records The block is broadcast to every
at depot The block is broadcast to every
participant in the networks using
FigureKey 3the 5
Truck B
5. Blockchain transaction model
participant of
in theof the developed
developed
networks using system.
3
Truck B Figure 5. model system.
public key
Truck C public key Truck A, B,
Truck C
The source (ϕ) in this contest refers to C& D
Table Allthe
therefineries/depot,
1. Transaction activities
blocks to third-party
in the
are added blockchain.is the automobile conveyance
thatAllisthe
not trusted
nodes in thein the chain and is known
networks aswhich
the chain a transaction,
provides and the agent/destination
Fuel is delivered to(β) refers to
Conveyance Quantity Transaction Destination Area Relation between
S/N
the retailers
must (Filling
approve the indivisible
station or distributor). Table 1& illustrates
transparent the transaction Filling
process between the two
station
ID (Liter) ID records
transaction ID A→B
parties
1
transactions
(source ϏA (ϕ) to different agent or destination
44,000 Ϗ , B (βni ) with many transaction queues
Minna (M)
in the chain
Ϗ , => φ→ M
Decryption
for2petroleum 𝜛distribution
Decryption using
Figure 5. public-permission
Blockchain
33,000 ϖ ,
transaction blockchain.
model of the developed
Lokoja (λ) system. ϖ => φ→ λ ,
Bida (ϐ)5
Key
3 µ
Key
11,000 µ 5, µ , => φ→
Truck ϐ
A, B,
Table 1. Transaction activities in the Truck A, B,
blockchain.
4 Ύ Table
33,000 1. Transaction Ύ Allactivities in the
, the blocks are added blockchain.
Ilorin
to C(ζ)
& D µ , => &Dζ
Cφ→
All the blocks are added to
5 ₤ All the nodes in44,000
the networks ₤ , the chain which provides Okene (ρ) µ ,
Fuel is delivered =>
to φ→ ρ
Conveyance
All the nodes in the networks Quantity
the chain which provides Transaction Fuel is Destination
delivered
indivisible & transparentto Area Relation
Filling station
between
S/N must approve the
must approve the ID indivisible &
(Liter) transparent ID transactionFillingrecords
station ID A→B
transactions
transactions transaction records
1 The operation Ϗ principle of this public-permissioned
44,000 Ϗ
Figure 5. Blockchain
blockchain
Minna used
(M) in
, transaction model of the developed system.
this designed
Ϗ , =>are
φ→divided
M
into2two parts 𝜛Figurewhich are open
5. Blockchain ledger belief and
transaction
33,000 model of the
ϖ ,decentralizedLokoja
developed system. ledger(λ) coding. ϖ , => φ→ λ
Table 1.µ Transaction µ ,
to see=> ϐ
activities inBida
the blockchain.
1. 3 Open Ledger µ Table 1. Transaction
Belief (OLB): 11,000
This help
activities in theevery ,
participant in this
blockchain. (ϐ)
network/chain andφ→ aware of
4 Ύ 33,000
Conveyance Ύ , Ilorin (ζ) µRelation
, => φ→ ζ
transactionQuantity
Conveyance and
S/N its content on theQuantity
Transaction chain and
Destination
Transaction
then
Area validate Destination
Relationusing
Area
betweenmining (public key). Here are
between
S/N 5ID ₤ (Liter) ID44,000 (Liter) ₤ , ID Okene ID
(ρ) µ , A→B => φ→ ρ
the procedures. ID ID A→B
1 Ϗ 44,000 Ϗ , Minna (M) Ϗ , => φ→ M
1 Ϗ 44,000 Ϗ , Minna (M) Ϗ , => φ→ M
2 𝜛 33,000 ϖ , Lokoja (λ) ϖ , => φ→ λ
𝜛i.The The
operation ϖ ϖ points=> φ→A λand
3principle of this public-permissioned blockchain used (ϐ)in this designed are divided
2 oil33,000
and gas products are Lokoja (λ) between
transported B through
µ , the third-party
, ,
The operation principle µof this public-permissioned
11,000 µ , blockchain used
Bida in this designed =>are
φ→ ϐ
divided
3 µ , µ , => φ→ ϐ
intoµ two (automobile
11,000
parts which4 are open ledger
conveyance).
Ύ belief
33,000
Bida (ϐ)
and decentralized
Ύ , ledger coding.
Ilorin (ζ) µ , => φ→ ζ
4 into Ύ 33,000 are openΎledger
two parts which , belief and
Ilorin decentralized
(ζ) µ , ledger
=> φ→coding.
ζ
5 ₤ 44,000 ₤ , Okene (ρ) µ , => φ→ ρ
5 ₤ii. The third-party
44,000 (automobile
₤ , conveyance)
Okene (ρ) is not => φ→ ρ with 44,000 L (Ϗ ,
µ , trusted ) of
1. Open Ledger Belief (OLB): This help every participant in this network/chain to see and aware of
1. Opentransaction
Ledger Belief from(OLB): point This help every B.participant in this network/chain to seetwo and aware of
transaction andThe its content
operation onAthe to chain
principle point
of and The
then transaction
validateblockchain
this public-permissioned
The operation principle of this public-permissioned blockchain used in this designed are divided
usingrelation
used inbetween
mining (public
this designedkey).areparties
Here
dividedareis
transaction
expressed and
intoas itsϏcontent
two parts
, which=> onφ→are 𝑀
the chain
and
open and
attached
ledger then
belief validate
with
and link. using
decentralized mining
ledger coding.(public key). Here are
the procedures.
into two parts which are open ledger belief and decentralized ledger coding.
the procedures.
iii. All transactions in the chain are validated using a
1. Open Ledger Belief (OLB): This help every participant in this network/chain public key for to every
see andparticipant
aware of
1. Open Ledger i. Belief
The (OLB):
oil This gas
and help products
every participant
are in this network/chain
transported between to see and aware
points A and of B through the third-party
agreement in the network.
transaction and its content on the chain and then validate using mining (public key). Here are
transaction and its content on the chain and then validate using mining (public key). Here are
i. (automobile
The oil and theconveyance).
gas products are transported between points A and B through the third-party
procedures.
the 2.
procedures.
Decentralized ledger coding (DLC): This is database helps govern
ii. The third-party
(automobile i. (automobile
conveyance).
The oil and gas productsconveyance) not trusted
are transported betweenwith 44,000
points A andL the
B(Ϗ
transaction
,
through ) the in the
of third-party
transaction
i. The oil and gas
chain/network products are
with transported
consensus between
agreement points A and B through
on therelation the
record betweenthird-party
updates two without central authorityas or
from point A (automobile
to point B. The transaction
conveyance). parties is expressed
(automobile conveyance).
third-party
Ϗ The negotiation.
=> φ→ ii. 𝑀The and It has timestamp
attached
third-party with
(automobile with
link. unique
conveyance) credentials
is not signature which
trusted with 44,000 L (Ϗ , ) of makes all
of transaction the
ii. The ii.third-party third-party
, (automobile (automobile
conveyance) conveyance)
is not trusted with is not
44,000trusted
L (Ϗ with, ) of transaction
transaction
iii. All
transaction from
from history
transactions
point
point A to Ain
from
toin
pointthe
point
B.chain
point
theThe
toimmutable.
Achain point B. validated
The are
B. transaction
transaction These
The transaction
relation procedures
using
relation
between
relation
a public
between
two areis
between
parties involved
key
two
twoforparties
parties inis
is the
every operation
expressed as
participant
expressed as
principle Ϗ , => φ→ 𝑀 and attached with link.
expressed Ϗ of
asagreement
, DLC.
=> φ→ in𝑀 the
and network.
attached with
and attached with link. link.
iii. All transactions in the chain are validated using a public key for every participant
iii. All transactions in the chain are validated using a public key for every participant
2. Decentralized agreement
ledger coding in the network.
(DLC): This database helps govern the transaction in the
agreement in the network.
2.
chain/network 2. with consensus
Decentralized ledgeragreement on the
coding (DLC): record
This updates
database
Decentralized ledger coding (DLC): This database helps govern the transaction in the
helps without central
govern the authority
transaction in theor
third-party chain/network
negotiation. with
It has consensus
timestamp agreement
withwithouton the
uniquecentralrecord updates
credentials without
signature which makes allorthe
central authority
chain/network with consensus agreement on the record updates authority or
third-party negotiation. It has timestamp with unique credentials signature which makes all the
third-partytransaction
negotiation. Ithistory in thewith
has timestamp chain
uniqueimmutable. These procedures
credentials signature are
which makes all theinvolved in the operation
transaction history in the chain immutable. These procedures are involved in the operation
transactionprinciple
history in of
theDLC.
chain immutable. These procedures are involved in the operation
J 2019, 2 308

iii. All transactions in the chain are validated using a public key for every participant
agreement in the network.
2. Decentralized ledger coding (DLC): This database helps govern the transaction in the
chain/network with consensus agreement on the record updates without central authority
or third-party negotiation.
J 2019,It
2, has
x timestamp with unique credentials signature which makes all 9 of 25
the transaction history in the chain immutable. These procedures are involved in the operation
principle of DLC. i. Broadcasting and publishing a copy of transaction to the network as follows, 𝜛 , =>
J 2019, 2, x φ→ 𝜆, µ => 9 of 26
,

i. Broadcasting and publishing a copy of transaction to the network as follows, $ =>


i. Broadcasting and publishing a copy of transaction to the network as follows, 𝜛 33,000 , =>
→µλ , ,µ11,000
φ→ϕ𝜆, => =φ→ > ϕϐ,→µϐ,, ,µ
φ→ µ 44,000
, =>=> >φ→
=φ→ ϕ𝜁,→µ µζ,, ,µ12,000
𝜁, => =
=> φ→
φ→ > 𝜌.
ϕ→ ρ.
𝜌.
ii.
ii. Synchronize the copy to ensure that transaction gets to all transaction
Synchronize the copy ii.
to Synchronize
ensure that the copy
transaction to ensure
gets to that
all gets
participants
participants to
ininthe all
the participants in the chain/network.
chain/network.
chain/network.
iii. Use a mining algorithm to validate the transaction by computing random hash number
iii.
iii. Use a mining
Use a mining algorithm
algorithm totovalidate
validatethethetransaction
transactionby bycomputing
computing random
random hash number
hash number
generation as a special key used by every participant in the network.
generation as a special key used by every participant in the
generation as a special key used by every participant in the network. network.
Furthermore, the use of this technology (blockchain) assists in securing the transaction of records
Furthermore, the use of(distributed
this technology
ledger(blockchain) assistsrecord
database), avoiding in securing theby
tampering transaction
sole autonomyof records
or fraudulent participant,
Furthermore, the use of this technology (blockchain) assists in securing the transaction of records
(distributed ledger database), avoiding record tampering by sole autonomy or fraudulent participant,
making immutable (difficult for an individual participant to tamper or modify), and rendering
(distributed ledger database), avoiding record tampering by sole autonomy or fraudulent participant,
making immutable (difficult for anThe
security. individual
transactionparticipant
block diagramtooftamper or technology
blockchain modify), and rendering
is illustrated in Figure 6.
making immutable (difficult for an individual participant to tamper or modify), and rendering security.
security. The transaction block diagram of blockchain technology is illustrated in Figure 6.
The transaction block diagram of blockchain technology is illustrated in Figure 6.

REQUEST
A transaction is COMPLETION PROCESS
required for The transaction is completed
REQUEST Link message and stored on a public ledger
A transaction is COMPLETION PROCESS
required for The transaction is completed
The blockchain technology use to
Link message
secure the transaction of products and stored on a public ledger
ledger records in a distributed
The blockchain technology use to ledger database, to avoid record TRANSACTION
BLOCK ATTACHMENT
tampering by solely autonomy or This is broadcasted
secure the transaction of products The new block is attached to
fraudulent participant and make and published to the
ledger records in a distributedIt Immutable for an individual the existing blocks in the chain
chain participant
which is immutable
ledger database, to avoid record participant TRANSACTION
and render security. awareness BLOCK ATTACHMENT
tampering by solely autonomy or This is broadcasted
The new block is attached to
fraudulent participant and make and published to the
the existing blocks in the chain
It Immutable for an individual chain participant
which is immutable
participant and render security. awareness
BLOCK
VALIDATION All the transactions in the
The participant in the chain chain are combined to create
validates the transaction with block
miner algorithm (cryptocurreccy)
BLOCK
VALIDATION All the transactions in the
Figure
The participant in the chain 6. Transaction block diagram in blockchain.
chain are combined to create
validates the transaction with block
3.2. Crypto Hash Algorithm
miner algorithm Functions
(cryptocurreccy)

In this research, SHA-1 was used to implement the permissioned blockchain for securing the
Figure
Figure 6.
6. Transaction
decentralized block
database
Transaction of diagram
distribution petroleum products. In cryptography, the Secure Hash
in blockchain.
Algorithm is a cryptographic hash function that takes an input and produces a 160-bit (20-byte) hash
3.2. Crypto
3.2. Crypto Hash
Hash Algorithm
Algorithm Functions
Functions
value known as a Message Digest (MD), which is rendered as hexadecimal number of 40 digits long
(Cryptotrack and cryptotrack). The crypto-blockchain block architecture and secure hash algorithm
In this
In this research,
research, SHA-1 was
SHA-1arewas used
used to
to implement
implement thethe permissioned
permissioned blockchain
blockchain forfor securing
securing the
the
outlined.
decentralized database
decentralized databaseof of
distribution petroleum
distribution products.
petroleum In cryptography,
products. the Secure
In cryptography, Hash
the Algorithm
Secure Hash
is a cryptographic hash Cryptotrack:
function that 6BD736F1C2DC0B566812B92B7C47EBA39BCD5222
takes an input and produces a 160-bit (20-byte) hash value known
Algorithm is a cryptographic hash function that takes an input and produces a 160-bit (20-byte) hash
cryptotrack: 5AA13558D0CCA00C53EDD39427392545046DB597
as a Message
value known Digest (MD), which
as a Message Digest is rendered
(MD), whichasishexadecimal
rendered as number of 40 number
hexadecimal digits long (Cryptotrack
of 40 digits long
and cryptotrack).
(Cryptotrack and The The processes
crypto-blockchain
cryptotrack). and implementation
block architecture
The crypto-blockchain blockand of this secure
secure hash
architecture andhash algorithm
algorithm areare
secure hash highlighted here.
outlined.
algorithm
are outlined. 1: Takes input text and splits it into an array of the characters’ ASCII codes.
Cryptotrack: 6BD736F1C2DC0B566812B92B7C47EBA39BCD5222
2: Converts ASCII codes to binary.
Cryptotrack: 6BD736F1C2DC0B566812B92B7C47EBA39BCD5222
cryptotrack: 5AA13558D0CCA00C53EDD39427392545046DB597
3: Pad zeros to the front of each bit until they are 8 bits long.
cryptotrack: 5AA13558D0CCA00C53EDD39427392545046DB597
4: Join them together and append them to one (1).
5: Pad the binary message with zeros until its length is 512 mod 448.
The processes and implementation of this secure hash algorithm are highlighted here.
1: Takes input text and splits it into an array of the characters’ ASCII codes.
2: Converts ASCII codes to binary.
J 2019, 2 309

The processes and implementation of this secure hash algorithm are highlighted here.

1: Takes input text and splits it into an array of the characters’ ASCII codes.
2: Converts ASCII codes to binary.
3: Pad zeros to the front of each bit until they are 8 bits long.
4: Join them together and append them to one (1).
5: Pad the binary message with zeros until its length is 512 mod 448.
6: Take binary 8-bit ASCII code array from step 3 and get its length in binary.
7: Pad with zeros until it is 64 characters.
8: Append to your previously created binary message from step 5.
9: Break the message into an array of chunks of 512 characters.
10: Break each chunk into subarray of sixteen 32-bit words.
11: Loop through each chunk array of sixteen 32-bit words and extend each array to 80 words using
bitwise operations.
12: Initialize some variables.
13: Looping through each chunk: bitwise operations and variable reassignment.
14: Convert each of the five resulting variables to hexadecimal.
15: Append them together and the result is your hash value or message digest.

3.3. Crypto Hash Computation (SHA-1)


In this type of cryptography hash computation, the modular exponentiation techniques were
used [35,36]. This technique (modular exponentiation) computes the remainder of an integer base
(b) exponent (e) of nth power, which is divided by a positive integer of modulus (m) as expressed in
Equation (3). The crypto hash techniques perform computation randomly in an efficient computable
deterministic as given in Equation (4). A given message of “Cryptotrack”, with a minor alteration
made during transaction to “cryptotrack”. The proposed secure algorithm will completely generate
an output different as expressed here, and the exchange key architecture of crypto hash function is
depicted in Figure 7.
[SHA-1] (“Cryptotrack”) denotes 6BD736F1C2DC0B566812B92B7C47EBA39BCD5222
SHA-1(“cryptotrack”) means 5AA13558D0CCA00C53EDD39427392545046DB597

F(x) = Y (3)

c = bx mod p (4)

where, F is SHA-1 function, x is transaction or message and Y is the output generated, c is the public
key, b is the key generator, x is the private key parties (i or j, or ij), and p is the prime number. From
the SHA-1 network, A, B, C, D, and E are 32 bits length; F is a nonlinear iteration function that varies
when interchanged; Wt is the message word expanded for round t; Kt is the constant round of t, 
representing an (xor) additional modulo 232 ; and <<<n represents the left bit rotation by numbers of
(n). The collision resistance is used during hashing of two different messages to achieve the same
value and to prevent a brute force attack as given in Equation (5), and the first iterative function of the
message block is expressed in Equation (6).

H{m1 } = H{m2 } (5)

Mt+1 = Ht+1 = h(Ht , Mt+1 ) (6)

Ht+1 = E(Ht , Mt+1 )  Ht (7)


J 2019, 2 310

The expansion of the message block Mt is split into 32 bits of 16 words {W0 , W1 , W2 , . . . , W15 } as
expressed in Equation (8), the transformation of message input is divided into 32 bits of five words
(A0 , B0 , C0 , D0 , and E0 ) as given in Equation (9), and the feed forward of input key message Mt+1
is the sums modulo of 232 that are concatenated to form the variable chaining Ht+1 as expressed in
Equation (10). The copies of each shift rotated message are given in Equation (10).

Wi = (Wi−16 ⊕ Wi−14 ⊕ Wi−8 ⊕ Wi−3 ) < 1 f or 16 ≤ i ≤ 79 (8)


 


 Ai+1 = (Ai  5) + fi (Bi , Ci , Di ) + Ei + Ki + Wi , 


Bi+1 = Ai ,

 


 

 
Stepi+1 :=  Ci+1 = Bi  2, (9)
 
 

 



 Di+1 = Ci , 



 
 Ei+1 = Di . 
J 2019, 2, x 11 of 26
Ht+i = (A0 + A80 ), (B0 + B80 ), (C0 + C80 ), (D0 + D80 ), (E0 + E80 ) (10)

i+1 ==(A
A𝐴 ≪+
(𝐴1  + f𝑓i ((𝐴
Ai−1 ,, 𝐴
Ai−2 ≫
 2,
2,𝐴Ai−3 ≫ 2)+
2) +𝐴Ai−4 ≫
22++ 𝐾Ki++𝑊
Wi (11)
(11)

where, EEisisthethe
where, block
block cipher, Htt is H
cipher, t is
the the message,
input input message,
Mt+1 Minput
t+1 is the t+1 iskey,
theand
input
Kii iskey, and Ki is the
the predetermined
predetermined constant.
constant.

Hash function
Figure 7. Hash function security
security key
key exchange and computation [37].

However, the
However, theuser authentication
user nodes
authentication permit
nodes a useratouser
permit register instead of
to register storingof
instead thestoring
passwords
the
as plain text, and subject it through a one-way hash function before being stored in a database,
passwords as plain text, and subject it through a one-way hash function before being stored in a which
will be used
database, for the
which user
will beauthentication loginauthentication
used for the user password. Thelogin
user authentication
password. Theprocedure is depicted
user authentication
in Figure 8.is depicted in Figure 8.
procedure

User Password
Registration Hashed Database

Password Hashes
User Login
Hashed Match?

Yes No

Login
Login Success
Failure

Figure 8. User
User authentication
authentication architecture.
architecture.

3.4. Mining Algorithm and Pseudocode-Based Blockchain


Mining in the framework of blockchain technology is the process of combining new transactions
to the public decentralized ledger database of the previous or existing transactions in the blockchain
for recording and validation. This process in the chain is important to set the history of transaction
J 2019, 2 311

3.4. Mining Algorithm and Pseudocode-Based Blockchain


Mining in the framework of blockchain technology is the process of combining new transactions
to the public decentralized ledger database of the previous or existing transactions in the blockchain
for recording and validation. This process in the chain is important to set the history of transaction
for the mathematical computation (hashing), so that it can achieve an immutable, tamper-resistant
consensus and secure any single node participant or third-party in the network. Therefore, the mining
algorithm refers to the hashing or cryptographic hash-function that is used for authentication or digital
signature in the chain mechanism. This algorithm is used to map arbitrary data size into an equivalent
fixed size of hash. The pseudocode, flowchart, and architecture for the mining algorithm are depicted
in Figures 9 and 10.
From the process of this mining algorithm, if anyone else is added to the transaction list in the
chain from step 1 it will change the random number generated, and there is a tendency for the selection
criterion
JJ 2019, 2,to
2019, 2, xx be met in another round as shown in Figure 11. 12 of 12
26 of 26

Figure 9. Pseudocode for the mining algorithm.


Figure9.9.Pseudocode
Figure Pseudocode for
for the
the mining
miningalgorithm.
algorithm.

Start
Start

Step 1: Retrieve the


hash of the previous
Step 1: Retrieve the
block from the network
hash of the previous
block from the network

Step 2: Gather a list of potential Step 3: compile the list of


transactions known as a "block". potential transactions known as a
Step list
This 2: Gather a list of potential
of transactions comes Step This
"block". 3: list
compile the list of
of transactions
transactions
from known as abitcoin
the peer-to-peer "block". potential
comes fromtransactions known as a
the peer-to-peer
This list of transactions comes
network "block".
bitcoin This list of transactions
network
from the peer-to-peer bitcoin comes from the peer-to-peer
network bitcoin network

No
Step 4: Calculate the
Step 4: If the hash is more
hash for a block of
No than the currently set
potential
Step 4:transactions
Calculate the
difficulty
Step level?,
4: If the hash Else
is more with a random
hash for number
a block of
than the currently set
potential transactions
difficulty level?, Else
with a random number
Yes

Yes
Step 5: Mined the block

Step 5: Mined the block

End

Figure
Figure 10.
10.Mining
End Miningalgorithm flowflow
algorithm diagram.
diagram.

From the process of this mining algorithm, if anyone else is added to the transaction list in the
Figure 10. Mining algorithm flow diagram.
chain from step 1 it will change the random number generated, and there is a tendency for the
selection criterion to be met in another round as shown in Figure 11.
From the process of this mining algorithm, if anyone else is added to the transaction list in the
chain from step 1 it will change the random number generated, and there is a tendency for the
J 2019, 2, x 13 of 26

J 2019, 2 312
J 2019, 2, x 13 of 26

J 2019, 2, x 13 of 26
Private Key
Blockchain Blockchain
Public Key NODE NODE
Private Key
Transaction Blockchain Blockchain
order Key
Public NODE NODE
Private Key Blockchain NODE Blockchain
Blockchain Blockchain
Transaction NODE NODE
Public Key NODE
order NODE NODE
Private Key Blockchain Blockchain
Transaction
order NODE NODE NODE
Public Key Blockchain
Blockchain Blockchain Blockchain
Private Key
NODE NODE NODE NODE
Transaction
Private
order
Public Key Key
NODE Blockchain Blockchain
Public Key NODE
Blockchain NODE
Blockchain
Transaction
order
NODE NODE NODE
Transaction
order
NODE
Figure 11. Mining algorithm architecture.

3.5. Cryptographic Algorithm for Key Management


Figure
Figure
inalgorithm
Mining
11. Mining
11.
Blockchain
algorithm Technology
architecture.
architecture.
Figure 11. Mining algorithm architecture.
3.5. The blockchainAlgorithm
Cryptographic protocolfor is assigning
Key Management to a single-message (transaction) as an interactive for the
in Blockchain Technology
3.5. Cryptographic
establishment of Algorithm
key for Key Management
creation/generation, signing inmessage
Blockchain
for Technology
randomness of key and verification of
3.5. Cryptographic Algorithm for Key Management in Blockchain Technology
The
publicThe blockchain
keyblockchain protocol
as illustrated in is assigning
Figure 12. The to a single-message
algorithm for (transaction)
signature is computedas anhere
interactive for the
using digital
The blockchain protocol
protocol is isassigning
assigningto to aa single-message
single-message (transaction)
(transaction) as interactive
as an an interactive for the
for the
establishment
signature of
standard key creation/generation,
(DSS) technique based on SHA-1 signing message
[38–40].for randomness
The approach of key
for and and
digital verification
signatureof
establishment
establishmentof key creation/generation,
of key creation/generation,signing message
signing message forrandomness
for randomness of key
of key verification
and verification of
of public
creation andkey as illustrated
verification is in Figurein12.
depicted The 13,
Figure algorithm
the for signature
algorithm is is computed
outlined, and here usingfor
computation digital
the
public key key
public as illustrated
as illustratedin in
Figure
Figure12. 12.The
The algorithm
algorithm for forsignature
signatureis is computed
computed herehere
usingusing digital
digital
signature
key standard
is signature
expressed (DSS)
in Equations technique
(12) based
and based
(13). on SHA-1 [38–40]. The approach for digital signature
signature standard
standard(DSS)
(DSS)technique
technique based onon SHA-1 [38–40].The
SHA-1 [38–40]. Theapproach
approach for for digital
digital signature
signature
creation and and
verification is depicted ininFigure 13, the algorithmisisoutlined,
outlined, and computation for the
creation and verification is depicted in Figure 13, the algorithm is outlined, and computationthe
creation verification is depicted Figure 13, the algorithm and computation for for the
key is expressed in Equations (12) and
and(13).
key iskey is expressed
expressed in Equations
in Equations (12)
(12) and (13).
(13).
Message Message

Message Message
Message Message

Private Public
Signature
Key Key
Private Create Verify Public
Signature
Private
Key Public
Key
Create Signature Verify
Key Key
Create Verify
Figure
Figure12.
12.Signature
Signaturecreation
creationand
andverification.
verification.
Figure 12. Signature creation and verification.

M Figure 12. Signature creation and verification.


M
p q g
p q g
M M
M
p q g
K K
M
qq
K
r r
q
H H s s
H(M)
H(M)
r
x xx
x H s
H(M) (a)
(a) x
x
Figure 13. Cont.
(a)
J 2019, 2 313
J 2019, 2, x 14 of 26

p q g

r
s

(b)

Figure 13.
Figure 13. (a) Verification public; (b) Signing message.
(a)Verification message.

1. Key generation procedure/Algorithm


1. Key generation procedure/Algorithm
Step 1. Signing message
Step
i.
1. Signing message
Start with shared the global public key values (p, q, g)
i.
ii. Start with shared
Select about the prime
160-bit globalnumber
public(q)key values (p, q, g)
ii. Select about 160-bit prime number (q)
Select a large prime number (p) with 2ˆ (L-1) < p < 2ˆl, where L will be equal to
iii.
Select
512 atolarge prime
1024 bits andnumber (p) with
is a multiple 2^ (L-1)
of 64 such that <q p
is <a 160-bit
2^l, where
primeLdivisor
will beofequal
p-1 to 512 to 1024
iii.
iv. bitsSelect
and is h, athen
multiple of 64 such mod
find g=hˆ((p-1)/q) that p,
q is a 160-bit
where 1<h<p-1 prime
anddivisor of p-1
hˆ((p-1)/q) mod p>1
iv.
Step 2. Select h, athen
Select findkey
private g=h^((p-1)/q)
and computemod p, where
the public keys1<h<p-1 and h^((p-1)/q) mod p>1
i.
Step 2. Select a random private key such that:
Select a private key and compute the public keys x < q
ii.
i. Compute
Select a random the public keykey
private suchsuch y = gxx<modp
that:that: q
ii. Compute the public key such that: 𝑦 = 𝑔 𝑚𝑜𝑑𝑝
2. Creation of Signature
Step1. Signing of a message M, the sender:
2. Creation of Signature
i. Creates a random signature key (k), such that k < q
Step1. Signing of a message M, the sender:
ii. Creation of k must be random, one-time password (OTP) and destroyed after used
i. Creates a random
Computation signature key (k), such that k < q
Step 2 of signature pair
ii.

i. r = gkof
Creation modk pmust
modbeq random, one-time password (OTP) and destroyed after used
h i
−1
s = k (H (M
ii.
Step 2 Computation of)signature
+ xr) mod qpair
iii. The signature (r, s) and message M (Transaction) will be send
i. 𝑟 = (𝑔 𝑚𝑜𝑑 𝑝 )𝑚𝑜𝑑 𝑞
ii. (𝐻(𝑀) +of𝑥𝑟)]𝑚𝑜𝑑
𝑠 =3.[𝑘Verification 𝑞
Signature
i.
iii. TheWhile receiving
signature (r, s)message (M) withMsignature
and message (r, s) will be send
(Transaction)
Then, to verify a recipient transaction signature, use the following computation.
w = s−1 mod q = k(H (m) + xr) −1 mod q
ii. 3. Verification
u1 = [H (M)wof ]modSignature
q
i. u2 =h(rw)mod q
While receiving  message
i (M) with signature (r, s)
v = gu1 yu2 mod p mod q
iii. Then,
If v to
= r,verify a recipientsignature
then transaction transaction signature, use the following computation.
is confirmed
𝑤 =End
𝑠 the𝑚𝑜𝑑 𝑞 = 𝑘(𝐻(𝑚) + 𝑥𝑟) 𝑚𝑜𝑑 𝑞
process.
ii. 𝑢1 = [𝐻(𝑀)𝑤]𝑚𝑜𝑑 𝑞 S = K−1 h(m) + xr mod q

(12)
𝑢2 = (𝑟𝑤)𝑚𝑜𝑑 𝑞 Zp = 1, 2, . . . , p − 1

(13)
𝑣 = [(𝑔 𝑦 )𝑚𝑜𝑑 𝑝] 𝑚𝑜𝑑 𝑞
where,
iii. If v = r, then transaction signature is confirmed
End the process.

𝑆=𝐾 {ℎ(𝑚) + 𝑥𝑟}𝑚𝑜𝑑 𝑞 (12)

𝑍 = {1, 2, … , 𝑝 − 1} (13)
J 2019, 2, x 15 of 26

where,
J 2019, 2 314
is prime number where 2 < p < 2 , for 512 ≤ L ≤ 1024 and L a multiple of 64 ,
p
i. e. , . , a bit length between 512 and 1024 bits in increments of 64 bits
q prime divisoris primeof (p − 1),
number where
where 2 < p<<q2L<, for
2L−1 2 512i. e≤…L .≤a 1024
bit length
and L of 160 bitsof 64 ,
a multiple
p ( )/
s h mod
i.e., ., ap,
bitwhere
lengthhbetween
is any integer
512 andwith
10241bits
< hin<increments
(p − 1), such bits h(
of 64 that )/
mod p > 1
xq randomprime or pseudorandom
divisor of (p − 1integer
), wherewith
2 0<<q x<<
159 2 q i.e
160 . . . . as
used a private
a bit length ofkey
160 bits
ys is givenh(as p−1)/q
g mod
modpp, used as 𝒑𝒖𝒃𝒍𝒊𝒄
where integer with 1 < h < (p − 1), such that h(p−1)/q mod p > 1
h is any 𝒌𝒆𝒚
x used torandom generate or random or pseudo
pseudorandom integer with 0 <integer
− random x < q used with as0a < k
private key
k
y is given as < q perpmessage
gx mod secretkey
used as public number
r, s is the signature for signing,
used to generate randomwhere r = −grandom
or pseudo mod pinteger
mod q, and0 <𝐬 k=<[ k 𝟏 (H(M ) + xr)]mod q
with
k
q per message sec ret number
v = r is the verification, w = (s ) mod q 
is the signature for signing, where r = gk mod p mod q, and
r, s u𝟏 = [H(M
s = [)w]mod
k−1 (H(Mq) + xr)]mod q

v, r
u𝟐 = (𝐫v′ )w
= r mod
is theqverification, w = (s− ) −1 mod q
0
u = [H( M )w]mod q
v, r v = [(g 1 y )mod
0 p]mod q
u2 = r w mod q
M Message tohbeu1signed
u2
 i
v = g y mod p mod q
H(M)
M Hash of M using
Message SHA-1
to be signed
M’,
H(M) r, Hash of M using SHA-1
the received varieties or copy of M, r, s.r, s.
s’M’, r, s’ the received varieties or copy of M,

3.6. Implementation of (Telematics)


(Telematics) an
an In-Vehicle
In-Vehicle Tracking
TrackingSystem
SystemPrototype
Prototype
The telematics
telematics system was developed
developed and and programmed
programmed in in Arduino
Arduino integrated
integrated development
development
environment (IDE) for monitoring the petroleum volume of automobiles automobiles using some hardwarehardware
components.
components. The telematics method
method is shown in Figure 14. The automobile
The automobile tracking system prototype
was
was designed
designed and
and integrated
integrated into
into the
the oil and gas tankers for monitoring and tracking the geolocation
of automobiles.
automobiles. The hardware system consists of GPS, which is capable of transmitting and receiving
remote information through satellite and computecompute thethe geographic
geographic position
position (longitude,
(longitude, latitude and
altitude) for the location-dependent.
location-dependent. The ultrasonic sensor (HC-SR04, is a distance measuring sensor
that capable
capable of
of providing
providing 22 cm–400
cm–400 cm cm measurement
measurement with with accuracy
accuracy of of about
about 3mm
3mmranging.
ranging. The
transmitter, receiver and control
control circuit
circuit are
are embedded
embedded withwith four
four pins
pins connection
connection namely are power
(VCC), trigger (Trig), Receive
Receive (Echo)
(Echo)andandground
ground(GND).
(GND).ItItisismanufactured
manufactured byby
HcHc Sr04
Sr04 company
company in
in China. (Arduino Uno development board (ATmega 328P, it is an 8-bit
China. (Arduino Uno development board (ATmega 328P, it is an 8-bit reduced instructional setreduced instructional
set computer
computer manufactured
manufactured by by
thethe Microchip
Microchip ininPadova,
Padova,Italy)
Italy)for
for system
system activities
activities control and
coordination.
coordination. A lithium battery of 9v is used for the system power
power using DC–DC converter.
using DC–DC converter.

Start

Initialized Liquid
Level, Sensor, GSM
& G PS Module
No

Compute GPS
Coordinate &
Liquid Level

Is d ata
Transmit the acquired
received &
data to Admin (Server)
Valid?
Yes
Up date the
Ad d data to
google map
blockchain
view
server

Stop

Figure 14. Hardware system flow diagram.


J 2019, 2, x

The HC-SR04 ultrasonic sensor has two phases for the signal transmit
J 2019, 2 315
which both cover a distance of 4m. Each phase of the sensor uses the distanc
petroleum product surface to calculate the liquid level in a tank as expressed in
J 2019, 2, x 16 of 25
The HC-SR04 ultrasonic sensor has two phases for the signal transmit 𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒 (Tx) and(ɖ) =
receiver (Rx), (ȕ) ∗ ( )

The HC-SR04 ultrasonic sensor has two phases for the signal transmit (Tx) and receiver (Rx),
which both cover a distance of 4 m. Each phase of the sensor uses the distance between itself and the
which both cover a distance The time of flight of the HC-SR04 sensor between the levels of the li
2, xof 4m. Each phase of the sensor uses the distance between itself and the
petroleum product surface to calculate theJ 2019,
liquid level in athe
computed
petroleum product surface to calculate
tankas as
2ɖx.
liquid
expressed
Therefore,
level
inasEquation
in a tankthe speed ( in
expressed
(14).
Equation (14).
The HC-SR04 ultrasonic sensor(ȕ)has
𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒 (ɖ)∗ =time delay (t)
∗ two phases
( ) for the signal transmit (Tx) an
(14)
Speed oJ 2019, 2, x (ȕ)a distance
f sound
Distance (ã) = which both cover) of the wave
of 4m. Each phase of the sensor uses
is expressed as in of
Equation (14)
(15),towhere
the distance betwee
changesisin distance
The time of flight of the HC-SR04
petroleum product 2 surface
sensor between
to thethe
calculate levels the liquid
liquid level in a tank the receiver
as expressed in Equati
are
computed as 2ɖx. Therefore, theThe calculated
HC-SR04
speed ( in Equations
ultrasonic (16) and
sensor has(17).
two phases for the signal transmit (T
(ȕ) ∗ ( )
The time of flight of the HC-SR04 sensor between
2019, 2,the
Jwhich x levels
both coverofa the liquid
ofto
𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒
distance theEach
(ɖ)
4m. receiver
= phaseisof
computed2ɖ𝑥 uses the distance b
the sensor
ȕ=
as 2ãx. Therefore, the speed ( ȕ ) of the wave is expressed
petroleumas in Equation
product surface(15), where changes
to calculate the liquidin inɖ𝑡a tank as expressed in E
distance
level
The time
The of flight ofultrasonic
HC-SR04 the HC-SR04 sensor
sensor has between
two phasesthe levels
forthethe of thetransmit
signal liquid to
(T
) of the wave
(ãx) of the liquid level are calculated is expressed(16)
in Equations as inand
Equation
(17). (15), where changes in distance (ɖx) of liquid
(ȕ) ∗
level( )
computed as 2ɖx. Therefore, the speed (
are calculated in Equationswhich both
(16) and 𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒
cover a distance of
(17). (ɖ)phase
4m. Each = of the
ȕɖ
ɖ𝑥 =sensor uses the distance b
petroleum
2ãx product surface 2ɖ𝑥 to calculate the liquid level in a tank as expressed in E
ȕ = The time of flight ȕ=
of the HC-SR04 sensor between ȕ(15)
the levels (15)
of the liqu
computedãt as 2ɖx. Therefore, ɖ𝑡 the speed ( ∫ ɖ𝑥 = ∫ (ȕ) ɖ𝑡 ∗ ( )
) of the wave is expressed as in𝐷𝑖𝑠𝑡𝑎𝑛𝑐𝑒 Equation(ɖ) = where changes in distance (ɖx) of
(15),
are calculated in The Equations
speed (u) (16) ȕɖand
of sound (17).
in air is ~340m/s, the instantaneous(16) distance (dx) b
The
ȕãt time of flight ɖ𝑥 = of the HC-SR04 sensor between the levels of the(16),liqu
and sensor with respect to time of flight (t) 2ɖ𝑥 is calculated as in Equation
= ) of theaswave
ãxcomputed 2ɖx. Therefore, the speed ( (16)changes in distance (
2tank is H and the volumeis expressed as in Equation
of the liquid ȕ =in the tank is v, which are expressed a
(15), where
ɖ𝑥 = ∫ of
∫constant
ȕ
ɖ𝑡 ɖ𝑡 (17)
Z are calculated where inaEquations
k is (16) and (17).
proportionality.
ȕ
Z
The speed (u) of sound ãx = in air is ~340m/s,
ãtwavethe instantaneous distance ɖ𝑥 (dx)
= 2ɖ𝑥
ȕɖbetween
340𝑚𝑠 × (17)
ɖ𝑡
the liquid level
) of the is expressed as in Equation ȕ = where changes
𝑥 =(16),(15), = 170𝑚/𝑠 in distance (
and sensor with respect to time2of flight (t) is calculated as in Equation ɖ𝑡
the2maximum height of
are calculated in Equations (16) and (17).
The speed (u) of soundtankinisair
H and the volume
is ~340 m/s, the of the liquid in the tank
instantaneous distance is v, which
(ãx) betweenare expressed as in Equations
theȕ liquid level (18–20),
∫ ɖ𝑥 = ∫ ɖ𝑙 ɖ𝑡2ɖ𝑥
=ȕɖh − ɖx
where k is a constant of proportionality.
and sensor with respect to time of flight (t) is calculated as in Equation (16), the maximum ɖ𝑥 =
ȕ =height of
The speed (u) 340𝑚𝑠
of sound × air
in ɖ𝑡 is ~340m/s, the instantaneous ɖ𝑡
tank is H and the volume of the liquid in the tank is v, which𝑥=
are expressed = 170𝑚/𝑠
as in Equations ʋȕ= kɖldistance(18)
(18)–(20), (dx) between
where k is a constant of proportionality. and sensor with respect 2
to time of flight (t) is ∫
calculated ɖ𝑥 = as ∫
ȕɖ
inɖ𝑡 Equation (16), the max
tank is H and the volume of the liquid in the tank is ɖ𝑥 =
v, which are expressed as in Eq
(19)
ofɖ𝑙
4. Results andof= h − ɖxin air is ~340m/s, the instantaneous distance
Discussion
where
340ms −1k × is The speed (u)
aãtconstant sound
proportionality. (dx) be
ȕ
x= and sensor with respect to time of flight (t) is∫ calculated
= 170m/s ɖ𝑥 = ∫ ɖ𝑡 as in Equation (16), th
(18)
2tank is4.1. Development
H and the volume ʋ =of kɖl Crypto Hash
of the 340𝑚𝑠
Decentralized × ɖ𝑡Ledgerv, which are(20)
𝑥 =liquid in the tank=is170𝑚/𝑠 expressed as
where The k speed
is This
a (u)
section
constant of sound
of in airthe
illustrates
proportionality. is ~340m/s, 2 the instantaneous
implementation of the developed distance (dx) ha
crypto be
ãl = h − ãx (19)
4. Results and Discussion and sensor with respect to time of flight (t) is
for managing the transaction of petroleum products distribution. The crypto calculated as in Equation (16), th
ɖ𝑙340𝑚𝑠
= h − ɖx× ɖ𝑡
tank
V = kãl is H and the volume
managing transactions data that of the liquid in the tank
𝑥 =occur in oil and(20) is v, which
=gas 170𝑚/𝑠 are expressed
distribution depot as
4.1. Development of Crypto Hash where Decentralized
k is a constant
information Ledger
from of the
proportionality. 2
tanker fleet while in transit to the destination is rem
ʋ = kɖl
4. Results and Discussion This section illustrates the implementation secure database of andthe updated immediately. Table 2 contains detailed ledger analysis
developed 340𝑚𝑠
crypto ɖ𝑙
hash=× hdecentralized
−ɖ𝑡ɖx
sent to the secure database
for managing the transaction of petroleum products distribution. The crypto-system during𝑥 = testing and some = 170𝑚/𝑠
other related
was design for data.
4. Results and Discussion 2
4.1. Development of Cryptomanaging
Hash Decentralized Figure 15 illustrates
data that occur in oil and gas distribution depotʋ and
transactionsLedger the results of the developed
= kɖl secure
the data received blockchain d
distributions: (a)
information from the tanker fleet while in transit to the destination is remotelyHomepage GUI, it is a login interface
ɖ𝑙 = h −transferred
ɖx for
to thetransaction
This section illustrates thedatabase
secure implementation
and updatedof
4.1. Development the developed
of Crypto
registration
immediately. page,
Table
Hash
2crypto
this hash
Decentralized
is the
contains decentralized
detailed
Ledger page that
registrationanalysis of tracking ledger
contained general inform
information
4. Results party and Discussion
in the transaction. (c) Firstdata. layer login
for managing the transaction
sent to of
thepetroleum
secure database products
during distribution.
testing and some The
other crypto-system
related
This section illustrates the implementation of the developed crypto hash decen ʋ
was = interface,
design
kɖl this is a login form
for managing transactions data that15 occur Admin section for user confirmation, thethis contains details information abou
Figure forin
illustrates oil
the and
managing results gasoftransaction
the
4.1. Development
distribution
the developed
of Crypto ofHashdepot
secure
petroleum and
blockchain
products
Decentralized
data received
database
distribution.
Ledger
for oil
The and gas
crypto-system
distributions: authentication. (e) Admin section for managing transporter geolocation, this s
information from the tanker fleet while(a)inHomepage
transit
managing GUI,
4.toResults
the it is a login
destination
transactions
and Discussiondata interface
is remotely
that occur for intransaction
transferred
oil andtogas registration.
secure (b) depot
thedistribution Users and the
information
This section about
illustrates the transaction for admin monitoring in a real-time. (f) G
registration page,
database and updated immediately. Table this is the registration
2 contains
information detailed
from
details,
thepage
this
tanker
page
that fleet
analysis of the
contained
storedthis
while
all
implementation
tracking
the
general information
in information
transit
transaction
to the of the
records
sent developed
concerning
to include
destination
details
is crypto hash
third-
remotely
crypto-has
tra
party in the transaction. secure (c)
for First
managing
database layerand login
the interface,
transaction
updated of
immediately. is a login
petroleum form
products
Table 2Ledger for the transporter.
distribution.
contains detailed analysis (d)
The crypto-s
of track
the secure database during testing and some 4.1.
other Development
related data. of Crypto Hash Decentralized
Admin section for user confirmation, this contains data details information in about new transaction and depot an
Figure 15 illustratesauthentication.
the results of tomanaging
sentdeveloped
the secure transactions
database during testing that occur
and some oilother
and gas
related distribution
data.
(e) the
Admin section This
information
secure
for section
managing
from
blockchain
illustrates
thetransporter
tanker the database
implementation
geolocation,
fleet while in
for
this oil ofand
stored
transit the
to
gas
athedeveloped
remote tracking
destination crypto hash
is remot
Figure 15 illustrates the results of the developed secure blockchain database
distributions: (a) Homepage GUI, it isabout
information a login
the interface
for
transaction
secure for
managing for transaction
database adminthe and registration.
transaction
monitoring
updated in a (b)
of petroleum Table
real-time. Users (f) registration
products
GUI for distribution.
new transaction The crypto-s
distributions: (a) Homepage GUI,immediately.
it is a login interface 2 contains detailed
for transaction analysis
registra of
page, this is the registration page
details, thisthat
pagecontained thegeneral
stored allmanaging
sent transaction
to the information
secure records
transactionsdatabase concerning
details
data include
that
during occur
testing third-party
crypto-hash
inand oilsome code.
and in
gasthe
other distribution
related data. depot an
registration page, this is the registration page that contained general information co
transaction. (c) First layer login interface,party this is information
a login
Figure formfrom
15 for the the
illustrates tanker fleet
transporter.
thelayer
results whileof(d) inAdmin
the transit
developed to the destination
section is remot
in the transaction. (c) First login interface, this issecure
a loginblockchain
form for the data
for user confirmation, this contains details secure
information databaseabout and new updated immediately.
transaction and Table 2 interface
authentication.contains detailed analysis of
Admin section for user confirmation, this contains details information about newre
distributions: (a) Homepage GUI, it is a login for transaction
sent to the secure
registration database during testing andinformation
some other related data.informat
(e) Admin section for managing transporter geolocation,
authentication. (e) page,
this
Admin this
stored is the
section registration
a remote
for managing tracking page that contained
transporter geolocation, general this stored a
party Figure
in the 15 illustrates (c)
transaction. theFirst
results layer of login
the developed
interface, secure
this is blockchain
a login form data
about the transaction for admin monitoring in a real-time.
information about the (f)transaction
GUI for new transaction
for admin monitoring details, in athis real-time. (f) GUI forfon
distributions:
Admin section (a)for Homepage
user GUI, it this
confirmation, is a contains
login interfacedetails for transaction
information about re
page stored all the transaction records details details, this page
include stored all code.
crypto-hash the transaction records details include crypto-hash code.
registration
authentication. page, (e) this
Admin is the registration
section for managing page that contained
transporter general informat
geolocation, this sto
party
informationin the about transaction. (c) First layer
the transaction for admin login monitoring
interface, this in aisreal-time.
a login form (f) GU fo
Admin section for user confirmation, this
details, this page stored all the transaction records details include crypto-hash contains details information about
authentication. (e) Admin section for managing transporter geolocation, this sto
information about the transaction for admin monitoring in a real-time. (f) GU
details, this page stored all the transaction records details include crypto-hash
J 2019, 2 316
J 2019, 2, x 17 of 26

(a)

(b)

(c)

Figure 15. Cont.


J 2019, 2 317
J 2019, 2, x 18 of 26

(d)

(e)

(f)
Figure15.15. Crypto-track
Figure Crypto-track blockchain
blockchaindatabase
database login interface
login and and
interface detaildetail
transaction records.
transaction (a)
records.
(a)Homepage
HomepageGUI; GUI;(b)(b)
Users registration
Users page;page;
registration (c) First
(c)layer
Firstlogin
layerinterface; (d) Admin
login interface; (d)section
Adminforsection
user
forconfirmation; (e) Admin
user confirmation; (e) section
Adminfor managing
section transportertransporter
for managing geolocation;geolocation;
(f) GUI for new transaction
(f) GUI for new
details. details.
transaction
J 2019, 2 318

Table 2. Detailed analysis of tracking information sent to the secure database during testing.

Satellite Liquid
Id Tanker_ID Time Date HDOP Speed Latitude Longitude
Number Level
1 865210031078669 06:15:44 08/10/2018 5 2.19 66 0.35 9.531407 6.451446
2 865210031078669 06:16:17 08/10/2018 6 1.92 89 0.37 9.531438 6.451479
3 865210031078669 06:16:50 08/10/2018 5 1.98 89 0.59 9.531368 6.451441
4 865210031078669 06:17:23 08/10/2018 6 2.03 89 0.44 9.531471 6.451372
5 865210031078669 06:17:56 08/10/2018 5 1.6 97 1.19 9.531489 6.451346
6 865210031078669 07:55:25 08/10/2018 5 2.56 100 1.2 9.530928 6.451571
7 865210031078669 07:55:58 08/10/2018 4 9.51 100 1.81 9.531051 6.451568
8 865210031078669 07:56:32 08/10/2018 5 2.5 100 1.04 9.530858 6.451453
9 865210031078669 07:57:05 08/10/2018 8 2.5 100 1.5 9.530884 6.45146
10 865210031078669 07:57:38 08/10/2018 6 4.99 100 1.98 9.531068 6.451518
11 865210031078669 07:58:11 08/10/2018 5 4.94 100 2.85 9.530917 6.451497
12 865210031078669 07:58:44 08/10/2018 6 2.48 100 1.87 9.530988 6.45146
13 865210031078669 18:20:29 08/10/2018 9 0.81 48 0.2 9.531387 6.451231
14 865210031078669 18:21:02 08/10/2018 9 0.88 0 0.15 9.531398 6.451261
15 865210031078669 18:21:35 08/10/2018 10 0.82 0 1.11 9.53142 6.451247
16 865210031078669 18:22:08 08/10/2018 10 0.78 0 0.2 9.531483 6.451261
17 865210031078669 18:22:41 08/10/2018 9 0.87 0 0.74 9.531522 6.451264
18 865210031078669 18:23:14 08/10/2018 10 0.87 0 2.63 9.531484 6.451257
19 865210031078669 18:23:47 08/10/2018 10 0.98 0 2.57 9.531505 6.451173
20 865210031078669 18:24:20 08/10/2018 10 0.78 0 0.44 9.531486 6.451322
21 865210031078669 18:24:53 08/10/2018 9 0.85 0 0.61 9.531514 6.451376
22 865210031078669 18:25:26 08/10/2018 9 0.85 0 0.61 9.531542 6.451425
23 865210031078669 18:25:59 08/10/2018 5 1.82 0 14.26 9.531661 6.451532
24 865210031078669 18:26:32 08/10/2018 7 2.88 0 8.72 9.531518 6.451762
25 865210031078669 18:27:06 08/10/2018 0 99.99 0 14.93 9.531453 6.452001
26 865210031078669 18:27:40 08/10/2018 9 1.01 0 4.63 9.531857 6.451674
27 865210031078669 18:28:13 08/10/2018 8 0.9 0 0.24 9.531544 6.451401
28 865210031078669 00:37:47 09/12/2018 9 0.98 0 0.74 9.531361 6.451714
29 865210031078669 00:38:34 09/12/2018 9 0.85 0 0.11 9.531422 6.451569
30 865210031078669 00:39:21 09/12/2018 9 0.88 0 0.06 9.531407 6.451598
31 865210031078669 00:40:08 09/12/2018 9 0.8 0 0.33 9.53139 6.451566
32 865210031078669 00:40:55 09/12/2018 11 0.76 0 0.17 9.531413 6.451585
33 865210031078669 00:41:42 09/12/2018 9 0.99 0 0.48 9.531431 6.45158
34 865210031078669 00:42:29 09/12/2018 10 0.88 0 1 9.531427 6.4516
35 865210031078669 00:43:16 09/12/2018 10 0.92 0 0.63 9.531411 6.45163
36 865210031078669 00:44:03 09/12/2018 9 0.92 0 1.98 9.531393 6.451665

4.2. Encryption and Decryption Algorithm Testing and Results Using WAVE
A Waveform Audio File Format (WAVE) is an application of Resource Interchange File Format
(RIFF) that stores audio bit streams of signal in “chunks”. This application (WAVE) encodes the sound
in Linear Pulse Code Modulation (LPCM). To test for the encryption and decryption processes of
the proposed secure hash algorithm-based blockchain technology in the WAVE bitstream format is
depicted in Figure 16. The application interface program was developed using C-Sharp, which is
capable of converting the data stream into the audio signal wave and performing the encryption and
decryption algorithms. The stream of Waveform Audio File Format (WAVE) file was used to encrypt
and decrypt the data. MATLAB software (2015a, The MathWorks, Inc., Natick, MA, USA) is used to
perform matrix manipulation for the encryption and decryption of sound files into and from image
files. This method is known as data compression technique. The novel method uses encryption and
decryption in ‘drum.wav’, which is a sound file in image formats such as PNG, TIF, and JPEG. The
J 2019, 2 319

sound file is fetched and the values corresponding to the sample range are put in a column matrix,
which is arranged in a two-dimensional matrix having “double” as the data type. The “imwrite”
function of MATLAB is used and defined in the matrix class as double, which inserts a graphic file
having
J 2019, 2, a
x dynamic range from 0 to 1. 20 of 26

Figure 16.
Figure 16. Graphic
Graphic user
user interface of cryptography
interface of cryptography algorithm.
algorithm.

Encryption algorithm
Phase 1: Encryption of algorithm
Step 1: Generate the ASCII value of each plaintext.
Step 2: Sum the ASCII value of all character.
Step 3: Mod the value of 128 for the total number of keys consider as ASCII value.
Step 4: Corresponding ASCII value is considered as a key.
key.
Step 5: Apply this expression in Equations (8) and (9) to generate cipher
cipher text.
text.
where, E is encryption,
encryption, PP is
is plaintext
plaintext and
and K
K is
is key.
key.

K𝐾==((𝐶 +C𝐶 +
C1 + 2 . . 𝐶Cn)%256
+ .⋯ )%256 (21)
(21)

𝐸== ((
((𝑃 +K𝐾)%256) (22)
E P+ )%256) (22)
Step 6: The cipher text value is used to perform the transposition.
Step 6: The cipher text value is used to perform the transposition.
Phase 2: Encryption of auto key
Phase 2: Encryption of auto key
Step 7: Use the cipher text value of the substitution method as input of the auto text key
Step 7: Use the cipher text value of the substitution method as input of the auto text key
Step 8: Here we considered key value as 3.
Step 8: Here we considered key value as 3.
Step 9: Perform Auto text key to generate the final cipher text.
Step 9: Perform Auto text key to generate the final cipher text.
Decryption algorithm
Decryption algorithm
Decryption of wave cipher
Decryption of wave cipher
Step 1: Perform Rail Fence Cipher decryption process using the key value of 3.
Step 1: Perform Rail Fence Cipher decryption process using the key value of 3.
Step 2: Generate .wav cipher text by substitution.
Step 2: Generate .wav cipher text by substitution.
Step 3: Perform step2 as input value of the .wav cipher method.
Step 3: Perform step2 as input value of the .wav cipher method.
Step 4: Here the same encryption key used.
Step 4: Here the same encryption key used.
Step 5: Use this expression in Equation (10)
Step 5: Use this expression in Equation (10)
𝐷 = ((𝑃 − 𝐾)%256) (23)
D = ((P − K)%256) (23)
Step 6: Generate the ASCII character of the corresponding decimal value as your original text
Step 6: Generate
It is interesting tothe ASCII
note character
that the purposeof of
the corresponding
encryption decimal
is to distort thevalue as your
original original
signal text
as illustrated
fromItthe behavior of
is interesting the graph,
to note that thewhere more
purpose noise is introduced
of encryption is to distorttothe
theoriginal
system.signal
The as
result of the
illustrated
(plaintext)t stream character is converted into a .wav audio signal as shown in Figure
from the behavior of the graph, where more noise is introduced to the system. The result of the 17, and for
hashing, a noise signal was introduced, which is added to the original plaintext as depicted in Figure
18. After encryption algorithm, the data is retrieved from the image file and compared with the
original wave file to show the variation in encrypted string character as shown in Figure 19.
J 2019, 2 320

(plaintext)t stream character is converted into a .wav audio signal as shown in Figure 17, and for
hashing, a noise signal was introduced, which is added to the original plaintext as depicted in Figure 18.
After encryption
J 2019, 2, x algorithm, the data is retrieved from the image file and compared with the21original
of 26
waveJ 2019,
file2,to
x show the variation in encrypted string character as shown in Figure 19. 21 of 26

Figure 17. Encipher .wav audio signal.


Figure 17.Encipher
Figure17. Encipher .wav
.wav audio signal.
audio signal.

Figure 18.Noise
Figure18. Noiseaudio
audio signal
signal generation forencoding
generation for encoding(salt).
(salt).
Figure 18. Noise audio signal generation for encoding (salt).
J 2019, 2, x 22 of 26
J 2019, 2 321
J 2019, 2, x 22 of 26

Figure 19. Encryption .wav audio generation signal.


Figure 19.Encryption
Figure19. Encryption .wav audio generation
.wav audio generationsignal.
signal.

4.3. Testing
4.3. Testingand
andResults
ResultsofofImplemented
ImplementedAutomobile
AutomobileBased
BasedTelematics
Telematics
4.3. Testing and Results of Implemented Automobile Based Telematics
The automobile
The automobile tracking
tracking system-based
system-based telematics
telematics approach
approach for
for the
the petroleum
petroleum distribution
distribution isis
The automobile tracking system-based telematics approach for the petroleum distribution is
developed,implemented,
developed, implemented,and and tested
tested within
within the Federal
the Federal University
University of Technology,
of Technology, Minna. Minna. This
This system
developed, implemented, and tested within the Federal University of Technology, Minna. This
issystem is configured
configured and connected
and connected logically
logically with with hash
the secure the secure hash database
blockchain blockchainfordatabase for remote
remote information
system is configured and connected logically with the secure hash blockchain database for remote
information
storage. The storage.
Google The
Maps Google
result Maps
of the result of the
telematics-based telematics-based
automobile automobile
tracking system
information storage. The Google Maps result of the telematics-based automobile tracking system tracking
is system
illustrated is inis
illustrated
Figure
illustratedininFigure
20, and the 20,
20,and
results
Figure of the
the results
automobile
and of automobile
resultsgeolocation
of automobile geolocation
tracking tracking
based tracking
geolocation on based
the longitude
based ononthethe
and longitude
latitude
longitude are
and latitude
evaluated by are evaluated
comparing the by comparing
actual the
geolocation actual geolocation
results with the results
GPS-based with the GPS-based
telematics device
and latitude are evaluated by comparing the actual geolocation results with the GPS-based telematics telematics
presented
device
in Table
devicepresented
3.presentedininTable
Table3.3.

Figure 20. Google Maps geolocation tracking.


Figure20.
Figure 20.Google
GoogleMaps
Mapsgeolocation
geolocationtracking.
tracking.
J 2019, 2, x 23 of 26
J 2019, 2 322

Table 3. Performance evaluation of geolocation tracking in FUTMinna.


Table
Actual 3. Performance
Coordinate Values evaluation of geolocation tracking GPS in FUTMinna.
Coordinate Values
Latitudinal
Actual Coordinate
Longitudinal
Values
Latitudinal GPS
Longitudinal
Coordinate Values
No of Satellite
Location (Address)
Coordinate Coordinate Coordinate Coordinate Captured
Latitudinal Longitudinal Latitudinal Longitudinal No of Satellite
ICTLocation
Complex (Address) 6.451576
Coordinate 9.531347
Coordinate 6.451829
Coordinate 9.531222
Coordinate Captured4
Engineering Complex 6.449162 9.533510 6.449241 9.533539 8
ICT Complex 6.451576 9.531347 6.451829 9.531222 4
E-exam CenterComplex 6.449688
Engineering 6.449162 9.536088
9.533510 6.449667
6.449241 9.536154
9.533539 8 9
ITS Center
E-exam Center 6.4523256.449688 9.535278
9.536088 6.452507
6.449667 9.535301
9.536154 9 5
Agric Complex
ITS Center 6.4518626.452325 9.533240
9.535278 6.451966
6.452507 9.533134
9.535301 5 7
Senate Agric Complex
Building 6.4527906.451862 9.533240
9.534655 6.451966
6.452748 9.533134
9.52748 7 6
Senate Building 6.452790 9.534655 6.452748 9.52748 6

4.4. Performance Evaluation Testing of the Crypto Hash System


4.4. Performance Evaluation Testing of the Crypto Hash System
The crypto hash database system was developed and performance evaluation was carried out
in theThe crypto
Mozilla hash
web databasetool.
developer systemThewas
systemdeveloped and performance
performance metrics wasevaluation
evaluated wasbasecarried
on the out in
speed
the Mozilla web developer tool. The system performance metrics was evaluated
of the web application developed which includes file type, size, time, and the transfer speed as base on the speed of
the web application
illustrated in Figuredeveloped
21. The filewhich includesrate
transmission file type, size, time,
is a function of and the transfer
the type speedtransferred
of file being as illustrated
in
in Figure 21. The file transmission rate is a function of the type of file
the system, which generates the result given of the primed and empty cache. The empty being transferred in the system,
cache
which generates
scenario the result
occurs when the given
browserof the primed
makes the and
firstempty
request cache.
to theThe empty
page cache
using scenario
a HTTP occurs
request, when
and the
the browser makes the first request to the page using a HTTP request, and
Primed cache instance is when the browser has a cached version of the page. In a Primed Cachethe Primed cache instance is
when the browser has a cached version of the page. In a Primed Cache instance,
instance, the components are already in the cache, thereby decreasing the number of HTTP requests the components are
already in the cache,
and the weight of the thereby
page. The decreasing
data files the numberinofthis
considered HTTP requests
platform are and
CSS,the weight
HTML, JS, of
XHRtheHTTP
page.
The data files considered
Request, and images. in this platform are CSS, HTML, JS, XHR HTTP Request, and images.

Figure 21. Performance


Figure 21. Performance evaluation
evaluation results
results of
of both
both backend and frontend
backend and frontend system.
system.
J 2019, 2 323

5. Conclusions
This research work presents a novel secured decentralized ledger in a database that manages
petroleum product distribution records using a secure hash algorithm-based blockchain. Also,
a telematics approach for the geolocation tracking and monitoring of petroleum volume level was
proposed, which is connected to the remote database and updated with real-time information
dynamically. The implementation of this permissioned blockchain technique using SHA-1 computation
techniques ensures hashing of every transaction generated based on the previous transaction and
has proven efficiency, since it is not vulnerable to individual tampering of the record, but it gives
access to any changes or updates when participants in the chain have over 75% agreement; otherwise
permission is denied. The details of this transaction are stored on the distributed ledger where every
participant in the chain can access the data or information transparently and provide security with
immune to tampering. Further research can be focused on securing military information, banking
systems, and ballot voting systems (BVS) using decentralized distributed ledger and crypto hashing
blockchain technology for data management and unified security. Also, the future work will consider
the analysis based on the quality of oil and gas product information acquired from molecular markers
(fuel marker program).

Author Contributions: Investigation, L.A.A.; Methodology, L.A.A., J.A., and L.K.; Software, L.A.A. and L.K.;
Supervision, J.A. and E.A.A.; Writing—original draft, L.A.A. and L.K.; Writing—review & editing, L.A.A., J.A.,
and E.A.A.
Funding: This research received no external funding.
Acknowledgments: The authors are grateful to the management of Federal University of Technology Minna
Nigeria, School of Engineering, and Engineering Technology, Department of Computer Engineering, for their
technical and financial support.
Conflicts of Interest: The authors declare no conflicts of interest.

References
1. Nwoba, O.E.; Abah, E.O. Impact of crude oil revenue (cor) on economic growth in nigeria (1960–2010). IOSR
J. Hum. Soc. Sci. 2017, 22, 85–99.
2. Özturkoglu, Ö.; Lawal, O. The integrated network model of pipeline, sea and road distribution of petroleum
product. Int. J. Optim. Control Theor. Appl. 2016, 6, 151–165. [CrossRef]
3. Aminu, S.A.; Olawore, O.P. Empirical investigation of challenges of distribution of premium motor spirit
(PMS) in federal capital territory (Fct), abuja and environs, Nigeria. Int. J. Manag. Sci. Humanit. 2014, 2,
17–59.
4. Ajao, L.A.; Adedokun, E.A.; Nwishieyi, C.P.; Adegboye, M.A.; Agajo, J.; Kolo, J.G. An anti-theft oil pipeline
vandalism detection. Int. J. Eng. Sci. Appl. 2018, 2, 41–46.
5. Adegboye, M.A.; Fung, W.-K.; Karnik, A. Recent advances in pipeline monitoring and oil leakage detection
technologies: principles and approaches. Sensors 2019, 19, 2548. [CrossRef] [PubMed]
6. Basu, S.; Waymire, G.B. Record-keeping and human evolution. Account. Horiz. 2006, 20, 201–229. [CrossRef]
7. Bacina, M.; Partner, P.; Alderman, P. The Era of Digital Trust. Available online: https://www.legaler.com/.../
Blockchain-for-Lawyers-eBook.pdf (accessed on 10 December 2018).
8. Diego, R.; Giovanni, S. Beyond bitcoin: A critical look at blockchain-based systems. Cryptography 2017, 1, 15.
9. Lavanya, B.M. Blockchain technology beyond bitcoin: An overview. Int. J. Comput. Sci. Mob. Appl. 2018, 6,
76–80.
10. Ajao, L.A.; Agajo, J.; Olaniyi, O.M.; Jibril, I.Z.; Sebiotimo, A.E. A Secure Tracking Automobile System for Oil
and Gas Distribution using Telematics and Blockchain Techniques. J. Electr. Comput. Eng. Innov. 2019, 7,
171–177.
11. Marr, B. A Very Brief History of Blockchain Technology Everyone Should Read; Forbes: New York, NY, USA, 2018.
12. Vestergaard, C. Better than a floppy the potential of distributed ledger technology for nuclear safeguards
information management, innovative approaches to peace and security from the stanley foundation. Anal.
Brief. 2018, 1, 1–8.
J 2019, 2 324

13. Hardjono, T.; Lipton, A.; Pentland, A. Towards a Design Philosophy for Interoperable Blockchain System; Springer:
Berlin, Germany, 2018; pp. 1–27.
14. Derhab, A.; Guerroumi, M.; Maglaras, L.; Ferrag, M.A.; Mukherjee, M.; Khan, F.A. BLOSTER:
Blockchain-based system for detection of fraudulent rules in software-defined networks. In Proceedings of
the 6th International Symposium for ICS & SCADA Cyber Security Research 2019, Athens, Greece, 10–12
September 2019; pp. 1–3.
15. Ferrag, M.A.; Derdour, M.; Mukherjee, M.; Derhab, A.; Maglaras, L.; Janicke, H. Blockchain technologies for
the internet of things: Research issues and challenges. IEEE Int. Things J. 2019, 6, 2188–2204. [CrossRef]
16. Kogias, E.K.; Jovanovic, P.; Gailly, N.; Khoffi, L.; Gasser, L.; Ford, B. Enhancing bitcoin security and
performance with strong consistency via collective signing. In Proceedings of the 25th USENIX Security
Symposium (USENIX Security 16), Austin, TX, USA, 10–12 August 2016; pp. 279–296.
17. Tschorsch, F.; Scheuermann, B. Bitcoin and beyond: A technical survey on decentralized digital currencies.
IEEE Commun. Surv. Tutor. 2016, 18, 2084–2123. [CrossRef]
18. Chima, C.M.; Hills, D. Supply-chain management issues in the oil and gas industry. J. Bus. Econ. Res. 2007, 5,
27–36. [CrossRef]
19. Kshetri, N. Can blockchain strengthen the internet of things. IT Prof. 2017, 19, 68–72. [CrossRef]
20. Ekblaw, A.; Azaria, A.; Halamka, J.D.; Lippman, A. A case study for blockchain in healthcare: Medrec
prototype for electronic health records and medical research data. Proc. IEEE Open Big Data Conf. 2016, 13,
1–13.
21. Tian, F. An agri-food supply chain traceability system for China based on RFID & blockchain technology,
In Service Systems and Service Management (ICSSSM). In Proceedings of the 13th IEEE International
Conference, Kunming, China, 24–26 June 2016; pp. 1–6.
22. Micheal, C. What is Telematics, Geotab Inc., 2018. Available online: https://www.geotab.com/blog/what-is-
telematics/ (accessed on 8 January 2018).
23. Handel, P.; Skog, I.; Wahlstrom, J.; Bonawiede, F.; Welch, R.; Ohlsson, J.; Ohlsson, M. Insurance telematics:
Opportunities and challenges with the smartphone solution. Int. Trans. Syst. Manag. IEEE 2014, 6, 57–70.
[CrossRef]
24. García, C.R.; Quesada-Arencibia, A.; Cristóbal, T.; Padrón, G.; Alayón, F. Systematic development of
intelligent systems for public road transport. Sensors 2016, 16, 1104. [CrossRef]
25. Winter, A.; Baldi, S. Real-Life implementation of a GPS-Based path-following system for an autonomous
vehicle. Sensors 2018, 18, 3940. [CrossRef]
26. Awan, M. Compensation of Low Performance Steering System Using Torque Vectoring. Ph.D. Thesis,
Cranfield University, Bedfordshire, UK, 2012.
27. Isermann, R. Diagnosis methods for electronic controlled vehicles. Veh. Syst. Dyn. 2001, 36, 77–117.
[CrossRef]
28. Jang, J.A.; Kim, H.S.; Cho, H.B. Smart roadside system for driver assistance and safety warnings: Framework
and applications. Sensors 2011, 11, 7420–7436. [CrossRef]
29. Khatwani, S. Different Types of Blockchains in the Market and Why We Need Them. Available online:
https://coinsutra.com/different-types-blockchains/ (accessed on 15 September 2018).
30. DataFlair Team, Blockchain Tutorial. 2018. Available online: https://data-flair.training/blogs/bitcoin-and-
cryptocurrency-technologies (accessed on 14 September 2018).
31. Kumar, S.; Gupta, P. A comparative analysis of sha and MD5 algorithm. Int. J. Comput. Sci. Inf. Technol. 2014,
5, 4492–4495.
32. Gligoroski, D.; Markovski, S.; Knapskog, S.J. A secure hash algorithm with only 8 folded sha-1 steps. Int. J.
194 Comput. Sci. Netw. Secur. 2006, 6, 194–205.
33. Manuel, S. Classification and generation of disturbance vectors for collision attacks against SHA-1. Des.
Codes Cryptogr. 2011, 59, 247–263. [CrossRef]
34. White, B.; Kreuz, T.; Simons, S. Midstream. In Compression Machinery for Oil and Gas; Klaus, B., Rainer, K.,
Eds.; Gulf Professional Publishing: Houston, TX, USA, 2019; pp. 387–400.
35. Adrian, A.; Cendana, M.; Dian, S.; Permana, H. Diffie-Hellman Key Exchange Modification using Blowfish
Algorithm to Prevent Logjam Attack. J. Telecommun. Electron. Comput. Eng. 2018, 10, 1–7.
J 2019, 2 325

36. Oluwade, O.R.; Olaniyi, O.M.; Abdulsalam, Y.S.; Ajao, L.A. Entropy management technique in lightweight
cryptographically secured smart home. In Proceedings of the 12th International Multi-Conference on ICT
Applications (AICTTRA, 2018), Ile-Ife, Nigeria, 15 September 2018; pp. 258–265.
37. Hulsing, A. Digital signature schemes and the random oracle model. Technische Universiteit Eindhoven.
Available online: https://www.win.tue.nl/applied_crypto/2016/20161115_ROM_Signatures.pdf (accessed on
23 September 2016).
38. Sene, I.; Ciss, A.A.; Niang, O. I2PA: An Efficient ABC for IoT. Cryptography 2019, 3, 16. [CrossRef]
39. Hülsing, A. Digital Signature Schemes and the Random Oracle Model. Available online: https://www.win.
tue.nl/applied_crypto/2016/20161115_ROM_Signatures.pdf. (accessed on 23 September 2016).
40. Liu, J.K.; Baek, J.; Zhou, J.; Yang, Y.; Wong, J.W. Efficient online/offline identity-based signature for wireless
sensor network. Int. J. Inf. Secur. 2010, 9, 287–296. [CrossRef]

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access
article distributed under the terms and conditions of the Creative Commons Attribution
(CC BY) license (http://creativecommons.org/licenses/by/4.0/).

You might also like