Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6221073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:04:14+00:00 2026-05-24T08:04:14+00:00

I am trying to create a CSR programmatically. I’ve read about ASN.1, RFC 2986,

  • 0

I am trying to create a CSR programmatically. I’ve read about ASN.1, RFC 2986, X.509.
I have also parsed several DER-encoded CSR files manually which were created using OpenSSL.
Everything looks clear except for a couple of things:

  1. Public key part contains next bytes 8D 00 30 81 89 02 81 81 before the BIT STRING content (and after 03 81). What is this? I noticed that all CSR files encoded with DER contain them. I didn’t find anything about them in the RFC.

  2. Signature part contains next unclear bytes before the signature content but after 03 81. As I understand this part contains information about the last octet in BIT STRING (how much bites in last byte actually should be taken). But I don’t understand how to decode these bytes. For example the signature could look like the following:
    03 81 81 00 64 12 ... 24 B1 28
    where 03h is a BIT STRING format, 81h length of the bit string, 64 12 ... 24 B1 28 is a signature (but it has length 80h). I don’t understand the part 81 00.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:04:14+00:00Added an answer on May 24, 2026 at 8:04 am
    1. The BIT STRING in the SubjectPublicKeyInfo depends on your public key algorithm. The contents are again DER-encoded, see RFC 3370 for possibilities.

    2. If your signature looks like

      03 81 81 00 64 12 … 24 B1 28

    this is to be interpreted as follows. DER is a TLV (Tag – Length – Value) encoding. So the first byte (octet in their parlance) represents the tag – 03 for BIT STRING as you noticed correctly.

    The second byte determines the length:

    In the long form, the length octets shall consist of an initial octet and one or more subsequent octets. The initial
    octet shall be encoded as follows:

    a) bit 8 shall be one;

    b) bits 7 to 1 shall encode the number of subsequent octets in the length octets, as an unsigned binary integer
    with bit 7 as the most significant bit;

    81has bit 8 set to one, so the remaining bits indicate the number of bytes that determine the overall length. In your case it’s simply 1 byte. So the next byte is your lenght – 81 being equal to signature length of 129 bytes. So the following 129 bytes represent your value, starting with the 00.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to create several layers of folders at once C:\pie\applepie\recipies\ without using several different
hi I'm trying create chat using node.js I see example in http://chat.nodejs.org/ I have
Trying to create a script to read a remote file and check the md5
I am trying create a data.frame from which to create a graph. I have
I am trying create a layout. There are several inner layouts that should like
I'm trying create simple application in C++. This application has to read from file
I am trying create a WCF service that leverages the WPF MediaPlayer on the
I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can
I am trying create a delegate representation of constructor by emitting a Dynamic Method,
Ok so I am trying create a login script, here I am using PHP5

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.