Let be a linear code. A codeword is said a minimal codeword if its support (i.e. the set of non-zero coordinates) determines up to a scalar factor. Equivalently, the support of does not contain the support of any other independent codeword.
Minimal codewords can be used [15, 16] in linear codes-based access structures in secret sharing schemes (SSS), that is protocols which include a distribution algorithm and a reconstruction algorithm, implemented by a dealer and some participants; see [17, 3]. The dealer splits a secret into different pieces (shares) and distributes them to participants . Only authorized subsets of (access structure ) can be able to reconstruct the secret by using their respective shares. A set of participants is called a minimal authorized subsets if and no proper subset of belongs to . An SSS is called perfect if only authorized sets of participants can recover the secret and ideal if the shares are of the same size as that of the secret.
In his works Massey [15, 16] used linear codes for a perfect and ideal SSS. Also, he pointed out the relationship between the access structure and the set of minimal codewords of the dual code of the underlying code. In particular, the access structure of the secret-sharing scheme corresponding to an -code is specified by the support of minimal codewords in having as first component; see [15, 16].
Given an arbitrary linear code , it is a hard task to determine the set of its minimal codewords even in the binary case. In fact, the knowledge of the minimal codewords is related with the complete decoding problem, which is a NP-problem even if preprocessing is allowed [2, 8]; this means that to obtain the access structures of the SSS based on general linear codes is also hard. In general this has been done only for specific classes of linear codes and this led to the study of linear codes for which every codeword is minimal; see for instance [5, 18].
Ashikhmin and Barg  gave a useful criterion for a linear code to be minimal.
A linear code over is minimal if
where and denote the minimum and maximum nonzero Hamming weights in .
On the one hand, families of minimal linear codes satisfying Condition (1) have been considered in for instance [4, 9, 11, 19]. On the other hand, Condition (1) is not necessary for linear codes to be minimal. In this direction, sporadic examples of minimal codes have been presented in , whereas in  the first infinite family of minimal binary codes has been constructed by means of Boolean functions arising from simplicial complexes. More recently, families of minimal binary and ternary codes have been investigated in [13, 10].
2. Minimal codes and Secret Sharing Schemes
Let be an -code, that is a -dimensional linear subspace of . The support of a codeword is the set . Clearly, the Hamming weight equals for any codeword .
 A codeword is minimal if it only covers the codewords , with , that is
 The code is minimal if every non-zero codeword is minimal.
Let be the generator matrix of with columns and suppose that no is the
-vector. The codecan be used to construct secret sharing schemes in the following way. The secret is an element of and the set of participants . The dealer chooses randomly such that and computes the corresponding codeword . Each participant , , receives the share . A set of participants determines the secret if and only if is a linear combination of ; see . There is a one-to-one correspondence between minimal authorized subsets and the set of minimal codewords of the dual code .
3. A family of minimal codes violating the Ashikhmin-Barg bound
3.1. Notations and definition of the code
Let , odd prime, , and consider the Galois field . Fix an integer and consider . Choose , , to be (not necessarily distinct) elements of . Let us denote by .
The weight of a vector is defined as .
Consider the function defined by
for any , .
We define the code as
where denotes the usual inner product in between and .
As a notation, for any pair let denote the corresponding codeword of . Choose any ordering in . For an , we denote by the entry in corresponding to . The support of a codeword is defined as the set of .
3.2. The minimality of the code
Observe that, for any fixed pair , the elements for which the codeword are contained in the union of hyperplanes and , , defined by
equals , where
Let and , , be two distinct hyperplanes defined as in (4). Then there exist with such that and .
It is enough to prove that, for any two distinct hyperplanes of type and ,
In fact, for a given , we can suppose that and therefore . So,
The code is minimal.
Let and be two codewords, with for any , and both different from the -codeword.
Suppose that , that is .
Suppose . Then and consists of all with . Since , . It is easily seen that for some , a contradiction.
Suppose . Then and consists of all with . If then would also contain some with , a contradiction to . So and therefore for some , a contradiction.
Suppose . By Proposition 3.1, , that is for some . Also, , for any . Since and can be either disjoint or coincident, and therefore , a contradiction.
Then and is minimal. ∎
3.3. The parameters of
The code has length and dimension over . If
then minimum and maximum weights in satisfy
Clearly, the length of is .
Each codeword in can be written as linear combination of , , …, , where is the standard basis of over .
On the other hand, suppose that is the zero codeword.
If , then for elements , , we have , and then .
If , then we can consider , and and then , . Since (see (2)), the above conditions yield .
This proves that , , …, is a basis of of size .
We now determine the minimum weight of the code. Recall that for a codeword its weight is
The codeword is the 0-codeword.
The codewords , , have weight exactly . In fact, is non-zero if and only if .
The codewords , , have weight exactly , since each satisfying belongs to .
For a codeword , with and ,
see Proposition 4. Without loss of generality we can suppose that . We have that
The research of D. Bartoli was supported by Ministry for Education, University and Research of Italy (MIUR) (Project “Geometrie di Galois e strutture di incidenza”) and by the Italian National Group for Algebraic and Geometric Structures and their Applications (GNSAGA - INdAM).
The research of M. Bonini was supported by the Italian National Group for Algebraic and Geometric Structures and their Applications (GNSAGA - INdAM).
-  A. Ashikhmin, A. Barg. Minimal vectors in linear codes. IEEE Trans. Inf. Theory 44(5) (1998) 2010–2017.
-  E.R Berlekamp, R.J. McEliece, H.C.A. van Tilborg. On the Inherent Intractability of Certain Coding Problems. In: IEEE Trans. Inform. Theory, IT-24, no. 3, (1978), 384–-386.
-  G.R. Blakley. Safeguarding cryptographic keys. In: Proceedings of AFIPS National Computer Conference. New York, USA, AFIPS Press 48(1979) 313–317.
-  C. Carlet, C. Ding, J. Yuan. Linear codes from highly nonlinear functions and their secret sharing schemes. IEEE Trans. Inf. Theory 51(6) (2005) 2089–2102.
-  H. Chabanne, G. Cohen, A. Patey. Towards Secure Two-Party Computation from the Wire-Tap Channel. In: Information Security and Cryptology – ICISC 2013, pp. 34–46. Springer, Heidelberg, 2014.
-  S. Chang, J. Y. Hyun. Linear codes from simplicial complexes. Des. Codes Cryptogr. DOI: https://link.springer.com/article/10.1007/s10623-017-0442-5 (2017).
-  G.D. Cohen, S. Mesnager, A. Patey. On minimal and quasi-minimal linear codes. In: M. Stam (Ed.), IMACC 2013, LNCS vol. 8308, pp. 85–98, Springer, Heidelberg, 2013.
-  J. Bruck, M. Naor. The Hardness of Decoding Linear Codes with Preprocessing. In: IEEE Trans. Inform. Theory 36(2) (1990).
-  C. Ding. Linear codes from some -designs. IEEE Trans. Inf. Theory 60(6) (2015) 3265–3275.
-  C. Ding, Z. Heng, Z. Zhou. Minimal binary linear codes. IEEE Trans. Inf. Theory, DOI: https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=8325311&tag=1.
-  C. Ding, N. Li, C. Li, Z. Zhou. Three-weight cyclic codes and their weight distributions. Discrete Mathematics 39 (2016) 415–427.
-  C. Ding, J. Yuan. Covering and secret sharing with linear codes. In: Calude, C.S., Dinneen, M.J., Vajnovszki, V. (eds.) DMTCS 2003. LNCS, vol. 2731, pp. 11–25. Springer, Heidelberg (2003).
-  Z. Heng, C. Ding, X. Zhou. Minimal Linear Codes over Finite Fields. https://arxiv.org/pdf/1803.09988.pdf.
-  J.W.P. Hirschfeld. Projective geometries over finite fields, second edition. Oxford Univ. Press, Oxford, (1998).
-  J.L. Massey. Minimal codewords and secret sharing. In: Proc. 6th Joint Swedish-Russian Int. Workshop on Info. Theory, pp. 276–279 (1993)
-  J.L. Massey. Some applications of coding theory in cryptography. In: Farrell, P.G. (ed.) Codes and Cyphers: Cryptography and Coding IV, pp. 33?47. Formara Ltd. (1995)
-  A. Shamir. How to share a secret. Communications of the ACM 24 (1979) 612–613.
-  Y. Song, Z. Li. Secret sharing with a class of minimal linear codes. https://arxiv.org/abs/1202.4058 (2012)
-  J. Yuan, C. Ding. Secret sharing schemes from three classes of linear codes. IEEE Trans. Inf. Theory 52(1) (2006) 206–212.