Higher-Order Side Channel Security and Mask Refreshing: linear function? I currently read about this paper:
https://eprint.iacr.org/2015/359.pdf

and I wanted to implement Algorithm 4 / Algorithm 5 on my own. There is one thing I cannot understand: where does function g come from (used in Algorithm 4)? It is said to be a $\mathbb{F}_2$-linear function.

Any ideas?
Actually, it's any $\mathbb{F}_2$-linear function you want it to be.

That is, those two algorithms are generic ways, given a linear $g$ and a threshld (secret-shared) value $x$, to compute a threshold version of $x \times g(x)$ (where $\times$ is $GF(2^n)$ field multiplication).