• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to load Private Key Generated Using C code into java application

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Everyone,

In my application i am receiving RSA private key that is being generated using C code. in c RSA library is used.
Now i am not getting how to load that private key into RSAPrivateKey Object.
Please let me know how could i do that.
RSA Lib I am using consists of:-
DES.H
DIGIT.H
GLOBAL.H
MD2.H
MD5.h
NN.H
PRIME.H
R_RANDOM.H
RSA.H
RSAREF.H
DESC.C
DIGIT.C
MD2C.C
MD5C.C
NN.C
PRIME.C
R_DH.C
R_ENCODE.C
R_ENHANCE.C
R_KEYGEN.C
R_RANDOM.C
R_STDLIB.C
RSA.C

It would be great if i can get how to load private key from the one generated by c code.


Thanks,
Tarun Khandelwal
 
Tarun Khandelwal
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Everyone,

The process that c code is using to generate both keys is,

First it is using R_GeneratePEMKeys for getting Public and Private key Object.
Than it is using R_EcodePEMBlock function to encode both private and public key individually.
I am receiving this PEM Encoded private key.
Now i have to load RSAPrivatekey object using this key object.
How can i do that?

Thanks,
Tarun Khandelwal
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic