An important cryptographic operation on elliptic curves is hashing to a point on the curve. When the curve is not of prime order, the point is multiplied by the cofactor so that the result has a prime order. This is important to avoid small subgroup attacks for example. A second important operation, in the composite-order case, is testing whether a point belongs to the subgroup of prime order. A pairing is a bilinear map e : G1×G2 → GT where G1 and G2 are distinct subgroups of prime order r of an elliptic curve, and GT is a multiplicative subgroup of the same prime order r of a finite field extension. Pairing-friendly curves are rarely of prime order. We investigate cofactor clearing and subgroup membership testing on these composite-order curves. First, we generalize a result on faster cofactor clearing for BLS curves to other pairingfriendly families of a polynomial form from the taxonomy of Freeman, Scott and Teske. Second, we investigate subgroup membership testing for G1 and G2. We fix a proof argument for the G2 case that appeared in a preprint by Scott in late 2021 and has recently been implemented in different cryptographic libraries. We then generalize the result to both G1 and G2 and apply it to different pairing-friendly families of curves. This gives a simple and shared framework to prove membership tests for both cryptographic subgroups. preprint version available on ePrint at https://eprint.iacr.org/2022/352 and HAL at https://hal.inria.fr/hal-03608264, SageMath verification script at https://gitlab.inria.fr/zk-curves/cofactor. a subgroup of prime order r of the elliptic curve over a prime field F q , G 2 is a distinct subgroup of points of order r, usually over some extension F q k , and G T is the target group in a finite field F q k , where k is the embedding degree.The choices of pairing-friendly curves of prime order over F q are limited to the MNT curves (Miyaji, Nakabayashi, Takano) of embedding degree 3, 4, or 6, Freeman curves of embedding degree 10, and Barreto-Naehrig curves of embedding degree 12. Because of the new NFS variant of Kim and Barbulescu, Gaudry, and Kleinjung (TNFS), the discrete logarithm problem in extension fields GF(q k ) is not as hard as expected, and key sizes and pairing-friendly curve recommendations are now updated. In this new list of pairing-friendly curves, BN curves are no longer the best choice in any circumstances. The widely deployed curve is now the BLS12-381 curve: a Barreto-Lynn-Scott curve of embedding degree 12, with a subgroup of 255-bit prime order, defined over a 381-bit prime field. The parameters of this curve have a polynomial form, and in particular, the cofactor has a square term: c 1 (x) = (x − 1) 2 /3 were x is the seed −(2 63 + 2 62 + 2 60 + 2 57 + 2 48 + 2 16 ).One important cryptographic operation is to hash from a (random) string to a point on the elliptic curve. This operation has two steps: first mapping a string to a point P (x, y) on the curve, then multiplying the point by the cofactor so that it falls into the cryptographic subgroup....