Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Security / April 2005

Tip: Looking for answers? Try searching our database.

DER decoding from x.509 v3 certificate

Thread view: 
panax - 18 Mar 2005 16:50 GMT
I need to read the extension field of a x.509 v3 certificate.
I use the java method getExtensionValue().
The method return an array of bytes DER-encoded.
I want to read it as a String and print it on screen. So I have to decode
the array and convert it.
I try a lot of way to do that but I never obtain good result.
Someone can help me?
Then, the DER encoding is equal to Base64 encoding or not?

Thanks
Pat Farrell - 21 Mar 2005 19:50 GMT
> The method return an array of bytes DER-encoded.
> Then, the DER encoding is equal to Base64 encoding or not?

No, DER encoding has nothing to do with Base64 or MIME encoding.
It is designed as part of the whole X.500 ISO data model.
It is word size and byte size and big and little-endian independant.
It is not trivial to decode, so search for a library.

Signature

Pat Farrell
http://www.pfarrell.com/prc/

Michel Gallant - 21 Mar 2005 21:00 GMT
A basic introduction to asn.1 (abstract syntax notation) and BER/DER
is in this book:
  Planning for PKI, R. Housley, T. Polk, 2001 Wiley p. 69.

Here is an online book on the asn.1 standard:
 http://www.oss.com/asn1/larmouth.html

and the popular 1993 RSA Labs publication:
"A Layman's Guide to a Subset of ASN1., BER, and DER"
 ftp://ftp.rsasecurity.com/pub/pkcs/doc/layman.doc

Here is a binary view into a typical X.509 v3 cert:
  http://www.jensign.com/JavaScience/GetTBSCert

- Mitch Gallant

> > The method return an array of bytes DER-encoded.
> > Then, the DER encoding is equal to Base64 encoding or not?
[quoted text clipped - 3 lines]
> It is word size and byte size and big and little-endian independant.
> It is not trivial to decode, so search for a library.
panax - 30 Mar 2005 17:25 GMT
There isn't free library for DER-decoding.
I need to decode octet string DER-encoded.
Have I to read and program ITU-T specifics? or is there some easier way?

Thanks
pAn
steffi - 31 Mar 2005 08:46 GMT
Have you looked at www.bouncycastle.org ?

Steffi
panax - 01 Apr 2005 12:20 GMT
Yes, I'm using bouncycastle packages, but I don't find the rigth method or
I do some mistakes.
I'm trying dumpAsString() method to decode DER objects but it doesn't work
correctly.
Some helps?

thanks again
pAn
steffi - 11 Apr 2005 13:11 GMT
Sorry, I just recently started using/evaluating bouncycastle and do not
really know how to use it. I'm still looking for some good
documentation (did I miss something on their website?).
I saw some packages dealing with DER so I thought they might be helpful
for you.
But, sorry again, I don't know (yet) how to use them.

Steffi


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.