Set custom bn_mod_exp functions in openssl 1.1.1

prudvi raj rajprudvi98 at gmail.com
Thu Dec 17 09:46:47 UTC 2020


Hi,

I need to set custom accelerated functions for bn_mod_exp methods in
openssl 1.1.1, while upgrading for openssl 1.0.2. Here's the code snippet
() :
--
    static DH_METHOD Intoto_DH_Method;
    static RSA_METHOD Intoto_RSA_Method;
    static DSA_METHOD Intoto_DSA_Method;

    void updatePublicKeyMethods()
    {
        Intoto_DH_Method = *(DH_get_default_method());
        Intoto_DH_Method.bn_mod_exp = Intoto_DH_mod_exp;
        DH_set_default_method(&Intoto_DH_Method);

        Intoto_RSA_Method = *(RSA_get_default_method());
        Intoto_RSA_Method.bn_mod_exp = Intoto_RSA_mod_exp;
        RSA_set_default_method(&Intoto_RSA_Method);

        Intoto_DSA_Method = *(DSA_get_default_method());
        Intoto_DSA_Method.bn_mod_exp = Intoto_DSA_mod_exp;
        DSA_set_default_method(&Intoto_DSA_Method);

        return;
    }
--
As RSA_METHOD,DSA_METHOD & DH_METHOD objects are Opaque now , Can anyone
help me with what would be the replacement for above code ??

Thanks,
Prudvi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20201217/ee25c433/attachment.html>


More information about the openssl-users mailing list