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 / February 2005

Tip: Looking for answers? Try searching our database.

What's the binary format of X509.v1 and v3?

Thread view: 
jacksu - 03 Feb 2005 14:43 GMT
I read from some document, sounds like the first several bytes shows
the version, which starts from 0.

So for X509.v1, I should see the first byte "0", for v3, I should see
the first byte "2".

But when I decode the x509.v1 and v3's certificate, it appears the
format is not that way,

the first two bytes: 48, -126,

then for v1, the third byte is 2, and for v3, the third byte is 4.

Any idea on that?

Thanks
Karl Scheibelhofer - 04 Feb 2005 07:44 GMT
such certificates are encoded as ASN.1 structures using DER encoding. read
http://luca.ntop.org/Teaching/Appunti/asn1.html for an introduction.
Java can parse such certificates out of the box (see
http://java.sun.com/j2se/1.5.0/docs/guide/security/CryptoSpec.html#CertificateFactory).

 Karl

--

Karl Scheibelhofer, IAIK - Graz University of Technology
Inffeldgasse 16a, 8010 Graz, Austria
Fax: +43 316 873 5520
http://jce.iaik.tugraz.at/
Visit us at the RSA conference in San Francisco, 14-18 Feb 2005, booth 438

> I read from some document, sounds like the first several bytes shows
> the version, which starts from 0.
[quoted text clipped - 12 lines]
>
> Thanks


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.