secretflow/yacl

Problems in ea_code.h

maths644311798 opened this issue · 3 comments

In ea_code.h,

explicit ExAccCode(uint32_t n, uint32_t m) : n_(n), m_(m) {
    YACL_ENFORCE(m >= n);
    YACL_ENFORCE(n > d,
                 "ExAccCode: Dimension should be much greater than Weight");
  };

  uint32_t GetDimention() const override { return m_; }

I think m_ is the length and n_ is the dimension since m_>n_.

I think m_ is the length and n_ is the dimension since m_ > n_.

ExAccCode is a variant of Dual-LPN assumption, as described in the paper Correlated Pseudorandomness from Expand-Accumulate Codes.
To put it simple, Dual-LPN assumption is a problem to distinguish a "compressed vector" $\mathbf u = \mathbf G \cdot \mathbf e$ from the uniformly random vector $\mathbf u'$ drawn from $\lbrace 0,1\rbrace^{n}$. Here, $\mathbf G \in \lbrace 0 , 1 \rbrace^{n \times m}$ and $\mathbf e \in \lbrace 0 , 1 \rbrace^{m}$ is a noise vector.
Based on this, ExAccCode would that accepts an input vector of length m_ and produces an output vector of length n_.

OK, then in this sentence

YACL_ENFORCE(n > d,
                 "ExAccCode: Dimension should be much greater than Weight");

"Dimension" should be "Length".

Yep, you are right. Would you like to submit a pull request to fix it? :)