Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

secp112r2 unsupported since Hasse bound check #4041

Closed
guidovranken opened this issue May 5, 2024 · 1 comment
Closed

secp112r2 unsupported since Hasse bound check #4041

guidovranken opened this issue May 5, 2024 · 1 comment

Comments

@guidovranken
Copy link

guidovranken commented May 5, 2024

#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?

@randombit
Copy link
Owner

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

(Cofactors strike again)

volok-aleksej pushed a commit to volok-aleksej/botan that referenced this issue May 6, 2024
volok-aleksej pushed a commit to volok-aleksej/botan that referenced this issue May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants