Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to get random number from private key file 'PriKey.key'?

807603Dec 27 2007 — edited Jan 2 2008
Hi! every java developers.

Is there someone who know how to get random number(RandomNum) from private key file 'PriKey.key'?
I know random number(RandomNum) is used to make private key.
In my B2B project, I have to attach the random number(RandomNum) used in my private key to my soap message to make identification certification.
But I don't know how to do it.
I have public key, and private key.
Pls let me know how to get it.
FYI, I tried to get it by using ASN1Sequence, but failed.

PKCS#8 EncryptedPrivateKeyInfo
EncryptedPrivateKeyInfo ==> encryptionAlgorithm | encryptedData
encryptedData ==> version | privateKeyAlgorithm | privateKey | attributes
attributes ==> attribute | attribute |......
attribute ==> RandomNum -> OID:1.2.410.200004.10.1.1.3 | BIT STRING

Thanks...
Bigtom

Edited by: bigtom on Dec 27, 2007 4:15 PM

Edited by: bigtom on Dec 27, 2007 4:16 PM

Edited by: bigtom on Dec 27, 2007 4:17 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 30 2008
Added on Dec 27 2007
9 comments
1,265 views