BCT - Unit-2
BCT - Unit-2
1
Components of Distributed Computing
Availability
Your distributed computing system will not crash if one of the computers goes
down. The design shows fault tolerance because it can continue to operate even
if individual computers fail.
Consistency
Computers in a distributed system share information and duplicate data between
them, but the system automatically manages data consistency across all the
different computers. Thus, you get the benefit of fault tolerance without
2
compromising data consistency.
Transparency
Distributed computing systems provide logical separation between the user and
the physical devices. You can interact with the system as if it is a single
computer without worrying about the setup and configuration of individual
machines. You can have different hardware, middleware, software, and
operating systems that work together to make your system function smoothly.
Efficiency
Distributed systems offer faster performance with optimum resource use of the
underlying hardware. As a result, you can manage any workload without
worrying about system failure due to volume spikes or underuse of expensive
hardware.
Disadvantages of Distributed Computing :
Complexity
Distributed systems can be more complex than centralized systems, as they
involve multiple devices or systems that need to be coordinated and managed.
Security
It can be more challenging to secure a distributed system, as security measures
must be implemented on each device or system to ensure the security of the
entire system.
Performance
Distributed systems may not offer the same level of performance as centralized
systems, as processing and data storage is distributed across multiple devices or
systems.
Distributed Computing use cases:
Distributed computing is everywhere today. Mobile and web applications are
examples of distributed computing because several machines work together in
the backend for the application to give you the correct information.
The Following distributed Computing applications are:
1. Healthcare and life sciences
Healthcare and life sciences use distributed computing to model and simulate
complex life science data. Image analysis, medical drug research, and gene
structure analysis all become faster with distributed systems.
2. Engineering research
Engineers can simulate complex physics and mechanics concepts on distributed
systems. They use this research to improve product design, build complex
structures, and design faster vehicles.
3. Financial services
Financial services firms use distributed systems to perform high-speed
economic simulations that assess portfolio risks, predict market movements, and
support financial decision-making.
3
4. Energy and environment
Energy companies need to analyze large volumes of data to improve operations
and transition to sustainable and climate-friendly solutions. They use distributed
systems to analyze high-volume data streams from a vast network of sensors
and other intelligent devices.
Distributed Computing Architecture
Client-Server Architecture
Client-server is the most common method of software organization on a
distributed system.
The functions are separated into two categories: clients and servers.
Client
An Entity which communicates with the server in order to complete their task.
They are usually connected to the server on the Internet.
Server
An Entity that is responsible to offer the services to the client, server provides
services like data processing, storage, deploying applications, etc.
4
High-performing distributed systems often use tight coupling. Fast local area
networks typically connect several computers, which creates a cluster. In cluster
computing, each computer is setto perform the same task. Central control
systems, called clustering middleware, control and schedule the tasks and
coordinate communication between the different computers.
Issues in Distributed Computing
● The lack of global knowledge
● Naming
● Scalability
● Compatibility
● Process synchronization (requires global knowledge)
● Resource management (requires global knowledge)
● Security
● Fault tolerance
● Error recovery
Naming
● Named objects: computers, users, files, printers, services
● Namespace must be large
● Unique (or at least unambiguous) names are needed
● Logical to physical mapping needed
Scalability
● How large is the system designed for?
● How does increasing number of hosts affect overhead?
● broadcasting primitives, directories stored at every computer -- these
design options will not work for large systems.
Compatibility
● Binary level: same architecture (object code)
● Execution level: same source code can be compiled and executed (source
code).
● Protocol level: only requires all system components to support a common
set of protocols.
5
Process synchronization
● Test-and-set instruction won't work.
● Need all new synchronization mechanisms for distributed systems.
Resource Management
● Data migration: data are brought to the location that needs them.
o Distributed filesystem (file migration)
o Distributed shared memory (page migration)
● Computation migration: the computation migrates to another location.
Security
● Authetication: guaranteeing that an entity is what it claims to be.
● Authorization: deciding what privileges an entity has and making only
those privileges available.
Atomic Broadcast
Atomic Broadcast explicitly talk about sending multiple messages in an
agreed-upon order. Atomic broadcasts are an important distributed computing
primitive.
In fault-tolerant distributed computing, an atomic broadcast or total order
broadcast is a broadcast where all correct processes in a system of multiple
processes receive the same set of messages in the same order; that is, the
same sequence of messages.
Atomic Broadcast is a communication primitive that ensures total ordering
of messages in distributed systems.
This primitive is particularly useful to maintain the consistency of replicated
information despite concurrency and failures.
6
Atomic broadcast is a group communication primitive to order messages
across a set of distributed processes.
1. Atomicity
2. Order
3. Termination.
7
Consensus
It refers to an agreement on any subject by a group of participants.
Fundamental problem in distributed computing and multi-agent systems is to
achieve overall system reliability in the presence of a number of faulty
processes.
This often requires coordinating processes to reach consensus, or agree on some
data value that is needed during computation.
Applications of consensus include agreeing on what transactions to commit to a
database in which order, state machine replication, and atomic broadcasts.
Consensus means achieving a state of a decision on which all network
participants agree.
8
3. PageRank
4. Smart power grids
5. State Estimation
A Consensusproperties :
1.Termination
2. Integrity
If all the correct processes proposed the same value , then any correct
process must decide .
3. Agreement
9
a PoA-based blockchain network is secured by a limited number of validating
nodes. These nodes are trusted parties that are arbitrarily chosen and pre-
approved to verify blocks and transactions.
10
value that must be agreed upon, and all nonfaulty processes must agree on
that value.
● The Byzantine army’s position can be seen in computer networks.
● The divisions can be viewed as computer nodes in the network, and the
commanders as programs running a ledger that records transactions and
events in the order that they occur.
● The ledgers are the same for all systems, and if any of them is changed, the
other ledgers are updated as well if the changes are shown to be true, so all
distributed ledgers should be in agreement.
Types of Byzantine Failures:
There are two categories of failures that are considered. One is fail-stop(in
which the node fails and stops operating) and other is arbitrary-node
failure. Some of the arbitrary node failures are given below :
● Failure to return a result
● Respond with an incorrect result
● Respond with a deliberately misleading result
● Respond with a different result to different parts of the system
Hash Functions
● Hash functions are mathematical functions that transform or "map" a
given set of data into a bit string of fixed size, also known as the "hash
value."
● Hash functions are used in cryptography and have variable levels of
complexity and difficulty.
● Hash functions are used for cryptocurrency, password security, and
message security.
● Hash functions are extremely useful and appear in almost all information
security applications.
● A hash function is a mathematical function that converts a numerical
input value into another compressed numerical value. The input to the
hash function is of arbitrary length but output is always of fixed length.
11
Applications of Hash Functions :
There are two direct applications of hash function based on its cryptographic
properties :
1.Password Storage
● Hash functions provide protection to password storage.
● The Password file consists of a table of pairs which are in the form (user id,
h(P)).
2. Efficiency of Operation
● Generally for any hash function h with input x, computation of h(x) is a fast
operation.
● Computationally hash functions are much faster than a symmetric
encryption.
12
● This property means it should be hard to find two different inputs of any
length that result in the same hash. This property is also referred to as
collision free hash function.
1. Division Method.
2. Mid Square Method.
3. Folding Method.
4. Multiplication Method.
13
hacker cannot get access to the user's passwords as cryptographic hash
functions are pre-image resistant.
● Data integrity: Take a hash of all our files before leaving a system and
then recompute the hash to check if the files have been changed or not.
Bitcoin puzzles
Bitcoin uses the transaction data, and ‘chains’ the previous block’s hash value
as a starting input for the next block’s. Miners then race to tack on massive
random numbers until they find one that produces a hash that matches a specific
pattern with a certain level of difficulty.
Computational Puzzle
A computational puzzle is a moderately hard problem, the answer of which
can be computed within a reasonable time and verified efficiently.
14
password know the input that generated the hash.
Collision Resistance
Hashing mechanisms resistant to collisions is a challenge primarily related to
the design of the hashing function.
Weak collision resistance is: given an input X and a hashing function H(), it is
very difficult to find another input X’ on which H(X) = H(X’).
strong collision resistance is: given a hashing function H() and two arbitrary
inputs X and Y, there exists an absolute minimum chance of H(X) being equal
15
to H(Y).
Digital Signatures
● A Digital Signature is a mathematical technique used to validate the
authenticity and integrity of a message, software or digital document.
16
1. Public key
2. Private key
The sender’s and the receiver’s computers must have this private key installed
for them to have access to the important data or to connect on the same network.
Essentially, it is a message written in coded language that only a computer
system has a private key. Hence it is incredibly more secure.
17
● A Digital Signature, which should not be confused with a digital certificate,
is a mathematical technique used to validate the authenticity and
integrity of a message, software or a digital document.
● A Digital Signature, as opposed to a traditional signature, is not a name
but two “keys” or sequences of separated characters. It applies
cryptographic measures to the content of a message or document in order to
show the following to the message’s recipient:
● That the sender of the message is real (authentication);
● That the sender cannot deny that they sent the message (non-repudiation);
● That the message has not been altered since it was sent (integrity).
18
A Digital Signature scheme typically consists of Three Algorithms:
The digital signature, which uses public-key cryptography, is said to be the most
important and useful way to get information security among all the options of
cryptographic primitives.
They are the most secure method of electronic signatures and are extremely
trustworthy, which makes them the best option for legal contracts and
documents. It is extremely difficult to forge or manipulate the information
present in the digital signature
19
Applications of Digital Signatures
20
Objectives of Cryptography
Cryptography concerns with the following Four objectives:
Confidentiality: the information cannot be understood by anyone for whom it
was unintended.
Integrity: the information cannot be altered in storage or transit between sender
and intended receiver without the alteration being detected.
Non-repudiation: the creator/sender of the information cannot deny at a later
stage his or her intentions in the creation or transmission of the information.
Authentication: the sender and receiver can confirm each other's identity and
the origin/destination of the information.
Types of Cryptography
1. Single-key or Symmetric-key Cryptography.
2. Public-key or Asymmetric-key Cryptography.
1. Single-key or Symmetric-key Cryptography :
Symmetric cryptography is based on the use of just one key is used to both
Encrypt and Decrypt the messages ( only Private Key or Secret Key )
2. Public-key or Asymmetric-key Cryptography :
Asymmetric cryptography, also known as public-key cryptography, Here Two
keys are used to Encrypt and Decrypt the messages (Both Private and Public
Key)
Single-key or Symmetric-key Cryptography
21
Public-key or Asymmetric-key Cryptography
22
associated proof for any input value.
A verifiable random function is a cryptographic function that takes a series of
inputs, computes them, and produces a pseudorandom output, along with a
proof of authenticity that can be verified by anyone.
How It Works
They execute a function (the VRF) that takes as input the following:
● The "secret key", a key specifically made for these die rolls.
● An epoch randomness value, which is the hash of VRF values from the
blocks in the epoch before last (N-2), so past randomness affects the
current pending randomness (N).
● The slot number.
Applications of VRF
23
Zero-Knowledge System
In cryptography, aZero-Knowledge System or Zero-Knowledge Proofis a
method by which one party can prove to another party that a given statement is
true while the prover avoids conveying any additional information apart from
the fact that the statement is indeed true.
Why We Need Zero-Knowledge Proofs?
Zero-knowledge proofs represented a breakthrough in applied cryptography, as
they promised to improve security of information for individuals.
24
Properties of Zero Knowledge System
1. Zero-Knowledge –
If the statement is true, the verifier will not know that the statement or was.
Here statement can be an absolute value or an algorithm.
2. Completeness –
If the statement is true then an honest verifier can be convinced eventually.
3. Soundness –
If the prover is dishonest, they can’t convince the verifier of the soundness of
the proof.
25
Algorithms in Zero Knowledge System
The Following Three Algorithms are :
1. Key Generator
A key generator establishes a parameter to generate a key pair.
2. Prover
The prover gets proving key and needs to prove his knowledge. He will receive
and verify the private key and then shall forward the statement.
3. Verifier
The verifier will get the input from the prover and will validate the statement’s
authenticity.
26
1. Anonymous Verifiable Voting.
2. Private Exchange and Settlement of Digital Assets.
3. Privacy on Public Blockchains.
27