SlideShare a Scribd company logo
1 of 100
Download to read offline
DEFCON BlockVillage
VDF for Preventing DoS / DDoS Attacks on Ethereum 2.0
Agenda
● Who are We!
● Attack Vectors on Proof of Work
● DDoS on Ethereum
● Attack Vectors on Proof of Stake
● Ethereum 2.0 Overview
● Ethereum 2.0 Audit Findings
● DDoS on Ethereum 2.0
● Randomness on Ethereum 2.0
● Verifiable Delay Functions
● VDF and DDoS Prevention
● Our Approach
● Questions
● Appendix
Who are we!
● Penetration Tester
● Blockchain Security Researcher
● Founder @ RazzorSec
● YouTuber @ Razzor Sharp
● Cybersec Enthusiast
Tejaswa Rastogi
Twitter @razzor_tweet
Who are we!
● Founder of EPIC Knowledge Society
● Chief Scientist, Fusion Ledger
● Ambassador - Algorand, Aeternity
● Director - Tezos India Foundation
● MVP - Hedera Hashgraph
● Global Leader - XX Collective
● Programmer and Poet
● Blockchain Security Auditor
● Quantum Algorithm Architect
● Post Quantum Cryptography Researcher
Gokul Alex
GitHub - @gokulsan
Twitter - @gokulgaze
Reddit - @gokulbalex
Attack Vectors on Proof of Work
Attack Vectors on Proof of Work
● Distributed denial of service (DDoS)
● Transaction malleability attack
● Timejacking
● Routing attack
● Sybil attack
● Eclipse attack
https://www.apriorit.com/dev-blog/578-blockchain-attack-vectors
Some Other PoW Attacks
*User wallet attacks:*
● Phishing
● Dictionary attacks
● Vulnerable signatures
● Flawed key generation
● Attacks on cold wallets
● Attacks on hot wallets
https://www.apriorit.com/dev-blog/578-blockchain-attack-vectors
Some Other PoW Attacks
*Smart contract attacks:*
● Vulnerabilities in contract source code
● Vulnerabilities in virtual machines
*Transaction verification mechanism attacks:*
● Finney attack
● Race attack
● Vector76
● Alternative history attack
● 51% or majority attack
https://www.apriorit.com/dev-blog/578-blockchain-attack-vectors
Some Other PoW Attacks
*Mining pool attacks:*
● Selfish mining
● Fork-after-withhold
https://www.apriorit.com/dev-blog/578-blockchain-attack-vectors
DDoS on Ethereum
Invalid blocks on Parity Client
Some Parity Ethereum nodes lost sync with the network because of the following
incident - you send to a Parity node a block with invalid transactions, but valid
header (borrowed from another block). The node will mark the block header as
invalid and ban this block header forever but the header is still valid.
Vulnerability in Parity Nodes
In May, global hacking research collective SRLabs claimed that only two-thirds of
the Ethereum client software that ran on Ethereum nodes had been patched
against a critical security flaw discovered earlier this year. The data reportedly
indicated that unpatched Parity nodes comprised 15% of all scanned nodes —
implying that 15% of all Ethereum nodes were vulnerable to a potential 51% attack.
Underpriced DDoS attacks - EXTCODESIZE
Underpriced opcode vulnerability is due to the improper gas cost of EVM’s
EXTCODESIZE opcode.
Prior to the EIP 150 hard fork, the EXTCODESIZE opcode only charged 20 gas for
reading a contract bytecode from disk and then deriving its length.
As a consequence, the attacker can repeatedly send transactions to invoke a
deployed smart contract with many EXTCODESIZE opcodes to cause a 2 - 3x
slower block creation rate
Paper - A Survey on Ethereum Systems Security: Vulnerabilities, Attacks and Defenses by Huashan Chen, Marcus Pendleton,
Laurent Njilla, and Shouhuai Xu
Underpriced DDoS attacks - SUICIDE
This attack exploited the improper gas cost of EVM’s SUICIDE opcode(renamed to
SELFDESTRUCT after EIP6) and the empty account in the State trie Vulnerability.
Th opcode is meant to remove a deployed smart contract and send the remaining ether to the
account designated by the caller. When the target doesn't exist a new account is created
even though no Ether may be transferred.
The attacker created 19 million new empty accounts via this opcode at low gas consumption,
which wasted disk space and increased synchronisation and processing time
Paper - A Survey on Ethereum Systems Security: Vulnerabilities, Attacks and Defenses by Huashan Chen, Marcus Pendleton,
Laurent Njilla, and Shouhuai Xu
Dead Accounts and Bloating State Database
Certain transactions taking long time to process
These transactions happened between blocks 2,286,910 and 2,717,576.
Somebody took advantage of an underpriced opcode
Creating millions of dead Ethereum accounts
This had the effect of bloating the state database.
It created tons of transaction traces.
Impact of DDoS attacks
Hacks against Geth client
Hacks create huge amount of clean up transactions
Each clean up transaction creates large set of traces
Hard forks
Hard forks do not remove the dead accounts
Quick fixes to the DDoS
Scanning an initial set of transactions
Measuring the traces from each transaction
Checking the frequency of traces in the transactions
Attack Vectors on Proof of Stake
Proof of Stake vs Proof of Work
incentive to DDoS others is much higher in POW compared to POS (or specifically
Casper). The reasons is that POW is a zero sum game where other miners gain the
reward if some miners can not submit a block.
Casper in contrast is designed as a coordination game where every participant gets
most if all others can include their blocks.
Better security against 51% attacks -High level goal of PoS is to ensure that each
stakeholder chance of mining the next block is proportional to the number of coins they
control.
Attack against Proof of Stake
● xx% attack
● Fake Stake Attack
● Long Range Attack
● Nothing at Stake
● Sour Milk Attack
Credit - Infosecinstitute.com
Ethereum 2.0
Ethereum 2.0 Audit Findings
QuantStamp Audit
Possible DDoS Attack Vectors
DDoS attack through creating a mapping between public keys and validators’ IPs
DDoS attack on Insecure gRPC connection
( Reported by Quantum Stamp Audit on Prysm )
https://github.com/prysmaticlabs/prysm/issues/6327
QuantStamp Audit
Quantstamp’s audit of Prysmatic Labs ETH 2.0 client involved ten engineers who
examined the entire codebase over the course of two months.
They examined the beacon node logic, validator client, slasher logic, libp2p
networking layer, gRPC API, client database, account management and key
storage, client synchronization, and more.
QuantStamp Audit Findings
Vulnerabilities found by Quantstamp engineers and addressed by Prysmatic Labs
included:
● Granularity of timestamps
● Pseudo-random number generation
● Second preimage attacks on Merkle trees
Least Authority Audit
Audit findings on the Block Proposer System
Single Secret Leader Election (SSLE) keeps the selection secret and stops the leak
of information to an observer, while still allowing the chosen block proposer a fast
way to verify to others that it is, in fact, the proposer.
With the information leak patched, the block proposer remains as protected as it
would be in PoW chains, but without the computational overhead.
https://leastauthority.wpengine.com/static/publications/LeastAuthority-Ethereum-2.
0-Specifications-Audit-Report.pdf
Audit Findings on the Gossip Protocol
Gossip protocols generally suffer from the spam problem; without a centralized
judge, it can be difficult to understand whether a message is legitimate or is spam
that is meant to clog the network.
This was one of the primary concerns in examining the networking layer. In
Ethereum 2.0, when a node proposes a new finalized block, the block must be sent
to the rest of the network.
There is an issue when a dishonest node is capable of sending an unlimited
amount of older block messages to the rest of the network with minimal penalty,
allowing them to overwhelm the network and block legitimate messages.
Audit Findings on the Slashing Messages
Similarly, when a node violates the rules, other nodes send out slashing messages
to notify the rest of the network about who to penalize.
There is a a small loophole that allowed a node to send an unlimited amount of
these types of messages with minimal penalty, causing the same message blocking
if they sent enough of them.
https://leastauthority.com/blog/ethereum-2-0-specifications/
DDoS on Ethereum 2.0
Teku Attack Scenario
Two of four Teku nodes were targeted by five ordinary machines with a sustained
DoS attack.
Initial loss of finality was achieved with two or three machines, but the others joined
within a few epochs to ensure that the network could not recover.
https://github.com/ethereum/public-attacknets/issues/7#issuecomment-665966067
Teku Attack Implementation
> while true; do cat /dev/zero | pv -L 1M |nc XXX.XXX.XXX.XXX 9000 >/dev/null; done
https://github.com/ethereum/public-attacknets/issues/7#issuecomment-665966067
Impact of Teku Attack
The effect that the DoS attack had on the attacknet was a prolonged loss finality and
required manual intervention to restore the network to a healthy state once the attack
stopped.
The nodes under attack used large amounts of memory, were subject to multiple
container restarts, had trouble staying connected to peers and one node's local clock
was 20 mins slow.
https://github.com/ethereum/public-attacknets/issues/7#issuecomment-665966067
Teku Attack - Root Cause
Firstly responding to one byte with multiple bytes is a vector for various
amplification attacks but that wasn't the issue that caused the loss of finality.
The second issue is that the responses were being written faster than they were
read by the attacking peer and jvm-libp2p was not applying any throttling.
Eventually TCP back pressure kicked in, filling up the OS write buffers and the
responses wound up being queued in user space memory. This pushed up both
the on and off heap memory usage very substantially.
CPU also spiked significantly partly due to processing all those multi stream
"messages" but mostly because of the resultant memory pressure and GC activity.
Teku Attack - Solution
Preventing this specific attack is straight forward, disconnect the peer immediately when
an invalid (e.g. 0 length) multi stream message is received.
Resilience to DOS attacks increases significantly as you increase the number of nodes
and diversity of clients, locations and network connections
https://github.com/ethereum/public-attacknets/issues/7#issuecomment-665966067
Randomness on Ethereum 2.0
Sharding, Staking and Randomness
Almost all sharding designs today rely on some source of randomness to assign
validators to shards. Both the randomness and the validators assignment require
computation that is not specific to any particular shard.
For that computation, existing sharding designs have a separate blockchain that is
tasked with performing operations necessary for the maintenance of the entire
network.
Sharding, Staking and Randomness
Besides generating random numbers and assigning validators to the shards, these
operations often also include receiving updates from shards and taking snapshots of
them, processing stakes and slashing in Proof-of-Stake systems, and rebalancing shards
when that feature is supported.
Such chain is called a Beacon chain in Ethereum and Near, a Relay chain in PolkaDot,
and the Cosmos Hub in Cosmos.
Distributed Randomness on Blockchain
Many modern blockchain protocols rely on a source of randomness for selecting
participants that carry out certain actions in the protocol.
If a malicious actor can influence such source of randomness, they can increase
their chances of being selected, and possibly compromise the security of the
protocol.
Distributed randomness is also a crucial building block for many distributed
applications built on the blockchain.
Essential Properties of Randomness
Three essential properties for distributed randomness on-chain :
1. It needs to be unbiased. In other words, no participant shall be able to
influence in any way the outcome of the random generator.
2. It needs to be unpredictable. In other words, no participant shall be able to
predict what number will be generated (or reason about any properties of it)
before it is generated.
3. The protocol needs to tolerate some percentage of actors that go offline or try
to intentionally stall the protocol.
RANDAO approach
The general idea is that the participants of the network first all privately choose a
pseudo-random number, submit a commitment to such privately chosen number.
All agree on some set of commitments using some consensus algorithm, then all
reveal their chosen numbers, reach a consensus on the revealed numbers, and
have the XOR of the revealed numbers to be the output of the protocol.
Limitations of the RANDAO approach
It is unpredictable, and has the same liveness as the underlying consensus
protocol, but is biasable.
Specifically, a malicious actor can observe the network once others start to reveal
their numbers, and choose to reveal or not to reveal their number based on XOR of
the numbers observed so far.
This allows a single malicious actor to have one bit of influence on the output, and
a malicious actor controlling multiple participants have as many bits of influence as
the number of participants they are controlling.
RANDAO + VDF Approach
To make RANDAO, un-biasable, one approach would be to make the output not just
XOR, but something that takes more time to execute than the allocated time to
reveal the numbers.
If the computation of the final output takes longer than the reveal phase, the
malicious actor cannot predict the effect of them revealing or not revealing their
number, and thus cannot influence the result.
Such a function that takes a long time to compute, is fast to verify the computation,
and has a unique output for each input is called a verifiable delay function (VDF for
short) and it turns out that designing one is extremely complex.
Ethereum Perspective on RANDAO + VDF
Ethereum presently plans to use RANDAO with VDF as their randomness beacon.
Besides the fact that this approach is unpredictable and unbiasable, it has an extra
advantage that is has liveness even if only two participants are online (assuming
the underlying consensus protocol has liveness with so few participants).
For the family of VDFs linked above a specialized ASIC can be 100+ times faster
than conventional hardware. Thus, if the reveal phase lasts 10 seconds, the VDF
computed on such an ASIC must take longer than 100 seconds to have 10x safety
margin, and thus the same VDF computed on the conventional hardware needs to
take 100 x 100 seconds = ~3 hours.
Threshold Signatures
This approach is pioneered by DFNITY, is to use threshold BLS signatures.
Boneh–Lynn–Shacham (BLS) signature scheme allows a user to verify that a signer
is authentic. The scheme uses a bilinear pairing for verification, and signatures are
elements of an elliptic curve group.
BLS signatures is a construction that allows multiple parties to create a single
signature on a message, which is often used to save space and bandwidth by not
requiring sending around multiple signatures. A common usage for BLS signatures
in blockchains is signing blocks in BFT protocols.
Threshold Signatures in Practice
Say 100 participants create blocks, and a block is considered final if 67 of them sign
on it. They can all submit their parts of the BLS signatures, and then use some
consensus algorithm to agree on 67 of them and then aggregate them into a single
BLS signature.
Any 67 parts can be used to create an accumulated signature, however the
resulting signature will not be the same depending on what 67 signatures were
aggregated.
Threshold Signatures in Practice
Turns out that if the private keys that the participants use are generated in a
particular fashion, then no matter what 67 (or more, but not less) signatures are
aggregated, the resulting multisignature will be the same. This can be used as a
source of randomness:
The participants first agree on some message that they will sign (it could be an
output of RANDAO, or just the hash of the last block, doesn’t really matter for as
long as it is different every time and is agreed upon), and create a multisignature on
it. Until
Limitations of Threshold Signatures
This approach to randomness is completely unbiased and unpredictable, and is live
for as long as 2/3 of participants are online (though can be configured for any
threshold). While ⅓ offline or misbehaving participants can stall the algorithm, it
takes at least ⅔ participants to cooperate to influence the output.
The private keys for this scheme need to be generated in a particular fashion. The
procedure for the key generation, called Distributed Key Generation, or DKG for
short, is extremely complex and is an area of active research.
RandShare approach
RandShare is an unbiased and unpredictable protocol that can tolerate up to ⅓ of
the actors being malicious.
It is relatively slow, and the paper linked also describes two ways to speed it up,
called RandHound and RandHerd, but unlike RandShare itself, RandHound and
RandHerd are relatively complex.
The general problems with RandShare besides the large number of messages
exchanged (the participants together will exchange O(n^3) messages), is the fact
that while ⅓ is a meaningful threshold for liveness in practice, it is low for the ability
to influence the output. There are several reasons for it:
RandShare approach
1. The benefit from influencing the output can significantly outweigh the benefit
of stalling randomness.
2. If a participant controls more than ⅓ of participants in RandShare and uses this
to influence the output, it leaves no trace. Thus a malicious actor can do it
without ever being revealed. Stalling a consensus is naturally visible.
3. The situations in which someone controls ⅓ of hashpower / stake are not
impossible, and given (1) and (2) above someone having such control is unlikely
to attempt to stall the randomness, but can and likely will attempt to influence
it.
NEAR protocol approach
1. Each participant comes up with their part of the output, splits it into 67 parts,
erasure codes it to obtain 100 shares such that any 67 are enough to
reconstruct the output,
2. Assigns each of the 100 shares to one of the participants and encodes it with
the public key of such participant. They then share all the encoded shares.
3. The participants use some consensus (e.g. Tendermint) to agree on such
encoded sets from exactly 67 participants.
NEAR protocol approach
1. Once the consensus is reached, each participant takes the encoded shares in
each of the 67 sets published this way that is encoded with their public key,
then decodes all such shares and publishes all such decoded shares at once.
2. Once at least 67 participants did the previous step, all the agreed upon sets
can be fully decoded and reconstructed, and the final number can be obtained
as an XOR of the initial parts the participants came up with in (1).
3. The idea why this protocol is unbiasable and unpredictable is similar to that of
RandShare and threshold signatures: the final output is decided once the
consensus is reached, but is not known to anyone until ⅔ of the participants
decrypt shares encrypted with their public key.
Verifiable Delay Functions
Anatomy of a VDF
A VDF consists of a triple of algorithms: Setup, Eval, and Verify.
Setup (λ, t) takes a security parameter λ and delay parameter t and outputs public
parameters pp (which fix the domain and range of the VDF and may include other
information necessary to compute or verify it).
Eval (pp, x) takes an input (x) from the domain and outputs a value (y) in the range
and (optionally) a short proof π.
Finally, Verify (pp, x, y, π) efficiently verifies that y is the correct output on x.
Crucially, for every input x there should be a unique output y that will verify.
Historic references to VDF for DDoS prevention
To prevent email spamming, in the early 1990s, Cynthia Dwork and Moni Naor
suggested using squaring roots over finite fields puzzles as functions which take a
predetermined time to compute, and are straightforward to verify.
However, their work was considered impractical because one has to use rather
large finite fields to make the algorithm useful, and the libraries for handling
multiple precision arithmetic at the time of the suggestion of the algorithm were
orders of magnitude slower than current ones.
Essential Properties of VDF
Sequential: honest parties can compute (y,π) ← Eval(pp,x) in (t) sequential steps,
while no parallel-machine adversary with a polynomial number of processors can
distinguish the output y from random in significantly fewer steps.
Efficiently verifiable: We prefer Verify to be as fast as possible for honest parties to
compute; we require it to take total time - O(polylog(t)).
Unique: for all inputs x, it is difficulty to find a y for which
Verify (pp,x,y,π) = Yes, but y ∕ = Eval(pp, x).
Additional Properties of VDF
Decodable - A VDF is decodable if there exists a decoding algorithm Dec such that
(Eval,Dec) form a lossless encoding scheme.
Incremental - A single set of public parameters (pp) supports multiple hardness
parameters (t). The number of steps used to compute (y) is specified in the proof,
instead of being fixed during Setup.
The main benefit of incremental VDFs over a simple chaining of VDFs to increase
the delay is a reduced aggregate proof size.
This is particularly useful for applications of VDFs to computational time-stamping
or blockchain consensus.
Main VDF Constructions
There are currently three candidate constructions that satisfy the VDF requirements.
Each one has its own potential downsides.
The first was outlined in the original VDF paper by Boneh, et al. and uses injective
rational maps. However, evaluating this VDF requires a somewhat large amount of
parallel processing, leading the authors to refer to it as a “weak VDF.”
Later, Pietrzak and Wesolowski independently arrived at extremely similar constructions
based on repeated squaring in groups of unknown order.
These constructions are based on modular exponentiations, where Pietrzak and
Wesolowski suggest to iteratively compute τ squarings in an RSA group, with τ large.
Innovations in VDF
The main innovation in VDF is to propose a setup phase to set a trusted
environment allowing the functions to be universally verifiable.
This trusted environment sets the public parameters of the VDF, including its
difficulty which determines the amount of time spent on computing.
Any node who needs to solve the VDF will use the public parameters to perform
certain sequential computations.
Some VDFs also allow generating a proof to facilitate the verification from the other
participants.
VDF and DDoS Prevention
IOTA Approach
A DoS prevention mechanism where nodes are required to compute exactly τ
modular squarings of a given input message
Calibrating the VDF evaluation time on different hardware and optimising the time
needed to verify the correctness of the puzzle through multi-exponentiation
techniques
Extensive experimental evaluations to compare VDFs and PoW on different
hardware. In particular show that larger monetary resources cannot help to speed
up the VDF evaluation
https://arxiv.org/pdf/2006.01977.pdf
IOTA DoS Prevention Mechanism
● Evaluation - When node i decides to generate transaction n, it is required to
solve a VDF such that its input is the hash of transaction n − 1 issued by the
same node.
● Proof - Node i also generates a proof to facilitate the verification task, which
gossips along with the transaction.
● Verification - When a new transaction is received, node j verifies whether the
VDF has been solved correctly. If yes, it forwards the transaction (and the
proof) to its neighbors, or discards it otherwise.
https://arxiv.org/pdf/2006.01977.pdf
VDF Integration in the IOTA protocol
Public Inputs
● VDF Difficulty - A difficulty which indicates the number of sequential operations
to solve and can be updated accordingly to mitigate attacks
● RSA Module - A modulus N = p · q which has bit-length λ (typically 1024, 2048,
or 3072), and is the product of two prime numbers of the same order. The
security of the entire mechanism relies on the length of N: the longer is the
modulus, the more difficult is to find its factorization
● Cryptographic hash function - A hash function that will be used in the
evaluation and proof of VDF
https://arxiv.org/pdf/2006.01977.pdf
Our Approach
Our Architecture Overview
Supersingular Isogeny based VDFs
VDF based single secret leader selection
VDF based Random Oracles
VDF based delay authentication to the RANDAO
Randomness ( Randshare and Randhound) powered beacon chain
Solution Architecture Framework for our approach
Random
Oracles
Random
Oracles
Isogeny based VDF Generator
Random
Oracles
Beacon Chain with Secret Leader Self Selection and Delay Authentication
Random
Oracles
Random
Oracles
Random
Oracles
Main Chain with RANDAO based Validator Network and One Time Signature
Shard Chains with RandHound and RandShare with Proximity Verification
TemerNet - Our Proof of Concept for Random Oracle
https://github.com/EPICKnowledgeSociety/TemereNet
pragma solidity ^0.5.2;
import "github.com/starkware-libs/veedo/blob/master/contracts/BeaconContract.sol";
contract Beacon{
function getLatestRandomness()external view returns(uint256,bytes32){}
}
contract WeatherOracle {
address public oracleAddress;
address public BeaconContractAddress=0x79474439753C7c70011C3b00e06e559378bAD040;
constructor (address _oracleAddress) public {
oracleAddress = _oracleAddress;
}
TemerNet - Our Proof of Concept for Random Oracle
https://github.com/EPICKnowledgeSociety/TemereNet
function setBeaconContractAddress(address _address) public {
BeaconContractAddress=_address;
}
function generateRandomNumber() public view returns(bytes32){
uint blockNumber;
bytes32 randomNumber;
Beacon beacon=Beacon(BeaconContractAddress);
(blockNumber,randomNumber)=beacon.getLatestRandomness();
return randomNumber;
}
Single Secret Leader Election (SSLE)
In a Single Secret Leader Election (SSLE), a group of participants aim to randomly
choose exactly one leader from the group with the restriction that the identity of the
leader will be known to the chosen leader and nobody else.
At a later time, the elected leader should be able to publicly reveal her identity and
prove that she has won the election. The election process itself should work
properly even if many registered users are passive and do not send any messages.
Among the many applications of SSLEs, their potential for enabling more efficient
proof-of-stake based cryptocurrencies have recently received increased attention.
https://eprint.iacr.org/2020/025.pdf
Node Topology in Shard Chain using VDF
Every node is connected to m << n neighbours and is involved in the generation
and the verification of transactions, which simply carry proof carrying data (PCD).
It is important to limit the shard creation as a node could theoretically generate an
infinite number of transactions per second, without an appropriate access control
mechanism.
Every node has to evaluate a function (f) before issuing a transaction.
Isogeny based VDF
If we have two elliptic curves (E1 and E2), we can create a function that maps point (P) on
E1 to a point Q on E2. This function is known as an isogeny. If we can map this function,
every point on E1 can then be mapped to E2.
Our secret key is then the isogeny, and the public key is the elliptic curve that we are
using. With isogenous elliptic curves we thus do not deal with a single elliptic curve but a
family of them.
http://blog.intothesymmetry.com/2019/07/on-isogenies-verifiable-delay-functions.html
Construction of an Isogeny based VDF
Setup: the setup phase of this VDF consists of
Choosing a prime number N
Selecting a supersingular curve E
Performing a random non-backtracking walk of length T having as outcome the
isogeny ϕ and it's dual ϕ^ (every isogeny has a dual isogeny).
Choosing a point P and compute ϕ(P)
Output ϕ^,E,E′,P,ϕ(P)
Evaluation and Verification of an Isogeny based VDF
Evaluation :
Receiving a random point Q > Compute ϕ^(Q)
Verification :
Use the Weil pairing and isogenies to verify eN(P,ϕ^(Q)) = eN(ϕ(P),Q)
http://blog.intothesymmetry.com/2019/07/on-isogenies-verifiable-delay-functions.html
Our Roadmap
● Implementation of Isogeny VDF Key Exchange using PQCrypto-SIDH
○ https://github.com/microsoft/PQCrypto-SIDH
● Implementation of Isogeny VDF Authentication using SS Isogeny
○ https://github.com/defeo/ss-isogeny-software
● Implementation of Single Secret Leader Selection using Mathcrypto
○ https://github.com/mathcrypto/SSLES
● Deployment of our Isogeny VDF with RANDAO
○ https://github.com/randao/randao
Appendix
What would be a trivial VDF ?
A trivial delay function can be built by iterating a cryptographic hash function. For
example, it is reasonable to assume it is infeasible to compute 240 iterations of
SHA-256 in a matter of seconds, even using specialized hardware.
However, a lottery participant wishing to verify the output of this delay function
must repeat the computation in its entirety (which might take many hours on a
personal computer).
Ideally, we would like to design a delay function which any observer can quickly
verify was computed correctly.
VDF and PoW
VDFs are functions that require a preset number of iterations to complete.
Unlike PoW, in VDFs there is no trivial way to verify whether a node has correctly
solved
While VDFs and Proof of Work (PoW) both aim the evaluator to spend some time to
compute a puzzle, the former is mainly based on sequentially computing a function
(iterative squaring in RSA groups or points addition in elliptic curves, which cannot
be parallelized, making specialized hardware not able to substantially speed up the
puzzle computation.
VRF and VDF
VRF is secure after selection, i.e. needs checking. RANDAO and RANDAO + VDF
are secure ahead of time. You know the number will be random without checking.
In Ethereum, where there will potentially be hundreds of thousands of people
validating, it would be incredibly difficult to check all the VRF rolls, but with VDF
there's only one thing to check against the incoming blocks.
So VRF, you get blocks, then check them along with the proof submitted by the
validator. With VDF, blocks get checked against the random roll that's common for
everyone. Additional proof per block not needed.
Pietrzak VDF Scheme
To set up the VDF, choose a time parameter T, a finite abelian group G of unknown
order, and a hash function H from bytes to elements of G.
Given an input x, let g = H(x) evaluate the VDF by computing y = g2T
IOTA Approach
Evaluator node uses its last transaction as the input for the new VDF
Verifier node receives the transaction and proof from the node
Verifier node verifies the correctness of the VDF
Weslowski Construction in IOTA
The Wesolowski scheme assumes the existence of groups that satisfy something
called the adaptive root assumption, which is not well studied in the mathematical
literature.
IOTA Approach Best Practices
Each time a node decides to issue a transaction, it has to evaluate a VDF. The
evaluation takes as an input a binary message m ∈ {0,1}∗, which we enforce to be
the previous transaction issued by the same node.
In this way, the protocol ensures the sequentiality of the VDFs evaluations because
a node has to wait for a VDF to complete before starting a new evaluation.
In other terms, it is not possible to evaluate several VDFs in parallel to overcome
node’s allowed throughput.
What could happen in a DDoS
During DDoS, the website is flooded with queries executed by a distributed network of
malware-infected computers (botnet). Eventually, the servers run out of resources.
DDoS attacks could be a a smokescreen, scammers try to execute even more dangerous
security breaches —
for example, to access the control panel of the website through an attack on the site
administrator, or to mass mail a link containing an attack vector to the stakeholders.
Taxonomy of Attacks
Volume based attacks
HTTP flood
Protocol attacks
Volume based attacks
happen when the number
of queries is so high that it
saturates the bandwidth
of the attacked site and
drains the network
capacity.
HTTP flood is main load is
on the app server. Here it is
crucial to separate bots
from real users: installing
cookies, javascript or flash
flags, captcha.
Protocol attacks drain
actual server
resources or the
resources of firewalls
and load balancers
These attacks
exploited both
application layer and
data layer
vulnerabilities
Parity Attack
Ironic position of EXTCODESIZE
The first sign of trouble was when geth nodes started to crash in the network due
to lack of memory on a specific block. The postmortem showed that the underlying
problem involved Ethereum’s EXTCODESIZE attribute, which is included in each
transaction by design. This results in much slower transaction confirmations. The
net result of the Ethereum DDoS attack was a reduction in the rate of block creation
by a factor of two or three.
Ironic position of EXTCODESIZE
This is due to the EXTCODESIZE opcode, which has a fairly low gasprice but which
requires nodes to read state information from disk; the attack transactions are
calling this opcode roughly 50,000 times per block. The consequence of this is that
the network is greatly slowing down, but there is NO consensus failure or memory
overload. An attacker could use this attribute to ask for additional checks against
the Ethereum network database — up to 50,000 at a time.

More Related Content

What's hot

Distributed Intelligence
Distributed IntelligenceDistributed Intelligence
Distributed IntelligenceNuri Cankaya
 
blockchain unit 3
blockchain unit 3blockchain unit 3
blockchain unit 3Rohit Verma
 
IRJET- An Overview of the Security of Blockchain
IRJET- An Overview of the Security of BlockchainIRJET- An Overview of the Security of Blockchain
IRJET- An Overview of the Security of BlockchainIRJET Journal
 
Blockchain On Azure
Blockchain On AzureBlockchain On Azure
Blockchain On AzureJohan Zammit
 
Blockchain for AI: Review and Open. Research Challenges K. SALAH, M. H. REHMA...
Blockchain for AI: Review and Open. Research Challenges K. SALAH, M. H. REHMA...Blockchain for AI: Review and Open. Research Challenges K. SALAH, M. H. REHMA...
Blockchain for AI: Review and Open. Research Challenges K. SALAH, M. H. REHMA...eraser Juan José Calderón
 
Hyper ledger febric
Hyper ledger febricHyper ledger febric
Hyper ledger febricRohit Verma
 
Security and privacy with blockchain
Security and privacy with blockchainSecurity and privacy with blockchain
Security and privacy with blockchainCeline George
 
Blockchain and Cryptography - A Primer
Blockchain and Cryptography - A PrimerBlockchain and Cryptography - A Primer
Blockchain and Cryptography - A PrimerGokul Alex
 
Privacy Preserving Paradigms of Blockchain Technology
Privacy Preserving Paradigms of Blockchain TechnologyPrivacy Preserving Paradigms of Blockchain Technology
Privacy Preserving Paradigms of Blockchain TechnologyGokul Alex
 
Multifactor Authentication on the Blockchain
Multifactor Authentication on the BlockchainMultifactor Authentication on the Blockchain
Multifactor Authentication on the BlockchainReza Ismail
 
IRJET- Secure Online Voting Systems using Block of Chunks
IRJET-  	  Secure Online Voting Systems using Block of ChunksIRJET-  	  Secure Online Voting Systems using Block of Chunks
IRJET- Secure Online Voting Systems using Block of ChunksIRJET Journal
 
Blockchain Interview Questions and Answers | Blockchain Technology | Blockcha...
Blockchain Interview Questions and Answers | Blockchain Technology | Blockcha...Blockchain Interview Questions and Answers | Blockchain Technology | Blockcha...
Blockchain Interview Questions and Answers | Blockchain Technology | Blockcha...Edureka!
 
Blockchain Security and Demonstration
Blockchain Security and DemonstrationBlockchain Security and Demonstration
Blockchain Security and DemonstrationYao Yao
 
IRJET- Security Threats on Blockchain and its Countermeasures
IRJET- Security Threats on Blockchain and its CountermeasuresIRJET- Security Threats on Blockchain and its Countermeasures
IRJET- Security Threats on Blockchain and its CountermeasuresIRJET Journal
 
Privacy-preserving techniques using zero knowledge proof in public Ethereum
Privacy-preserving techniques using zero knowledge proof in public EthereumPrivacy-preserving techniques using zero knowledge proof in public Ethereum
Privacy-preserving techniques using zero knowledge proof in public EthereumNagib Aouini
 
Block Chain Report By Abhishek Patel
Block Chain Report By Abhishek PatelBlock Chain Report By Abhishek Patel
Block Chain Report By Abhishek PatelAbhishek Patel
 
IRJET- Transaction based Block Chain Cryptocurrency
IRJET-  	  Transaction based Block Chain CryptocurrencyIRJET-  	  Transaction based Block Chain Cryptocurrency
IRJET- Transaction based Block Chain CryptocurrencyIRJET Journal
 
Blockchain and its Scope in Retail
Blockchain and its Scope in RetailBlockchain and its Scope in Retail
Blockchain and its Scope in RetailIRJET Journal
 

What's hot (20)

Comprehensive Guide On Network Security
Comprehensive Guide On Network SecurityComprehensive Guide On Network Security
Comprehensive Guide On Network Security
 
Distributed Intelligence
Distributed IntelligenceDistributed Intelligence
Distributed Intelligence
 
blockchain unit 3
blockchain unit 3blockchain unit 3
blockchain unit 3
 
IRJET- An Overview of the Security of Blockchain
IRJET- An Overview of the Security of BlockchainIRJET- An Overview of the Security of Blockchain
IRJET- An Overview of the Security of Blockchain
 
Blockchain On Azure
Blockchain On AzureBlockchain On Azure
Blockchain On Azure
 
Blockchain for AI: Review and Open. Research Challenges K. SALAH, M. H. REHMA...
Blockchain for AI: Review and Open. Research Challenges K. SALAH, M. H. REHMA...Blockchain for AI: Review and Open. Research Challenges K. SALAH, M. H. REHMA...
Blockchain for AI: Review and Open. Research Challenges K. SALAH, M. H. REHMA...
 
Hyper ledger febric
Hyper ledger febricHyper ledger febric
Hyper ledger febric
 
Security and privacy with blockchain
Security and privacy with blockchainSecurity and privacy with blockchain
Security and privacy with blockchain
 
Blockchain and Cryptography - A Primer
Blockchain and Cryptography - A PrimerBlockchain and Cryptography - A Primer
Blockchain and Cryptography - A Primer
 
02 hello smart contracts
02 hello smart contracts02 hello smart contracts
02 hello smart contracts
 
Privacy Preserving Paradigms of Blockchain Technology
Privacy Preserving Paradigms of Blockchain TechnologyPrivacy Preserving Paradigms of Blockchain Technology
Privacy Preserving Paradigms of Blockchain Technology
 
Multifactor Authentication on the Blockchain
Multifactor Authentication on the BlockchainMultifactor Authentication on the Blockchain
Multifactor Authentication on the Blockchain
 
IRJET- Secure Online Voting Systems using Block of Chunks
IRJET-  	  Secure Online Voting Systems using Block of ChunksIRJET-  	  Secure Online Voting Systems using Block of Chunks
IRJET- Secure Online Voting Systems using Block of Chunks
 
Blockchain Interview Questions and Answers | Blockchain Technology | Blockcha...
Blockchain Interview Questions and Answers | Blockchain Technology | Blockcha...Blockchain Interview Questions and Answers | Blockchain Technology | Blockcha...
Blockchain Interview Questions and Answers | Blockchain Technology | Blockcha...
 
Blockchain Security and Demonstration
Blockchain Security and DemonstrationBlockchain Security and Demonstration
Blockchain Security and Demonstration
 
IRJET- Security Threats on Blockchain and its Countermeasures
IRJET- Security Threats on Blockchain and its CountermeasuresIRJET- Security Threats on Blockchain and its Countermeasures
IRJET- Security Threats on Blockchain and its Countermeasures
 
Privacy-preserving techniques using zero knowledge proof in public Ethereum
Privacy-preserving techniques using zero knowledge proof in public EthereumPrivacy-preserving techniques using zero knowledge proof in public Ethereum
Privacy-preserving techniques using zero knowledge proof in public Ethereum
 
Block Chain Report By Abhishek Patel
Block Chain Report By Abhishek PatelBlock Chain Report By Abhishek Patel
Block Chain Report By Abhishek Patel
 
IRJET- Transaction based Block Chain Cryptocurrency
IRJET-  	  Transaction based Block Chain CryptocurrencyIRJET-  	  Transaction based Block Chain Cryptocurrency
IRJET- Transaction based Block Chain Cryptocurrency
 
Blockchain and its Scope in Retail
Blockchain and its Scope in RetailBlockchain and its Scope in Retail
Blockchain and its Scope in Retail
 

Similar to DEFCON28_2020_EthereumSecurity_PreventingDDoS_VDF

Unchain Blockchain by Eva Rez
Unchain Blockchain by Eva RezUnchain Blockchain by Eva Rez
Unchain Blockchain by Eva Rezrezeva
 
Unchain Blockchain by Eva Rez
Unchain Blockchain by Eva RezUnchain Blockchain by Eva Rez
Unchain Blockchain by Eva Rezrezeva
 
The Basic Theories of Blockchain
The Basic Theories of BlockchainThe Basic Theories of Blockchain
The Basic Theories of BlockchainSota Watanabe
 
Detecting and Confronting Flash Attacks from IoT Botnets
Detecting and Confronting Flash Attacks from IoT BotnetsDetecting and Confronting Flash Attacks from IoT Botnets
Detecting and Confronting Flash Attacks from IoT BotnetsFarjad Noor
 
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018Codemotion
 
BCHGraz - Meetup #8 - Intro & Ethereum
 BCHGraz - Meetup #8 - Intro & Ethereum BCHGraz - Meetup #8 - Intro & Ethereum
BCHGraz - Meetup #8 - Intro & EthereumBlockchainHub Graz
 
A Countermeasure for Double Spending Attacks on Blockchain Technology in Smar...
A Countermeasure for Double Spending Attacks on Blockchain Technology in Smar...A Countermeasure for Double Spending Attacks on Blockchain Technology in Smar...
A Countermeasure for Double Spending Attacks on Blockchain Technology in Smar...IJNSA Journal
 
A Survey: DDOS Attack on Internet of Things
A Survey: DDOS Attack on Internet of ThingsA Survey: DDOS Attack on Internet of Things
A Survey: DDOS Attack on Internet of ThingsIJERD Editor
 
Blockchain in the Heart of Digital Transformation
Blockchain in the Heart of Digital TransformationBlockchain in the Heart of Digital Transformation
Blockchain in the Heart of Digital TransformationDr. Mohamed Torky
 
Inside Out Hacking - Bypassing Firewall
Inside Out Hacking - Bypassing FirewallInside Out Hacking - Bypassing Firewall
Inside Out Hacking - Bypassing Firewallamiable_indian
 
unit3consesence.pptx
unit3consesence.pptxunit3consesence.pptx
unit3consesence.pptxGopalSB
 
Days of the Honeynet: Attacks, Tools, Incidents
Days of the Honeynet: Attacks, Tools, IncidentsDays of the Honeynet: Attacks, Tools, Incidents
Days of the Honeynet: Attacks, Tools, IncidentsAnton Chuvakin
 
Unveiling the Landscape of Smart Contract Vulnerabilities: A Detailed Examina...
Unveiling the Landscape of Smart Contract Vulnerabilities: A Detailed Examina...Unveiling the Landscape of Smart Contract Vulnerabilities: A Detailed Examina...
Unveiling the Landscape of Smart Contract Vulnerabilities: A Detailed Examina...IJCNCJournal
 
Unveiling the Landscape of Smart Contract Vulnerabilities: A Detailed Examina...
Unveiling the Landscape of Smart Contract Vulnerabilities: A Detailed Examina...Unveiling the Landscape of Smart Contract Vulnerabilities: A Detailed Examina...
Unveiling the Landscape of Smart Contract Vulnerabilities: A Detailed Examina...IJCNCJournal
 
Fortinet_FortiDDoS_Introduction
Fortinet_FortiDDoS_IntroductionFortinet_FortiDDoS_Introduction
Fortinet_FortiDDoS_Introductionswang2010
 
Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)Tomoaki Sato
 
Why we need censorship-resistant AI
Why we need censorship-resistant AIWhy we need censorship-resistant AI
Why we need censorship-resistant AIPandora Boxchain
 
The Easy Way to Secure Microservices
The Easy Way to Secure MicroservicesThe Easy Way to Secure Microservices
The Easy Way to Secure MicroservicesMichael Hofmann
 

Similar to DEFCON28_2020_EthereumSecurity_PreventingDDoS_VDF (20)

Unchain Blockchain by Eva Rez
Unchain Blockchain by Eva RezUnchain Blockchain by Eva Rez
Unchain Blockchain by Eva Rez
 
Unchain Blockchain by Eva Rez
Unchain Blockchain by Eva RezUnchain Blockchain by Eva Rez
Unchain Blockchain by Eva Rez
 
The Basic Theories of Blockchain
The Basic Theories of BlockchainThe Basic Theories of Blockchain
The Basic Theories of Blockchain
 
Detecting and Confronting Flash Attacks from IoT Botnets
Detecting and Confronting Flash Attacks from IoT BotnetsDetecting and Confronting Flash Attacks from IoT Botnets
Detecting and Confronting Flash Attacks from IoT Botnets
 
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
Simone Bronzini - Weaknesses of blockchain applications - Codemotion Milan 2018
 
All About Ethereum
All About EthereumAll About Ethereum
All About Ethereum
 
BCHGraz - Meetup #8 - Intro & Ethereum
 BCHGraz - Meetup #8 - Intro & Ethereum BCHGraz - Meetup #8 - Intro & Ethereum
BCHGraz - Meetup #8 - Intro & Ethereum
 
A Countermeasure for Double Spending Attacks on Blockchain Technology in Smar...
A Countermeasure for Double Spending Attacks on Blockchain Technology in Smar...A Countermeasure for Double Spending Attacks on Blockchain Technology in Smar...
A Countermeasure for Double Spending Attacks on Blockchain Technology in Smar...
 
A Survey: DDOS Attack on Internet of Things
A Survey: DDOS Attack on Internet of ThingsA Survey: DDOS Attack on Internet of Things
A Survey: DDOS Attack on Internet of Things
 
Blockchain in the Heart of Digital Transformation
Blockchain in the Heart of Digital TransformationBlockchain in the Heart of Digital Transformation
Blockchain in the Heart of Digital Transformation
 
Inside Out Hacking - Bypassing Firewall
Inside Out Hacking - Bypassing FirewallInside Out Hacking - Bypassing Firewall
Inside Out Hacking - Bypassing Firewall
 
unit3consesence.pptx
unit3consesence.pptxunit3consesence.pptx
unit3consesence.pptx
 
Days of the Honeynet: Attacks, Tools, Incidents
Days of the Honeynet: Attacks, Tools, IncidentsDays of the Honeynet: Attacks, Tools, Incidents
Days of the Honeynet: Attacks, Tools, Incidents
 
Unveiling the Landscape of Smart Contract Vulnerabilities: A Detailed Examina...
Unveiling the Landscape of Smart Contract Vulnerabilities: A Detailed Examina...Unveiling the Landscape of Smart Contract Vulnerabilities: A Detailed Examina...
Unveiling the Landscape of Smart Contract Vulnerabilities: A Detailed Examina...
 
Unveiling the Landscape of Smart Contract Vulnerabilities: A Detailed Examina...
Unveiling the Landscape of Smart Contract Vulnerabilities: A Detailed Examina...Unveiling the Landscape of Smart Contract Vulnerabilities: A Detailed Examina...
Unveiling the Landscape of Smart Contract Vulnerabilities: A Detailed Examina...
 
Fortinet_FortiDDoS_Introduction
Fortinet_FortiDDoS_IntroductionFortinet_FortiDDoS_Introduction
Fortinet_FortiDDoS_Introduction
 
Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)
 
DoS/DDoS
DoS/DDoSDoS/DDoS
DoS/DDoS
 
Why we need censorship-resistant AI
Why we need censorship-resistant AIWhy we need censorship-resistant AI
Why we need censorship-resistant AI
 
The Easy Way to Secure Microservices
The Easy Way to Secure MicroservicesThe Easy Way to Secure Microservices
The Easy Way to Secure Microservices
 

More from Gokul Alex

Blockchain Technology in Banking Services - A Review
Blockchain Technology in Banking Services - A ReviewBlockchain Technology in Banking Services - A Review
Blockchain Technology in Banking Services - A ReviewGokul Alex
 
Digital Innovation and Dynamics of Entrepreneurship
Digital Innovation and Dynamics of Entrepreneurship Digital Innovation and Dynamics of Entrepreneurship
Digital Innovation and Dynamics of Entrepreneurship Gokul Alex
 
Decentralised AI and Distributed Ledgers - An Introduction
Decentralised AI and Distributed Ledgers - An IntroductionDecentralised AI and Distributed Ledgers - An Introduction
Decentralised AI and Distributed Ledgers - An IntroductionGokul Alex
 
R3Corda - Architecture Overview - Concepts and Components
R3Corda - Architecture Overview - Concepts and ComponentsR3Corda - Architecture Overview - Concepts and Components
R3Corda - Architecture Overview - Concepts and ComponentsGokul Alex
 
Covid19 ContactTracing - Privacy Preserving Proximity Protocols
Covid19 ContactTracing - Privacy Preserving Proximity ProtocolsCovid19 ContactTracing - Privacy Preserving Proximity Protocols
Covid19 ContactTracing - Privacy Preserving Proximity ProtocolsGokul Alex
 
Cybersecurity Context in African Continent - Way Forward
Cybersecurity Context in African Continent - Way ForwardCybersecurity Context in African Continent - Way Forward
Cybersecurity Context in African Continent - Way ForwardGokul Alex
 
Creative Careers for Post Pandemic Times
Creative Careers for Post Pandemic TimesCreative Careers for Post Pandemic Times
Creative Careers for Post Pandemic TimesGokul Alex
 
Imagining Intelligent Information Machines for 2020
Imagining Intelligent Information Machines for 2020Imagining Intelligent Information Machines for 2020
Imagining Intelligent Information Machines for 2020Gokul Alex
 
Blockchain Essentials for Business Leaders - Value Propositions and Advantage...
Blockchain Essentials for Business Leaders - Value Propositions and Advantage...Blockchain Essentials for Business Leaders - Value Propositions and Advantage...
Blockchain Essentials for Business Leaders - Value Propositions and Advantage...Gokul Alex
 
A Concise Introduction to Cryptographic Concepts
A Concise Introduction to Cryptographic ConceptsA Concise Introduction to Cryptographic Concepts
A Concise Introduction to Cryptographic ConceptsGokul Alex
 
Applying Blockchain Technology for Digital Transformation
Applying Blockchain Technology for Digital TransformationApplying Blockchain Technology for Digital Transformation
Applying Blockchain Technology for Digital TransformationGokul Alex
 
Cognitive Commerce powered by Creative Convergence of AI, Analytics and Autom...
Cognitive Commerce powered by Creative Convergence of AI, Analytics and Autom...Cognitive Commerce powered by Creative Convergence of AI, Analytics and Autom...
Cognitive Commerce powered by Creative Convergence of AI, Analytics and Autom...Gokul Alex
 
Decentralised AI through Distributed Ledger Technologies
Decentralised AI through Distributed Ledger Technologies Decentralised AI through Distributed Ledger Technologies
Decentralised AI through Distributed Ledger Technologies Gokul Alex
 
Cloud Security Engineering - Tools and Techniques
Cloud Security Engineering - Tools and TechniquesCloud Security Engineering - Tools and Techniques
Cloud Security Engineering - Tools and TechniquesGokul Alex
 
Quantum Computing - A History in the Making
Quantum Computing - A History in the Making Quantum Computing - A History in the Making
Quantum Computing - A History in the Making Gokul Alex
 
Future of Education through Exponential and Emerging Technologies
Future of Education through Exponential and Emerging TechnologiesFuture of Education through Exponential and Emerging Technologies
Future of Education through Exponential and Emerging TechnologiesGokul Alex
 
Cloud Security - Emerging Facets and Frontiers
Cloud Security - Emerging Facets and FrontiersCloud Security - Emerging Facets and Frontiers
Cloud Security - Emerging Facets and FrontiersGokul Alex
 
Introduction to Blockchain Business Models
Introduction to Blockchain Business ModelsIntroduction to Blockchain Business Models
Introduction to Blockchain Business ModelsGokul Alex
 
Introduction to Blockchain Governance Models
Introduction to Blockchain Governance ModelsIntroduction to Blockchain Governance Models
Introduction to Blockchain Governance ModelsGokul Alex
 
Generational Adversarial Neural Networks - Essential Reference
Generational Adversarial Neural Networks - Essential ReferenceGenerational Adversarial Neural Networks - Essential Reference
Generational Adversarial Neural Networks - Essential ReferenceGokul Alex
 

More from Gokul Alex (20)

Blockchain Technology in Banking Services - A Review
Blockchain Technology in Banking Services - A ReviewBlockchain Technology in Banking Services - A Review
Blockchain Technology in Banking Services - A Review
 
Digital Innovation and Dynamics of Entrepreneurship
Digital Innovation and Dynamics of Entrepreneurship Digital Innovation and Dynamics of Entrepreneurship
Digital Innovation and Dynamics of Entrepreneurship
 
Decentralised AI and Distributed Ledgers - An Introduction
Decentralised AI and Distributed Ledgers - An IntroductionDecentralised AI and Distributed Ledgers - An Introduction
Decentralised AI and Distributed Ledgers - An Introduction
 
R3Corda - Architecture Overview - Concepts and Components
R3Corda - Architecture Overview - Concepts and ComponentsR3Corda - Architecture Overview - Concepts and Components
R3Corda - Architecture Overview - Concepts and Components
 
Covid19 ContactTracing - Privacy Preserving Proximity Protocols
Covid19 ContactTracing - Privacy Preserving Proximity ProtocolsCovid19 ContactTracing - Privacy Preserving Proximity Protocols
Covid19 ContactTracing - Privacy Preserving Proximity Protocols
 
Cybersecurity Context in African Continent - Way Forward
Cybersecurity Context in African Continent - Way ForwardCybersecurity Context in African Continent - Way Forward
Cybersecurity Context in African Continent - Way Forward
 
Creative Careers for Post Pandemic Times
Creative Careers for Post Pandemic TimesCreative Careers for Post Pandemic Times
Creative Careers for Post Pandemic Times
 
Imagining Intelligent Information Machines for 2020
Imagining Intelligent Information Machines for 2020Imagining Intelligent Information Machines for 2020
Imagining Intelligent Information Machines for 2020
 
Blockchain Essentials for Business Leaders - Value Propositions and Advantage...
Blockchain Essentials for Business Leaders - Value Propositions and Advantage...Blockchain Essentials for Business Leaders - Value Propositions and Advantage...
Blockchain Essentials for Business Leaders - Value Propositions and Advantage...
 
A Concise Introduction to Cryptographic Concepts
A Concise Introduction to Cryptographic ConceptsA Concise Introduction to Cryptographic Concepts
A Concise Introduction to Cryptographic Concepts
 
Applying Blockchain Technology for Digital Transformation
Applying Blockchain Technology for Digital TransformationApplying Blockchain Technology for Digital Transformation
Applying Blockchain Technology for Digital Transformation
 
Cognitive Commerce powered by Creative Convergence of AI, Analytics and Autom...
Cognitive Commerce powered by Creative Convergence of AI, Analytics and Autom...Cognitive Commerce powered by Creative Convergence of AI, Analytics and Autom...
Cognitive Commerce powered by Creative Convergence of AI, Analytics and Autom...
 
Decentralised AI through Distributed Ledger Technologies
Decentralised AI through Distributed Ledger Technologies Decentralised AI through Distributed Ledger Technologies
Decentralised AI through Distributed Ledger Technologies
 
Cloud Security Engineering - Tools and Techniques
Cloud Security Engineering - Tools and TechniquesCloud Security Engineering - Tools and Techniques
Cloud Security Engineering - Tools and Techniques
 
Quantum Computing - A History in the Making
Quantum Computing - A History in the Making Quantum Computing - A History in the Making
Quantum Computing - A History in the Making
 
Future of Education through Exponential and Emerging Technologies
Future of Education through Exponential and Emerging TechnologiesFuture of Education through Exponential and Emerging Technologies
Future of Education through Exponential and Emerging Technologies
 
Cloud Security - Emerging Facets and Frontiers
Cloud Security - Emerging Facets and FrontiersCloud Security - Emerging Facets and Frontiers
Cloud Security - Emerging Facets and Frontiers
 
Introduction to Blockchain Business Models
Introduction to Blockchain Business ModelsIntroduction to Blockchain Business Models
Introduction to Blockchain Business Models
 
Introduction to Blockchain Governance Models
Introduction to Blockchain Governance ModelsIntroduction to Blockchain Governance Models
Introduction to Blockchain Governance Models
 
Generational Adversarial Neural Networks - Essential Reference
Generational Adversarial Neural Networks - Essential ReferenceGenerational Adversarial Neural Networks - Essential Reference
Generational Adversarial Neural Networks - Essential Reference
 

Recently uploaded

H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 

Recently uploaded (20)

H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 

DEFCON28_2020_EthereumSecurity_PreventingDDoS_VDF

  • 1. DEFCON BlockVillage VDF for Preventing DoS / DDoS Attacks on Ethereum 2.0
  • 2. Agenda ● Who are We! ● Attack Vectors on Proof of Work ● DDoS on Ethereum ● Attack Vectors on Proof of Stake ● Ethereum 2.0 Overview ● Ethereum 2.0 Audit Findings ● DDoS on Ethereum 2.0 ● Randomness on Ethereum 2.0 ● Verifiable Delay Functions ● VDF and DDoS Prevention ● Our Approach ● Questions ● Appendix
  • 3. Who are we! ● Penetration Tester ● Blockchain Security Researcher ● Founder @ RazzorSec ● YouTuber @ Razzor Sharp ● Cybersec Enthusiast Tejaswa Rastogi Twitter @razzor_tweet
  • 4. Who are we! ● Founder of EPIC Knowledge Society ● Chief Scientist, Fusion Ledger ● Ambassador - Algorand, Aeternity ● Director - Tezos India Foundation ● MVP - Hedera Hashgraph ● Global Leader - XX Collective ● Programmer and Poet ● Blockchain Security Auditor ● Quantum Algorithm Architect ● Post Quantum Cryptography Researcher Gokul Alex GitHub - @gokulsan Twitter - @gokulgaze Reddit - @gokulbalex
  • 5. Attack Vectors on Proof of Work
  • 6. Attack Vectors on Proof of Work ● Distributed denial of service (DDoS) ● Transaction malleability attack ● Timejacking ● Routing attack ● Sybil attack ● Eclipse attack https://www.apriorit.com/dev-blog/578-blockchain-attack-vectors
  • 7. Some Other PoW Attacks *User wallet attacks:* ● Phishing ● Dictionary attacks ● Vulnerable signatures ● Flawed key generation ● Attacks on cold wallets ● Attacks on hot wallets https://www.apriorit.com/dev-blog/578-blockchain-attack-vectors
  • 8. Some Other PoW Attacks *Smart contract attacks:* ● Vulnerabilities in contract source code ● Vulnerabilities in virtual machines *Transaction verification mechanism attacks:* ● Finney attack ● Race attack ● Vector76 ● Alternative history attack ● 51% or majority attack https://www.apriorit.com/dev-blog/578-blockchain-attack-vectors
  • 9. Some Other PoW Attacks *Mining pool attacks:* ● Selfish mining ● Fork-after-withhold https://www.apriorit.com/dev-blog/578-blockchain-attack-vectors
  • 11. Invalid blocks on Parity Client Some Parity Ethereum nodes lost sync with the network because of the following incident - you send to a Parity node a block with invalid transactions, but valid header (borrowed from another block). The node will mark the block header as invalid and ban this block header forever but the header is still valid.
  • 12. Vulnerability in Parity Nodes In May, global hacking research collective SRLabs claimed that only two-thirds of the Ethereum client software that ran on Ethereum nodes had been patched against a critical security flaw discovered earlier this year. The data reportedly indicated that unpatched Parity nodes comprised 15% of all scanned nodes — implying that 15% of all Ethereum nodes were vulnerable to a potential 51% attack.
  • 13. Underpriced DDoS attacks - EXTCODESIZE Underpriced opcode vulnerability is due to the improper gas cost of EVM’s EXTCODESIZE opcode. Prior to the EIP 150 hard fork, the EXTCODESIZE opcode only charged 20 gas for reading a contract bytecode from disk and then deriving its length. As a consequence, the attacker can repeatedly send transactions to invoke a deployed smart contract with many EXTCODESIZE opcodes to cause a 2 - 3x slower block creation rate Paper - A Survey on Ethereum Systems Security: Vulnerabilities, Attacks and Defenses by Huashan Chen, Marcus Pendleton, Laurent Njilla, and Shouhuai Xu
  • 14. Underpriced DDoS attacks - SUICIDE This attack exploited the improper gas cost of EVM’s SUICIDE opcode(renamed to SELFDESTRUCT after EIP6) and the empty account in the State trie Vulnerability. Th opcode is meant to remove a deployed smart contract and send the remaining ether to the account designated by the caller. When the target doesn't exist a new account is created even though no Ether may be transferred. The attacker created 19 million new empty accounts via this opcode at low gas consumption, which wasted disk space and increased synchronisation and processing time Paper - A Survey on Ethereum Systems Security: Vulnerabilities, Attacks and Defenses by Huashan Chen, Marcus Pendleton, Laurent Njilla, and Shouhuai Xu
  • 15. Dead Accounts and Bloating State Database Certain transactions taking long time to process These transactions happened between blocks 2,286,910 and 2,717,576. Somebody took advantage of an underpriced opcode Creating millions of dead Ethereum accounts This had the effect of bloating the state database. It created tons of transaction traces.
  • 16. Impact of DDoS attacks Hacks against Geth client Hacks create huge amount of clean up transactions Each clean up transaction creates large set of traces Hard forks Hard forks do not remove the dead accounts
  • 17. Quick fixes to the DDoS Scanning an initial set of transactions Measuring the traces from each transaction Checking the frequency of traces in the transactions
  • 18. Attack Vectors on Proof of Stake
  • 19. Proof of Stake vs Proof of Work incentive to DDoS others is much higher in POW compared to POS (or specifically Casper). The reasons is that POW is a zero sum game where other miners gain the reward if some miners can not submit a block. Casper in contrast is designed as a coordination game where every participant gets most if all others can include their blocks. Better security against 51% attacks -High level goal of PoS is to ensure that each stakeholder chance of mining the next block is proportional to the number of coins they control.
  • 20. Attack against Proof of Stake ● xx% attack ● Fake Stake Attack ● Long Range Attack ● Nothing at Stake ● Sour Milk Attack Credit - Infosecinstitute.com
  • 22.
  • 23.
  • 24.
  • 25. Ethereum 2.0 Audit Findings
  • 27. Possible DDoS Attack Vectors DDoS attack through creating a mapping between public keys and validators’ IPs DDoS attack on Insecure gRPC connection ( Reported by Quantum Stamp Audit on Prysm ) https://github.com/prysmaticlabs/prysm/issues/6327
  • 28. QuantStamp Audit Quantstamp’s audit of Prysmatic Labs ETH 2.0 client involved ten engineers who examined the entire codebase over the course of two months. They examined the beacon node logic, validator client, slasher logic, libp2p networking layer, gRPC API, client database, account management and key storage, client synchronization, and more.
  • 29. QuantStamp Audit Findings Vulnerabilities found by Quantstamp engineers and addressed by Prysmatic Labs included: ● Granularity of timestamps ● Pseudo-random number generation ● Second preimage attacks on Merkle trees
  • 31. Audit findings on the Block Proposer System Single Secret Leader Election (SSLE) keeps the selection secret and stops the leak of information to an observer, while still allowing the chosen block proposer a fast way to verify to others that it is, in fact, the proposer. With the information leak patched, the block proposer remains as protected as it would be in PoW chains, but without the computational overhead. https://leastauthority.wpengine.com/static/publications/LeastAuthority-Ethereum-2. 0-Specifications-Audit-Report.pdf
  • 32. Audit Findings on the Gossip Protocol Gossip protocols generally suffer from the spam problem; without a centralized judge, it can be difficult to understand whether a message is legitimate or is spam that is meant to clog the network. This was one of the primary concerns in examining the networking layer. In Ethereum 2.0, when a node proposes a new finalized block, the block must be sent to the rest of the network. There is an issue when a dishonest node is capable of sending an unlimited amount of older block messages to the rest of the network with minimal penalty, allowing them to overwhelm the network and block legitimate messages.
  • 33. Audit Findings on the Slashing Messages Similarly, when a node violates the rules, other nodes send out slashing messages to notify the rest of the network about who to penalize. There is a a small loophole that allowed a node to send an unlimited amount of these types of messages with minimal penalty, causing the same message blocking if they sent enough of them. https://leastauthority.com/blog/ethereum-2-0-specifications/
  • 35. Teku Attack Scenario Two of four Teku nodes were targeted by five ordinary machines with a sustained DoS attack. Initial loss of finality was achieved with two or three machines, but the others joined within a few epochs to ensure that the network could not recover. https://github.com/ethereum/public-attacknets/issues/7#issuecomment-665966067
  • 36. Teku Attack Implementation > while true; do cat /dev/zero | pv -L 1M |nc XXX.XXX.XXX.XXX 9000 >/dev/null; done https://github.com/ethereum/public-attacknets/issues/7#issuecomment-665966067
  • 37. Impact of Teku Attack The effect that the DoS attack had on the attacknet was a prolonged loss finality and required manual intervention to restore the network to a healthy state once the attack stopped. The nodes under attack used large amounts of memory, were subject to multiple container restarts, had trouble staying connected to peers and one node's local clock was 20 mins slow. https://github.com/ethereum/public-attacknets/issues/7#issuecomment-665966067
  • 38. Teku Attack - Root Cause Firstly responding to one byte with multiple bytes is a vector for various amplification attacks but that wasn't the issue that caused the loss of finality. The second issue is that the responses were being written faster than they were read by the attacking peer and jvm-libp2p was not applying any throttling. Eventually TCP back pressure kicked in, filling up the OS write buffers and the responses wound up being queued in user space memory. This pushed up both the on and off heap memory usage very substantially. CPU also spiked significantly partly due to processing all those multi stream "messages" but mostly because of the resultant memory pressure and GC activity.
  • 39. Teku Attack - Solution Preventing this specific attack is straight forward, disconnect the peer immediately when an invalid (e.g. 0 length) multi stream message is received. Resilience to DOS attacks increases significantly as you increase the number of nodes and diversity of clients, locations and network connections https://github.com/ethereum/public-attacknets/issues/7#issuecomment-665966067
  • 41. Sharding, Staking and Randomness Almost all sharding designs today rely on some source of randomness to assign validators to shards. Both the randomness and the validators assignment require computation that is not specific to any particular shard. For that computation, existing sharding designs have a separate blockchain that is tasked with performing operations necessary for the maintenance of the entire network.
  • 42. Sharding, Staking and Randomness Besides generating random numbers and assigning validators to the shards, these operations often also include receiving updates from shards and taking snapshots of them, processing stakes and slashing in Proof-of-Stake systems, and rebalancing shards when that feature is supported. Such chain is called a Beacon chain in Ethereum and Near, a Relay chain in PolkaDot, and the Cosmos Hub in Cosmos.
  • 43. Distributed Randomness on Blockchain Many modern blockchain protocols rely on a source of randomness for selecting participants that carry out certain actions in the protocol. If a malicious actor can influence such source of randomness, they can increase their chances of being selected, and possibly compromise the security of the protocol. Distributed randomness is also a crucial building block for many distributed applications built on the blockchain.
  • 44. Essential Properties of Randomness Three essential properties for distributed randomness on-chain : 1. It needs to be unbiased. In other words, no participant shall be able to influence in any way the outcome of the random generator. 2. It needs to be unpredictable. In other words, no participant shall be able to predict what number will be generated (or reason about any properties of it) before it is generated. 3. The protocol needs to tolerate some percentage of actors that go offline or try to intentionally stall the protocol.
  • 45. RANDAO approach The general idea is that the participants of the network first all privately choose a pseudo-random number, submit a commitment to such privately chosen number. All agree on some set of commitments using some consensus algorithm, then all reveal their chosen numbers, reach a consensus on the revealed numbers, and have the XOR of the revealed numbers to be the output of the protocol.
  • 46. Limitations of the RANDAO approach It is unpredictable, and has the same liveness as the underlying consensus protocol, but is biasable. Specifically, a malicious actor can observe the network once others start to reveal their numbers, and choose to reveal or not to reveal their number based on XOR of the numbers observed so far. This allows a single malicious actor to have one bit of influence on the output, and a malicious actor controlling multiple participants have as many bits of influence as the number of participants they are controlling.
  • 47. RANDAO + VDF Approach To make RANDAO, un-biasable, one approach would be to make the output not just XOR, but something that takes more time to execute than the allocated time to reveal the numbers. If the computation of the final output takes longer than the reveal phase, the malicious actor cannot predict the effect of them revealing or not revealing their number, and thus cannot influence the result. Such a function that takes a long time to compute, is fast to verify the computation, and has a unique output for each input is called a verifiable delay function (VDF for short) and it turns out that designing one is extremely complex.
  • 48. Ethereum Perspective on RANDAO + VDF Ethereum presently plans to use RANDAO with VDF as their randomness beacon. Besides the fact that this approach is unpredictable and unbiasable, it has an extra advantage that is has liveness even if only two participants are online (assuming the underlying consensus protocol has liveness with so few participants). For the family of VDFs linked above a specialized ASIC can be 100+ times faster than conventional hardware. Thus, if the reveal phase lasts 10 seconds, the VDF computed on such an ASIC must take longer than 100 seconds to have 10x safety margin, and thus the same VDF computed on the conventional hardware needs to take 100 x 100 seconds = ~3 hours.
  • 49. Threshold Signatures This approach is pioneered by DFNITY, is to use threshold BLS signatures. Boneh–Lynn–Shacham (BLS) signature scheme allows a user to verify that a signer is authentic. The scheme uses a bilinear pairing for verification, and signatures are elements of an elliptic curve group. BLS signatures is a construction that allows multiple parties to create a single signature on a message, which is often used to save space and bandwidth by not requiring sending around multiple signatures. A common usage for BLS signatures in blockchains is signing blocks in BFT protocols.
  • 50. Threshold Signatures in Practice Say 100 participants create blocks, and a block is considered final if 67 of them sign on it. They can all submit their parts of the BLS signatures, and then use some consensus algorithm to agree on 67 of them and then aggregate them into a single BLS signature. Any 67 parts can be used to create an accumulated signature, however the resulting signature will not be the same depending on what 67 signatures were aggregated.
  • 51. Threshold Signatures in Practice Turns out that if the private keys that the participants use are generated in a particular fashion, then no matter what 67 (or more, but not less) signatures are aggregated, the resulting multisignature will be the same. This can be used as a source of randomness: The participants first agree on some message that they will sign (it could be an output of RANDAO, or just the hash of the last block, doesn’t really matter for as long as it is different every time and is agreed upon), and create a multisignature on it. Until
  • 52. Limitations of Threshold Signatures This approach to randomness is completely unbiased and unpredictable, and is live for as long as 2/3 of participants are online (though can be configured for any threshold). While ⅓ offline or misbehaving participants can stall the algorithm, it takes at least ⅔ participants to cooperate to influence the output. The private keys for this scheme need to be generated in a particular fashion. The procedure for the key generation, called Distributed Key Generation, or DKG for short, is extremely complex and is an area of active research.
  • 53. RandShare approach RandShare is an unbiased and unpredictable protocol that can tolerate up to ⅓ of the actors being malicious. It is relatively slow, and the paper linked also describes two ways to speed it up, called RandHound and RandHerd, but unlike RandShare itself, RandHound and RandHerd are relatively complex. The general problems with RandShare besides the large number of messages exchanged (the participants together will exchange O(n^3) messages), is the fact that while ⅓ is a meaningful threshold for liveness in practice, it is low for the ability to influence the output. There are several reasons for it:
  • 54. RandShare approach 1. The benefit from influencing the output can significantly outweigh the benefit of stalling randomness. 2. If a participant controls more than ⅓ of participants in RandShare and uses this to influence the output, it leaves no trace. Thus a malicious actor can do it without ever being revealed. Stalling a consensus is naturally visible. 3. The situations in which someone controls ⅓ of hashpower / stake are not impossible, and given (1) and (2) above someone having such control is unlikely to attempt to stall the randomness, but can and likely will attempt to influence it.
  • 55. NEAR protocol approach 1. Each participant comes up with their part of the output, splits it into 67 parts, erasure codes it to obtain 100 shares such that any 67 are enough to reconstruct the output, 2. Assigns each of the 100 shares to one of the participants and encodes it with the public key of such participant. They then share all the encoded shares. 3. The participants use some consensus (e.g. Tendermint) to agree on such encoded sets from exactly 67 participants.
  • 56. NEAR protocol approach 1. Once the consensus is reached, each participant takes the encoded shares in each of the 67 sets published this way that is encoded with their public key, then decodes all such shares and publishes all such decoded shares at once. 2. Once at least 67 participants did the previous step, all the agreed upon sets can be fully decoded and reconstructed, and the final number can be obtained as an XOR of the initial parts the participants came up with in (1). 3. The idea why this protocol is unbiasable and unpredictable is similar to that of RandShare and threshold signatures: the final output is decided once the consensus is reached, but is not known to anyone until ⅔ of the participants decrypt shares encrypted with their public key.
  • 58. Anatomy of a VDF A VDF consists of a triple of algorithms: Setup, Eval, and Verify. Setup (λ, t) takes a security parameter λ and delay parameter t and outputs public parameters pp (which fix the domain and range of the VDF and may include other information necessary to compute or verify it). Eval (pp, x) takes an input (x) from the domain and outputs a value (y) in the range and (optionally) a short proof π. Finally, Verify (pp, x, y, π) efficiently verifies that y is the correct output on x. Crucially, for every input x there should be a unique output y that will verify.
  • 59. Historic references to VDF for DDoS prevention To prevent email spamming, in the early 1990s, Cynthia Dwork and Moni Naor suggested using squaring roots over finite fields puzzles as functions which take a predetermined time to compute, and are straightforward to verify. However, their work was considered impractical because one has to use rather large finite fields to make the algorithm useful, and the libraries for handling multiple precision arithmetic at the time of the suggestion of the algorithm were orders of magnitude slower than current ones.
  • 60. Essential Properties of VDF Sequential: honest parties can compute (y,π) ← Eval(pp,x) in (t) sequential steps, while no parallel-machine adversary with a polynomial number of processors can distinguish the output y from random in significantly fewer steps. Efficiently verifiable: We prefer Verify to be as fast as possible for honest parties to compute; we require it to take total time - O(polylog(t)). Unique: for all inputs x, it is difficulty to find a y for which Verify (pp,x,y,π) = Yes, but y ∕ = Eval(pp, x).
  • 61. Additional Properties of VDF Decodable - A VDF is decodable if there exists a decoding algorithm Dec such that (Eval,Dec) form a lossless encoding scheme. Incremental - A single set of public parameters (pp) supports multiple hardness parameters (t). The number of steps used to compute (y) is specified in the proof, instead of being fixed during Setup. The main benefit of incremental VDFs over a simple chaining of VDFs to increase the delay is a reduced aggregate proof size. This is particularly useful for applications of VDFs to computational time-stamping or blockchain consensus.
  • 62. Main VDF Constructions There are currently three candidate constructions that satisfy the VDF requirements. Each one has its own potential downsides. The first was outlined in the original VDF paper by Boneh, et al. and uses injective rational maps. However, evaluating this VDF requires a somewhat large amount of parallel processing, leading the authors to refer to it as a “weak VDF.” Later, Pietrzak and Wesolowski independently arrived at extremely similar constructions based on repeated squaring in groups of unknown order. These constructions are based on modular exponentiations, where Pietrzak and Wesolowski suggest to iteratively compute τ squarings in an RSA group, with τ large.
  • 63. Innovations in VDF The main innovation in VDF is to propose a setup phase to set a trusted environment allowing the functions to be universally verifiable. This trusted environment sets the public parameters of the VDF, including its difficulty which determines the amount of time spent on computing. Any node who needs to solve the VDF will use the public parameters to perform certain sequential computations. Some VDFs also allow generating a proof to facilitate the verification from the other participants.
  • 64. VDF and DDoS Prevention
  • 65. IOTA Approach A DoS prevention mechanism where nodes are required to compute exactly τ modular squarings of a given input message Calibrating the VDF evaluation time on different hardware and optimising the time needed to verify the correctness of the puzzle through multi-exponentiation techniques Extensive experimental evaluations to compare VDFs and PoW on different hardware. In particular show that larger monetary resources cannot help to speed up the VDF evaluation https://arxiv.org/pdf/2006.01977.pdf
  • 66. IOTA DoS Prevention Mechanism ● Evaluation - When node i decides to generate transaction n, it is required to solve a VDF such that its input is the hash of transaction n − 1 issued by the same node. ● Proof - Node i also generates a proof to facilitate the verification task, which gossips along with the transaction. ● Verification - When a new transaction is received, node j verifies whether the VDF has been solved correctly. If yes, it forwards the transaction (and the proof) to its neighbors, or discards it otherwise. https://arxiv.org/pdf/2006.01977.pdf
  • 67. VDF Integration in the IOTA protocol
  • 68. Public Inputs ● VDF Difficulty - A difficulty which indicates the number of sequential operations to solve and can be updated accordingly to mitigate attacks ● RSA Module - A modulus N = p · q which has bit-length λ (typically 1024, 2048, or 3072), and is the product of two prime numbers of the same order. The security of the entire mechanism relies on the length of N: the longer is the modulus, the more difficult is to find its factorization ● Cryptographic hash function - A hash function that will be used in the evaluation and proof of VDF https://arxiv.org/pdf/2006.01977.pdf
  • 70. Our Architecture Overview Supersingular Isogeny based VDFs VDF based single secret leader selection VDF based Random Oracles VDF based delay authentication to the RANDAO Randomness ( Randshare and Randhound) powered beacon chain
  • 71. Solution Architecture Framework for our approach Random Oracles Random Oracles Isogeny based VDF Generator Random Oracles Beacon Chain with Secret Leader Self Selection and Delay Authentication Random Oracles Random Oracles Random Oracles Main Chain with RANDAO based Validator Network and One Time Signature Shard Chains with RandHound and RandShare with Proximity Verification
  • 72. TemerNet - Our Proof of Concept for Random Oracle https://github.com/EPICKnowledgeSociety/TemereNet pragma solidity ^0.5.2; import "github.com/starkware-libs/veedo/blob/master/contracts/BeaconContract.sol"; contract Beacon{ function getLatestRandomness()external view returns(uint256,bytes32){} } contract WeatherOracle { address public oracleAddress; address public BeaconContractAddress=0x79474439753C7c70011C3b00e06e559378bAD040; constructor (address _oracleAddress) public { oracleAddress = _oracleAddress; }
  • 73. TemerNet - Our Proof of Concept for Random Oracle https://github.com/EPICKnowledgeSociety/TemereNet function setBeaconContractAddress(address _address) public { BeaconContractAddress=_address; } function generateRandomNumber() public view returns(bytes32){ uint blockNumber; bytes32 randomNumber; Beacon beacon=Beacon(BeaconContractAddress); (blockNumber,randomNumber)=beacon.getLatestRandomness(); return randomNumber; }
  • 74. Single Secret Leader Election (SSLE) In a Single Secret Leader Election (SSLE), a group of participants aim to randomly choose exactly one leader from the group with the restriction that the identity of the leader will be known to the chosen leader and nobody else. At a later time, the elected leader should be able to publicly reveal her identity and prove that she has won the election. The election process itself should work properly even if many registered users are passive and do not send any messages. Among the many applications of SSLEs, their potential for enabling more efficient proof-of-stake based cryptocurrencies have recently received increased attention. https://eprint.iacr.org/2020/025.pdf
  • 75. Node Topology in Shard Chain using VDF Every node is connected to m << n neighbours and is involved in the generation and the verification of transactions, which simply carry proof carrying data (PCD). It is important to limit the shard creation as a node could theoretically generate an infinite number of transactions per second, without an appropriate access control mechanism. Every node has to evaluate a function (f) before issuing a transaction.
  • 76. Isogeny based VDF If we have two elliptic curves (E1 and E2), we can create a function that maps point (P) on E1 to a point Q on E2. This function is known as an isogeny. If we can map this function, every point on E1 can then be mapped to E2. Our secret key is then the isogeny, and the public key is the elliptic curve that we are using. With isogenous elliptic curves we thus do not deal with a single elliptic curve but a family of them. http://blog.intothesymmetry.com/2019/07/on-isogenies-verifiable-delay-functions.html
  • 77.
  • 78.
  • 79. Construction of an Isogeny based VDF Setup: the setup phase of this VDF consists of Choosing a prime number N Selecting a supersingular curve E Performing a random non-backtracking walk of length T having as outcome the isogeny ϕ and it's dual ϕ^ (every isogeny has a dual isogeny). Choosing a point P and compute ϕ(P) Output ϕ^,E,E′,P,ϕ(P)
  • 80.
  • 81. Evaluation and Verification of an Isogeny based VDF Evaluation : Receiving a random point Q > Compute ϕ^(Q) Verification : Use the Weil pairing and isogenies to verify eN(P,ϕ^(Q)) = eN(ϕ(P),Q) http://blog.intothesymmetry.com/2019/07/on-isogenies-verifiable-delay-functions.html
  • 82. Our Roadmap ● Implementation of Isogeny VDF Key Exchange using PQCrypto-SIDH ○ https://github.com/microsoft/PQCrypto-SIDH ● Implementation of Isogeny VDF Authentication using SS Isogeny ○ https://github.com/defeo/ss-isogeny-software ● Implementation of Single Secret Leader Selection using Mathcrypto ○ https://github.com/mathcrypto/SSLES ● Deployment of our Isogeny VDF with RANDAO ○ https://github.com/randao/randao
  • 84. What would be a trivial VDF ? A trivial delay function can be built by iterating a cryptographic hash function. For example, it is reasonable to assume it is infeasible to compute 240 iterations of SHA-256 in a matter of seconds, even using specialized hardware. However, a lottery participant wishing to verify the output of this delay function must repeat the computation in its entirety (which might take many hours on a personal computer). Ideally, we would like to design a delay function which any observer can quickly verify was computed correctly.
  • 85. VDF and PoW VDFs are functions that require a preset number of iterations to complete. Unlike PoW, in VDFs there is no trivial way to verify whether a node has correctly solved While VDFs and Proof of Work (PoW) both aim the evaluator to spend some time to compute a puzzle, the former is mainly based on sequentially computing a function (iterative squaring in RSA groups or points addition in elliptic curves, which cannot be parallelized, making specialized hardware not able to substantially speed up the puzzle computation.
  • 86. VRF and VDF VRF is secure after selection, i.e. needs checking. RANDAO and RANDAO + VDF are secure ahead of time. You know the number will be random without checking. In Ethereum, where there will potentially be hundreds of thousands of people validating, it would be incredibly difficult to check all the VRF rolls, but with VDF there's only one thing to check against the incoming blocks. So VRF, you get blocks, then check them along with the proof submitted by the validator. With VDF, blocks get checked against the random roll that's common for everyone. Additional proof per block not needed.
  • 87. Pietrzak VDF Scheme To set up the VDF, choose a time parameter T, a finite abelian group G of unknown order, and a hash function H from bytes to elements of G. Given an input x, let g = H(x) evaluate the VDF by computing y = g2T
  • 88. IOTA Approach Evaluator node uses its last transaction as the input for the new VDF Verifier node receives the transaction and proof from the node Verifier node verifies the correctness of the VDF
  • 89. Weslowski Construction in IOTA The Wesolowski scheme assumes the existence of groups that satisfy something called the adaptive root assumption, which is not well studied in the mathematical literature.
  • 90. IOTA Approach Best Practices Each time a node decides to issue a transaction, it has to evaluate a VDF. The evaluation takes as an input a binary message m ∈ {0,1}∗, which we enforce to be the previous transaction issued by the same node. In this way, the protocol ensures the sequentiality of the VDFs evaluations because a node has to wait for a VDF to complete before starting a new evaluation. In other terms, it is not possible to evaluate several VDFs in parallel to overcome node’s allowed throughput.
  • 91.
  • 92. What could happen in a DDoS During DDoS, the website is flooded with queries executed by a distributed network of malware-infected computers (botnet). Eventually, the servers run out of resources. DDoS attacks could be a a smokescreen, scammers try to execute even more dangerous security breaches — for example, to access the control panel of the website through an attack on the site administrator, or to mass mail a link containing an attack vector to the stakeholders.
  • 93. Taxonomy of Attacks Volume based attacks HTTP flood Protocol attacks
  • 94. Volume based attacks happen when the number of queries is so high that it saturates the bandwidth of the attacked site and drains the network capacity.
  • 95. HTTP flood is main load is on the app server. Here it is crucial to separate bots from real users: installing cookies, javascript or flash flags, captcha.
  • 96. Protocol attacks drain actual server resources or the resources of firewalls and load balancers
  • 97. These attacks exploited both application layer and data layer vulnerabilities
  • 99. Ironic position of EXTCODESIZE The first sign of trouble was when geth nodes started to crash in the network due to lack of memory on a specific block. The postmortem showed that the underlying problem involved Ethereum’s EXTCODESIZE attribute, which is included in each transaction by design. This results in much slower transaction confirmations. The net result of the Ethereum DDoS attack was a reduction in the rate of block creation by a factor of two or three.
  • 100. Ironic position of EXTCODESIZE This is due to the EXTCODESIZE opcode, which has a fairly low gasprice but which requires nodes to read state information from disk; the attack transactions are calling this opcode roughly 50,000 times per block. The consequence of this is that the network is greatly slowing down, but there is NO consensus failure or memory overload. An attacker could use this attribute to ask for additional checks against the Ethereum network database — up to 50,000 at a time.