Abstract-Ring signatures were introduced by Rivest, Shamir and Tauman in 2001 [32]. These signatures allow a signer to anonymously authenticate a message on behalf of a group of his choice. This concept was then extended by Bresson, Stern and Szydlo into -out-of-(threshold) ring signatures in 2002 [9]. We propose in this article a generalization of Stern's code based identification (and signature) scheme [36] to design a practical -out-of-threshold ring signature scheme. The size of the resulting signatures is in ( ) and does not depend on , contrary to most of the existing protocols. Our scheme is existentially unforgeable under a chosen message attack in the random oracle model assuming the hardness of the minimum distance problem, is unconditionally source hiding, has a very short public key and has an overall complexity in ( ). This protocol is the first efficient code-based ring signature scheme and the first code-based threshold ring signature scheme. Moreover it has a better complexity than number-theory based schemes which have a complexity in ( ). This paper is an extended version of [2] with complete proofs and definitions.