Skip to main content

Python package for efficient dispersal of information that breaks a file of length N into n pieces, each of length N/m, so that every m pieces are sufficient to reconstruct the original file.

Project description

IDA

This is a library that implements the Information Dispersal Algorithm (IDA) introduced in [1]. IDA breaks up a file of size N into n fragments, each of size N/m such that the original file can be recovered from any m of these fragments. Note that after IDA splits the file, the total size of all the fragments is(n/m)N. The parameters n and m can be chosen such that their ratio is close to 1, and hence, the total size of all the fragments after splitting the original file is close to the size of the original file, making IDA space-efficient.

[1] Rabin, Michael O. "Efficient dispersal of information for security, load balancing, and fault tolerance." Journal of the ACM (JACM) 36.2 (1989): 335-348.

Installation

Use the package manager pip to install IDA.

pip install IDA-pkg

Issues

  • Warning: currently only works with small files!

Examples

The following is a simple example. That is, we split a file into 10 fragments such that any 5 of them are sufficient to recover the original data.

import IDA
fragments = IDA.split("test.txt", 10, 5) 

To reassemble the file, we take any 5 of the fragments, e.g., we take the first five fragments, then the following will return the content of the original file as a string.

import IDA
IDA.assemble(fragments[:5]) 

You can also write the output to a file.

IDA.assemble(fragments[:5], "output.txt") 

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

IDA-pkg-0.0.2.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

IDA_pkg-0.0.2-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file IDA-pkg-0.0.2.tar.gz.

File metadata

  • Download URL: IDA-pkg-0.0.2.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for IDA-pkg-0.0.2.tar.gz
Algorithm Hash digest
SHA256 c2a0c4a1a1f62cc8a5e3f97db8085331fb3a1c89db48847e6f782a4fba2eacfa
MD5 82802c460440a47d590b884a937c5a97
BLAKE2b-256 e7d50e4a41fb5e679f1727d7ef5134bfd523d3e16d06c8be86020621f5fab9f3

See more details on using hashes here.

File details

Details for the file IDA_pkg-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: IDA_pkg-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for IDA_pkg-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1f071d2e841c3a8239dcf7b94ee58fde26467e1a33ddbcf126355263b32c6c51
MD5 2f3edad208164cbeb727a0dd23dfa95f
BLAKE2b-256 cb6bfce50fa1069f94aa254b65f4c0c515354e519bc82963f80d4cf22cfc655d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page