I'm working in a client for authentication of SRP6 and I have a problem with
the function BN_mod_exp.
I'd appreciate some guidance

The values that I use with this function perfectly matches the ones
required.

It's written in C++ and here are the parts of the code that I think are
important.

BigNumber BigNumber::ModExp(const BigNumber &bn1, const BigNumber &bn2)
{
    BigNumber ret;
    BN_CTX *bnctx;

    bnctx = BN_CTX_new();
    BN_mod_exp(ret._bn, _bn, bn1._bn, bn2._bn, bnctx);
    BN_CTX_free(bnctx);

    return ret;
}

BigNumber temp;
temp = g.ModExp(x, N);

Where g, x and N are instances of the class BigNumber.
Here are my output checkings, where I print the calculated value and the
expected.

N (calculated):
B79B3E2A87823CAB8F5EBFBF8EB10108535006298B5BADBD5B53E1895E644B89
N (expected):  
B79B3E2A87823CAB8F5EBFBF8EB10108535006298B5BADBD5B53E1895E644B89

g (calculated): 07
g (expected):   07

x (calculated): CBFE739D7B671EE5EF8BD304A670459ED445C6CB
x (expected):   CBFE739D7B671EE5EF8BD304A670459ED445C6CB

temp (calculated):
E2D764F327E4C1A9F63E28C48C6F76808108383B3EE14FF3B10BCAFD284E6966
temp (expected):  
F965C5F89FF0175FA73E2DFCDB28CEAEEFD69999BE88CC015E3356DCE95FC265

Any other piece of code will be given if asked.

Thank you all for your time.
-- 
View this message in context: 
http://www.nabble.com/Problem-with-BN_mod_exp-tp21513044p21513044.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to