Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [asn.1]

Abstract Syntax Notation One (ASN.1) is a language that defines the way data is sent across dissimilar communication systems.

1
vote
1answer
181 views

PKCS#7 non-detached Signature - Help understand the message structure

I am pretty new to ASN.1 format. I have a PKCS#7 signature which after doing an ASNdump looks like the one below. Can someone help me understand what each element below signifies? I could only ...
1
vote
2answers
377 views

Why is the signature field in X.509 a BIT STRING, despite there being ASN.1 (DER) data inside?

As can be seen from the following ASN.1 definition of an X.509 certificate, the Signature field is a BIT STRING. ...
4
votes
2answers
810 views

Why is the signatureAlgorithm field in X.509 certificates redundant?

See the ASN.1 description of an X.509 certificate below: ...
2
votes
1answer
320 views

Length of message in RSA and splitting of long messages

If I understand correctly in (unpadded) RSA the length of message M must be shorter than modulus n. Encryption gives ciphertext that is also shorter than n. Let's say I want to send a message of 2....
3
votes
1answer
574 views

What are these fields in ASN.1 encoding of RSA

Nice resource for ASN.1 structured RSA keys https://etherhack.co.uk/asymmetric/docs/rsa_key_breakdown.html in private key section shows following RSA private key related fields: modulus public exp ...
2
votes
1answer
389 views

Converting a “raw” non-ASN.1 EC private key to a public key?

I have this ECDSA private key that isn't very important, but I do not have it in any other format. 008AF2DA031B2DC39FBE418A238EFDA3B10ABC7C77FE12A750BFE899 I ...
3
votes
0answers
170 views

Prime extension field encoding ASN.1

ASN.1 encoding for elliptic curve cryptography is recommended by Certicom, as explained at a related question, covering curves over prime fields and binary extension fields. I'm looking for known ...
4
votes
1answer
189 views

representing binary finite fields in ASN.1

In SEC 2: Recommended Elliptic Curve Domain Parameters two types of finite fields are utilized - $\mathbb{F}_p$ and $\mathbb{F}_{2^m}$. In the case of sect193r1, $\mathbb{F}_{2^m}$ is the finite field,...
1
vote
1answer
618 views

Correcting Improperly Formatted EC Private Keys [closed]

We are currently generating a secp521r1 key as follows using cryptography for Python: ...
3
votes
1answer
472 views

What's the ASN.1 structure of ECIES encryption result? [closed]

I got a ECIES encryption result and a publickey,the publickey after decoding to ASN.1, I obtained the following: ...
3
votes
1answer
99 views

X509 certificates: Two Algorithm Identifiers?

I'm wondering why there are two Algorithm Identifiers in a X509 certificate. One is in the "to be signed" part and the other one is at the end right before the actual signature. Are they used for the ...
3
votes
1answer
126 views

converting finite field elements to octet strings

I need to convert elements of the finite field $GF(p^k)$, where $p$ is an odd prime, to octet strings. To be more precise, I want to include elliptic curve points over $GF(p^2)$ in a Subject Public ...
1
vote
1answer
112 views

Are there any existing ASN.1 structures for transferring symmetric keys?

Is there any reasonable ASN.1 standard to encode symmetric keys? I found PSKC, but it seems extremely heavy, and I can't quite find any library (e.g. bouncycastle) that would simplify using it. If ...
7
votes
1answer
1k views

How is OID 2a 86 48 86 f7 0d parsed as 1.2.840.113549?

I saw that an RSA key, created by OpenSSL, contains the following HEX string: 2a 86 48 86 f7 0d 01 01 01 that HEX string gets interpreted as Object ID: 1.2.840.113549.1.1.1 It is obvious 01 01 ...
7
votes
2answers
990 views

BER or DER X9.62 for ECDSA signature

The signature format for ECDSA signatures can be encoded using ASN.1 integers according to X9.62 or it can comprise of two integers with the same size as the key size. In case the X9.62 format is ...
3
votes
1answer
902 views

ASN.1 encoding off RSASSA-PSS default parameters

I am not totally sure the question belongs to crypto and not stackoverflow but nevertheless... The problem is the encoding of the RSASSA-PSS default algorithm identifier parameters in an X509 ...
3
votes
3answers
365 views

Verifying DER encoded DSA/ECDSA signature with extra content?

Having a DSA/ECDSA signature which is supposed to be DER encoded as an ASN.1 sequence of $r$ and $s$ (as described in the RFC), and being given some bytes which are ...
1
vote
1answer
135 views

What does OIW stand for

There seem to be many OID's that have been put in the ASN.1 tree that have the following ISO identified organization: OIW. One example is SHA-1 (ElGamal seems to be another): ...
5
votes
1answer
2k views

How to specify a NIST SP 800-108 KBKDF

Strange question maybe, but say I want to specify a protocol that complies with NIST SP 800-108. This lists a whole set of key based key derivation functions, with a very loose set of parameters. How ...
3
votes
1answer
174 views

ASN.1 OID of bcrypt

What is the ASN.1 OID associated to bcrypt (the key derivation scheme)? For instance, PBKDF2 has 1.2.840.113549.1.5.12 and it is therefore possible to store a ...
5
votes
2answers
3k views

How do I unpack the x and y values from the BITSTRING in a DER ECDSA public key?

In ASN.1, the X and Y values for a 256-bit elliptic curve key are stored as a single 66-byte ASN.1 BITSTRING. Are the values just the first and second half of this bitstring? The private key is an ...
8
votes
1answer
18k views

How can I convert a DER ECDSA signature to ASN.1?

I having trouble verifying an ECDSA signature signed using client side javascript with Java/BouncyCastle. The javascript signing function source: ...