hi
how to convert private key to BigInteger?
regards,
Printable View
hi
how to convert private key to BigInteger?
regards,
Hello,
What do you mean by private key?
I have to convert privatek to bigInteger:
PrivateKey privatek = ( PrivateKey)keypair.getCryptoBag(CryptoBag.V_KEY_PR IVATE);
What part of the PrivateKey do you want to convert to BigInteger. From what I look at the API the PrivateKey is just an interface that doesn't have any method. Do you want to convert encoded value of the key into BigInteger?
Is this what you want:
Code:PrivateKey key = ...;
BigInteger value = new BigInteger(key.getEncoded());
I have an equation in which a is DSA private key.
my equation is: x^a mod p
if I can convert it to BigIngter, It will be like this:
x.modpow(a,p);
Thx a lot:)