Dmitriy Ryajov
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
**A common problem in storage systems is guaranteeing that a remote party is storing the data it committed to, with the expected level of redundancy. There is a class of attacks characterized by the storing party pretending to store something $N$ number of times or hold $N$ number of copies, while in reality, storing much less than $N$ and downloading and reconstructing the required pieces on demand from a third party.** For example, a Sybil attacker would control a large number of identities in the network and pretend to store data with some level of redundancy, while in reality, only storing it once. A generation attack would store a subset of the data and only regenerate it on the fly. Both attacks compromise the redundancy of the data and for the purpose of this note, we will refer to them as **outsourcing attacks**. The question then is, how do we ensure that the redundancy levels aren't compromised through some version of an outsourcing attack? Or more precisely, how do we ensure that each instance of erasure-coded data is stored in full? ## Proofs of Replication Proof of Replication (PoRep) is a type of proof of storage that combines Proofs of Space and Proofs of Retrievability. Fundamentally, PoRep attempts to demonstrate that there are $K$ unique instances of the exact same data, thereby **preventing data deduplication**. However, PoRep is not always suited for erasure-coded systems and arguably has a number of other drawbacks. For example, it relies on complex and computationally heavy mechanisms to achieve its goals. In Filecoin, this process is called **sealing** and it's intentionally computationally intensive. It also renders the sealed data inaccessible without reversing the process, which makes data access and retrieval a major source of issues in the Filecoin network. While we could adapt PoReps to an erasure-coded setup, the complexity and overhead don't align well with our focus on a more practical and lightweight approach. Nevertheless, PoReps are a useful model to analyze and understand the underlying problem. ## High-Level Problem Overview As stated above, we want to prevent cheating nodes from pretending to store data they in fact aren't, either in full or in part. A common way of accomplishing this, used in replicated systems, is to make each instance demonstrably unique, such that there are objectively $K$ out of $K$ distinct instances of the exact same data. However, one immediately apparent thing, is that uniqueness in erasure-coded systems isn't enough. In an erasure-coded system, there are distinct segments or pieces that can be used to reconstruct another distinct piece or segment on demand, and efficient reconstruction from any $K$ subset of the pieces is a major goal. Thus, any mechanism applied to erasure coded systems, should at the very least allow recovery from a minimal subset of pieces or segments. More succinctly, we're looking for: - Demonstrable uniqueness across each instance - Prevention of on-the-fly reconstruction through controlled reconstruction, but don't disallow it completely ## Data Layout and Distribution It's worth outlining the different possible ways that erasure-coded datasets can be structured and the data distributed. We assume that all the erasure coding is systematic, that is, the original pieces are in plaintext and don't require decoding. 1. **Fully Replicated EC**: An erasure-coded dataset $D'$ is replicated across $N$ nodes in the network. This is similar to replication, but with the advantage that **any** $K$ pieces from any of the replicas can be used to reconstruct the original datasets. In this case, each erasure-coded dataset needs to be instantiated separately to prevent deduplication, just as in the case of straightforward replication. 2. **Segmented EC**: A dataset $D$ that is erasure-coded into $D' = {d_1, d_2, \ldots, d_n}$, where $d_n$ are segments that are distributed across $N$ distinct nodes and any $dK$ distinct segments can reconstruct $D'$ from which the segment can be derived. 3. **Segmented EC with local redundancy**: A variation of the above case could also additionally erasure code each segment, for example, to enhance recoverability or as part of PoR proving. 4. **Fully Replicated Segmented EC**: The last case is a replicated version of the previous two, where the same erasure-coded dataset $D' = {d_1, d_2, \ldots, d_n}$ and its segments are replicated multiple times across groups of $N$ nodes. ## Attack Strategies - **Download** - download all the pieces, without reconstructing - **Reconstruct** - reconstruct all the pieces, without downloading - **Download and Reconstruct** - download just enough to reconstruct Under **Fully Replicated EC** (1), an attacker can drop a part of the file and reconstruct from the remaining pieces or download them wholesale; or it can drop the entire file and download all the pieces or download enough and reconstruct. This setup allows the attacker to execute any combination of the available strategies. In **Segmented EC** (2), the attacker has fewer options. If an attacker intentionally dropped its segment, it would require downloading $K$ segments from $K$ nodes and reconstructing the entire file, before recovering its own segment. This seems to be the least favorable setup for an attacker. However, if the segments are additionally erasure-coded (3), then the attacker could still execute the **Reconstruct** strategy on the local segment. The last case, **Fully Replicated Segmented EC** (4), allows the attacker to also apply a combination of all three strategies. If there are other nodes with exactly the same segment, the attacker could attempt to drop the entire file and download the full segment; or download enough of it to reconstruct. It could also drop a part of the segment and attempt to reconstruct locally. ## High-Level System Requirements Of course, the types of attacks described here are only rational under certain conditions, thus it is crucial to understand the system and its requirements before outlining a solution. As mentioned above, we're interested in these types of attacks in the context of Erasure Coded Decentralized Storage Networks (DSN). Specifically, we're interested in public DSNs where both auditability and reconstruction work without possession of private information, such as a private key. In other words, anyone should be able to audit a storage provider and similarly anyone should be able to reconstruct the data, without possession of any private information. Thus, the high-level requirements are: - Guarantees uniqueness and thus deduplication - Doesn't complicate data retrieval - Has acceptable setup costs - Keeps erasure coding properties mostly intact In addition to the above, we also want public auditability and reconstruction. A common approach in erasure-coded systems is to encrypt the parity bits of the erasure-coded data, this keeps the clear text bits intact allowing for easy retrieval. This type of approach is often used to prevent adversarial erasure attacks, where a malicious node attempts to erase pieces strategically to pass audits and remain undetected. Encrypting the parity bits is a common way of achieving this, however, without clear timing guarantees, it might still be susceptible to generation attacks. Using a symmetric private key would address this to some extent, but it makes public reconstruction impossible, thus making it inviable in the public setting. Another approach is to use public-key cryptography, but then again, without clear timing guarantees, this makes it vulnerable to generation attacks. As we can see, in the case of public reconstruction, this is impossible to achieve without clear timing guarantees. Another important aspect that encryption brings into the fold is the rationality of the attack. Clearly, if the key is much smaller than the stored data, then it would make it rational to try to store only the key, even when the timing guarantees are well defined. On the other hand, if the key is as large as the data, then keeping the key around becomes impractical, even when the timing restrictions can be overcome. This is an interesting property that can be used to our advantage. ## Solution Sketch Encrypting the parity bits seems like a viable approach if 2 main conditions are met: a) re-encryption is well-timed, for example by making key generation itself, time-bound as well, and b) discouraging caching of the encryption key. In PoRep, it isn't uncommon to require many hours of intensive computation to strengthen the system against timing attacks, however, this makes setup often much less practical and undesirably long to complete. The solution proposed here, on the other hand, attempts to balance the overall safety of the scheme and its practicality, especially in terms of setup costs that might be shared between the client and provider. In short, we use a key as large as the encrypted data, which is itself generated on demand with well-defined timing assumptions. Making the key as large as the data, makes it irrational to store the key for later re-use and timing the key generation, allows us to prevent regeneration of the key on the fly. There is a clear tradeoff in favor of making the scheme storage vs computation bound, which avoids the potentially heavy computation required by PoRep-like systems. ## The Solution The solution proposed consists of encrypting the parity data using a **One-time Pad**-like encryption scheme. An OTP key is at least as large or larger than the encrypted data and is well suited for this case. In OTP, each bit of plaintext is XORed with a bit of a pre-shared key that is completely random, used only once, and then destroyed. In our case, we do not care about the key being private and single-use, in fact, we want the key to be reusable such that it allows anyone to recover the data, provided they are willing to spend the time and resources to do so. However, the key generation has to be well-timed such that an attacker cannot quickly regenerate it on demand, which would defeat the purpose of the scheme. The setup described below is assumed to be done by a trusted party, such as the owner of the data, who performs both the key generation and commitment $Com$ to the data. For a setup performed by an untrusted party, a verifiable delay function ($VDF$) might be required to time the key generation, in addition to an outsourceable commitment scheme. In the case of the trusted party, a simple iterative hashing approach should suffice. At a high level, it works as follows. Take the data $D$, erasure code it with a systematic erasure code that produces parity data $P$ and leaves the original data $D$ in plaintext. Next, we use publicly known but unique entropy $e$ as a seed for a collision-resistant hashing function $H(e)$ that runs iteratively $[N \ge \frac{|P|}{\text{len}(H)}]$ number of steps, such that the output from the previous step is used as the input to the next and each output is concatenated into a file $F_\text{key}$. The process runs until $|F_\text{key}|\ge|P|$. Next, perform a $XOR$ of $P$ and $F_\text{key}$ to produce $P'$, such that $P' = P \oplus F_{\text{key}}$. Once we have $P'$, we commit to both the plaintext $D$ and the encoded parity $P'$, such that $[Com=D||P']$. This results in three key components, 1) the erasure coded data itself, 2) the encoding key $F_\text{key}$ and 3) a commitment $Com$ to the systematic data $D$ and encrypted parity $P'$. ## Analysis The advantage of our approach is that it combines both timing assumptions with storage hardness. In contrast to PoRep, where the setup (or sealing) process is extremely resource-intensive to discourage even the most powerful attackers from attempting to repeat it more than once, our approach allows relaxing the computational requirements by making the scheme storage-bound in addition to also being computationally bound. This is achieved by having a key as large as the encoded data, which renders storing the key instead of the actual encrypted data irrational. One major drawback is the fact that the parity bits need to be as large or larger than the original bits, otherwise, if they're significantly smaller then it would still be rational to only keep the parity bits and attempt to download the original bits on demand. For example, with a rate $r \gt 0.5$, there are fewer parity bits than original bits, which makes it possible to only store the encoded bits and download the clear text ones. This can be avoided by encoding the original and parity bits with the OTP-like key, which could make this scheme a full-fledged PoRep that relies on storage hardness in addition to computational hardness. Of course this would complicate retrieval and recovery, by requiring the encryption key to be always available, thus this approach seems less practical. ## Conclusion While PoRep attempts to provide reasonable guarantees against some outsourcing attacks in DSNs, they suffer from significant computational overhead and are impractically time-bound. Our proposed solution attempts to overcome this limitations by making the key as large as the encoded data and the key generation reasonably (e.g. more than the verification window) time-bound. However, it's important to keep in mind that this scheme isn't a direct replacement for PoRep. Although it emulates certain aspects of it, it isn't a complete Proof of Storage (PoSt) mechanism, as is the case with PoReps. In our case, proving storage possession not a direct goal and we focus on preventing outsourcing attacks under the **rational node** assumption and it's thus objectively weaker than PoRep as it is presented here.

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully