randombit / botan

Cryptography Toolkit

Home Page:https://botan.randombit.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

secp112r2 unsupported since Hasse bound check

guidovranken opened this issue · comments

#include <botan/system_rng.h>
#include <botan/ecdsa.h>

int main(void)
{
    Botan::System_RNG rng;
    {
        const Botan::BigInt P("4451685225093714772084598273548427");
        const Botan::OID secp112r2_oid("1.3.132.0.7");
        const Botan::EC_Group secp112r2(
                P,
                Botan::BigInt("1970543761890640310119143205433388"),
                Botan::BigInt("1660538572255285715897238774208265"),
                Botan::BigInt("1534098225527667214992304222930499"),
                Botan::BigInt("3525120595527770847583704454622871"),
                Botan::BigInt("1112921306273428674967732714786891"),
                4,
                secp112r2_oid);
        Botan::OID::register_oid(secp112r2_oid, "secp112r2");

        if ( !secp112r2.verify_group(rng) ) {
            abort();
        }
    }
}

This now aborts due to 7eb9dbb

Should I remove this curve from my fuzzer?

Oh sorry - this check failed to account for the cofactor.

(Cofactors strike again)