Reed-Solomon Decoder.
More...
#include <rsdecoder.h>
|
| RSDecoder () |
| GF2E Constructor. More...
|
|
| RSDecoder (const ZZ &p1, const ZZ &p2) |
| ZZ_p Constructor. More...
|
|
bool | Recover (dbsize_t bytes_per_word, nservers_t t, nservers_t h, const vector< nservers_t > &goodservers, const vector< vector< vec_F > > &values, const vec_F &server_indices, vector< vector< DecoderResult< F > > > &results, vector< std::set< dbsize_t > > &decoded, const vector< vec_F > &vec_interp_indices, const nqueries_t multi_only=0) |
| The main method to do the Reed-Solomon Decoding. More...
|
|
|
static string | append (const string &s, const F &wz, unsigned int bytes_per_word) |
| A helper function to append an element of F to a string. More...
|
|
static void | test_interpolate (unsigned short t, const vec_F &values, const vec_F &indices, const vector< unsigned short > &I, const vector< unsigned short > &G, unsigned short &numagree, unsigned short &numdisagree, vector< unsigned short > &vecagree, FX &phi) |
| Interpolate some points I and check how many points G agree with the result. More...
|
|
template<class F, class vec_F, class FX, class FXY, class mat_F>
class RSDecoder< F, vec_F, FX, FXY, mat_F >
Reed-Solomon Decoder.
The main RSDecoder class, genericized to work over different types of fields.
- Template Parameters
-
F | The field used for decoding. |
vec_F | Vectors over the field F. |
FX | Univariate polynomials over the field F. |
FXY | Bivariate polynomials over the field F. |
mat_F | Matrices over the field F. |
GF2E Constructor.
Call this constructor for GF2E. Be sure to call GF2E::init as well, with an appropriate polynomial modulus.
ZZ_p Constructor.
Call this constructor for ZZ_p. p2 should be prime, and p1 should be either prime or 1. The modulus used is p1*p2.
static string append |
( |
const string & |
s, |
|
|
const F & |
wz, |
|
|
unsigned int |
bytes_per_word |
|
) |
| |
|
static |
A helper function to append an element of F to a string.
It's public and static so that EasyRecover can use it.
- Parameters
-
s | The string to append to. |
wz | The fields element to append to the string. |
bytes_per_word | The number of bytes each word uses. |
- Returns
- The string s appended with wz.
bool Recover |
( |
dbsize_t |
bytes_per_word, |
|
|
nservers_t |
t, |
|
|
nservers_t |
h, |
|
|
const vector< nservers_t > & |
goodservers, |
|
|
const vector< vector< vec_F > > & |
values, |
|
|
const vec_F & |
server_indices, |
|
|
vector< vector< DecoderResult< F > > > & |
results, |
|
|
vector< std::set< dbsize_t > > & |
decoded, |
|
|
const vector< vec_F > & |
vec_interp_indices, |
|
|
const nqueries_t |
multi_only = 0 |
|
) |
| |
The main method to do the Reed-Solomon Decoding.
- Parameters
-
bytes_per_word | The number of bytes each word uses. |
t | The privacy level. I.e. the maximum number of servers that can collude without breaking privacy. |
h | The number of honest servers. |
goodservers | The indices of the servers that did not act up. |
values | The server shares. Indexed by query then by word. |
server_indices | The indices used for server shares. |
results | The decoding results for each query. Will be filled as decoding occurs. |
decoded | For each query, the words that have been successfully decoded. Will be updated as decoding occurs. |
vec_interp_indices | The indices corresponding to each block requested. |
multi_only | The number of queries that should only be processed using multi-query decoding. The first multi_only queries were previously attempted, were not successfully decoded and were saved for multi-query decoding. |
- Returns
- Return true if all queries were decoded, false otherwise.
void test_interpolate |
( |
unsigned short |
t, |
|
|
const vec_F & |
values, |
|
|
const vec_F & |
indices, |
|
|
const vector< unsigned short > & |
I, |
|
|
const vector< unsigned short > & |
G, |
|
|
unsigned short & |
numagree, |
|
|
unsigned short & |
numdisagree, |
|
|
vector< unsigned short > & |
vecagree, |
|
|
FX & |
phi |
|
) |
| |
|
static |
Interpolate some points I and check how many points G agree with the result.
Set phi to the degree-t polynomial which interpolates the (indices,values) pairs indexed by I. Check which (indices,values) pairs indexed by G agree and disagree with phi, and set numagree, numdisagree, and vecagree accordingly.
- Parameters
-
t | The degree of the interpolating polynomial. |
values | The values of the points. |
indices | The indices of the points. |
I | The indices of the points to interpolate. |
G | The indices of the points to check with phi. |
numagree | Number of points in G that agree with phi. |
numdisagree | Number of points in G that do not agree with phi. |
vecagree | The indices of the points in G that agree with phi. |
phi | The interpolant. |
The documentation for this class was generated from the following files: