ASN.1 parsing in java
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   vinay_raj
Posted On:   Wednesday, July 17, 2002 01:12 PM

as part authenticating an application i need to extract and verify a digital signature which is embedded in a ASN.1 DER structure. are there api's in java to parse such structures?..are any freeware api's available?.. how can i extract the signature bytes from this structure?.. the data structure looks like this: Signature ::= SEQUENCE { certificateIdentifier AuthorityKeyIdentifier, hashSignatureAlgorithm HashAlgorithmIdentifier, signatureValue BIT STRING } AuthorityKeyIdentifier ::= SEQUENCE { keyIdentifier [0] KeyIdentifier OPTIONAL, authorityCertIssuer [1] GeneralNames OPTIONAL, authorityCertSerialNumber [2] CertificateSerialNumber OPTIO   More>>

as part authenticating an application i need to extract and verify a digital signature which is embedded in a ASN.1 DER structure.
are there api's in java to parse such structures?..are any freeware api's available?..
how can i extract the signature bytes from this structure?..

the data structure looks like this:

Signature ::= SEQUENCE
{
certificateIdentifier AuthorityKeyIdentifier,
hashSignatureAlgorithm HashAlgorithmIdentifier,
signatureValue BIT STRING
}

AuthorityKeyIdentifier ::= SEQUENCE
{
keyIdentifier [0] KeyIdentifier OPTIONAL,
authorityCertIssuer [1] GeneralNames OPTIONAL,
authorityCertSerialNumber [2] CertificateSerialNumber OPTIONAL
}

hashSignatureAlgorithm:
md5 OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) US(840) rsadsi(113549)
digestAlgorithm(2) 5 }
sha-1 OBJECT IDENTIFIER ::=
{ iso(1) identified-organization(3) oiw(14) secsig(3)
algorithm(2) 26 }

   <<Less
About | Sitemap | Contact