This paper presents a new technique for disturbing the algebraic structure of linear codes in code-based cryptography. Specifically, we introduce the so-called semilinear transformations in coding theory and then apply them to the construction of code-based cryptosystems. Note that Fqm can be viewed as an Fq -linear space of dimension m , a semilinear transformation φ is therefore defined as an Fq -linear automorphism of Fqm . Then we impose this transformation to a linear code C over Fqm . It is clear that φ (C) forms an Fq -linear space, but generally does not preserve the Fqm -linearity any longer. Inspired by this observation, a new technique for masking the structure of linear codes is developed in this paper. Meanwhile, we endow the underlying Gabidulin code with the so-called partial cyclic structure to reduce the public-key size. Compared to some other code-based cryptosystems, our proposal admits a much more compact representation of public keys. For instance, 2592 bytes are enough to achieve the security of 256 bits, almost 403 times smaller than that of Classic McEliece entering the third round of the NIST PQC project.