On 20 March 2013 11:25, azhar jodatti <azhar...@gmail.com> wrote:
> byte[] bobPubKeyEnc = bobKpair.getPublic().getEncoded();

This is providing an encoded form of the public key, whereas your code
is expecting it as an integer. Use the following instead:

DHPublicKey dhpubkey = (DHPublicKey)(bobKpair.getPublic());
BigInteger bobPubKeyInt = dhpubkey.getY();

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

Reply via email to