$-linear code $ C \subseteq \mathbb{F}_{q^m}^n $ with generator matrix $ G \in \mathbb{F}_{q^m}^{k \times n} $, we define its coset coding scheme as follows: For $ \mathbf{x} \in \mathbb{F}_{q^m}^k $, its coset encoding is a vector $ \mathbf{c} \in \mathbb{F}_{q^m}^n $ chosen uniformly at random and such that $ \mathbf{x} = \mathbf{c} G^T $.

This type of encoding has been recently extended to $ \mathbb{F}_q $-linear codes in [@allertonversion Sec. II-D].

In this paper we will focus on rank-metric codes used for security against information leakage in the form of coset coding.

Generalized rank weights and information leakage {#subsec GRWs and leakage}
------------------------------------------------

The information leaked to a wire-tapping adversary when using coset coding schemes was obtained in [@silva-universal Lemma 6], then generalized in [@rgrw Lemma 7] to $ \mathbb{F}_{q^m} $-linear nested coset coding schemes [@zamir], and in [@allertonversion Prop. 4] to $ \mathbb{F}_q $-linear coset coding schemes.

We need the concept of Galois closed spaces [@stichtenoth]:

Denote $ [i] = q^i $ for an integer $ i \geq 0 $. If $ C \subseteq \mathbb{F}_{q^m}^n $ is $ \mathbb{F}_{q^m} $-linear, we denote $$C^{[i]} = \{ (c_1^{[i]}, c_2^{[i]}, \ldots, c_n^{[i]}) \mid (c_1, c_2, \ldots, c_n) \in C \},$$ we 