By the way, I've researched this a bit more, it seems like there is noEli Zaretskii <eliz@gnu.org> writes:
>> From: Lars Ingebrigtsen <larsi@gnus.org>
>> Date: Tue, 26 Jun 2018 11:27:34 +0200
>> Cc: 31946@debbugs.gnu.org, Jimmy Yuen Ho Wong <wyuenho@gmail.com>
>>
>> We could get in touch with the gnutls maintainer and ask for his input
>> and perhaps ask for API endpoints to allow us to check for these things?
>
> Yes, I think that's the right way for moving forward.
practical way to detect small subgroups at all, the only solution is to
move to standardized domains (the smallest of which is 2048 bits)
similar to how ECDHE uses standard curves. This also solves the
composite prime problem, which is likely too expensive to check as well.
https://tools.ietf.org/html/rfc7919 :
Additionally, the DH parameters selected by the server may have a
known structure that renders them secure against a small subgroup
attack, but a client receiving an arbitrary p and g has no efficient
way to verify that the structure of a new group is reasonable for
use.