EncoderGRSEvaluationPolynomial should provide the variable for univariate polynomial

Issue #92 resolved
Daniel Augot created an issue

To use EncoderGRSEvaluationPolynomial, we have to go through

sage: Epol = C.encoder("EvaluationPolynomial")
sage: P = Epol.message_space()
sage: x = P.gen()
sage: msg = 1+x^3+x^10
sage: Epol.encode(msg)

I suggest to have the encoder to export a courtesy Epol.gen() function directly.

Note that gen() may not be the best method to access x

Comments (2)

  1. Johan Rosenkilde

    -1

    You can already write it in one line as

    x = Epol.message_space().gen()
    

    which is not much longer than what you suggest, but more canonical. Implementing courtesy-functions for every such thing can quickly become unwieldy and confusing, I think.

    What do you mean with your last comment?

  2. Log in to comment