Questions tagged [asn1]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
0answers
73 views

how to generate RSAES-OAEP keys?

RFC4055 describes RSAES-OAEP keys and RSASSA-PSS keys. OpenSSL's genpkey utility supports let's you generate RSASSA-PSS keys (you have to set the aglorithm parameter to RSA-PSS) but if it supports ...
1
vote
1answer
71 views

OpenSSL ECC key - Additional byte in DER encoding for one curve

In the below, I use OpenSSL to create a private key for the secp224k1 curve. Note the length of the private key in the DER - 0x1d. That's 29 bytes, or 232 bits, not 224. It appears that a leading zero ...
0
votes
0answers
105 views

Can I use OpenSSL to generate a key from asn1 configuration file without specifying the modular multiplicative inverse q^-1 (mod p)

I'm trying to create this gimmicky public-private RSA key pair where p and q are the same number. I would want to use the asn1 parser in OpenSSL, but I'm required to specify the coeff parameter, the ...
1
vote
1answer
487 views

ASN.1 encoding of X25519 private key

I'm using mbed TLS for ECDH key agreement using Curve25519. The private and public keys are stored and transmitted as Hex strings as easily generated with mbed TLS. Those strings are big-endian. This ...
1
vote
0answers
35 views

RFC6960 requested ocsp service definition

In RFC6960 (https://tools.ietf.org/html/rfc6960) is written the request data contains the requested service and the OCSP responder checks, if the requested service is provided. But when I had a look ...
2
votes
0answers
266 views

ASN.1-based network protocol fuzzer [closed]

I want to do network protocol-based fuzzing using a network protocol specified in ASN.1. After investigating the available open source tools, I need to decide between the Peach community edition, ...
3
votes
3answers
1k views

ASN.1 encapsulated BITSTRING type in openSSL

I am currently building an ASN.1 parser which supposed to decode X.509v3 certificates and epoch files in ASN.1 DER format. The parser is working well apart from one issue which I couldn't seem to get. ...
2
votes
0answers
149 views

ASN1 Public Key Signature Verification

I'm interested in handling licenses I distribute with my app with ASN1 and including the Public Key within my application. I've already created the Private/Public Keys, but my confusion is in how the ...
0
votes
1answer
32 views

What threats and mitigations are there for a CA when processing a CSR?

Question What kinds of technical nastiness/attacks should I look for in a Certificate Request (CSR) ? Assume the ASN1 parser is secure on the CA. I'm strictly concerned with the process of ...
4
votes
0answers
144 views

ASN.1 encoding question

RecipientInfo ::= CHOICE { ktri KeyTransRecipientInfo, kari [1] KeyAgreeRecipientInfo, kekri [2] KEKRecipientInfo, pwri [3] PasswordRecipientInfo, ori [4] OtherRecipientInfo } KeyAgreeRecipientInfo ::...
4
votes
1answer
507 views

Why are there leading 0x00 bytes in the subjectPublicKey field of a DER X.509 cert?

For a simple example, I'm using a 512-bit RSA cert to illustrate my question. The cert can be found in both DER and PEM form here. I've been going through the certificate using this ASN.1 decoder (the ...
2
votes
0answers
98 views

Finding the EMSA-PKCS1-v1_5 DigestAlgorithm field in the x509 certificate

From the RFC - https://www.ietf.org/rfc/rfc3447.txt A.2.4 RSASSA-PKCS1-v1_5 For each OID, the parameters field associated with this OID in a value of type AlgorithmIdentifier shall have a value ...
3
votes
1answer
841 views

encoding of optional NULL in DER

In PKCS1 there's DigestInfo: DigestInfo ::= SEQUENCE { digestAlgorithm AlgorithmIdentifier, digest OCTET STRING } AlgorithmIdentifier is defined in RFC5280: AlgorithmIdentifier :...
2
votes
1answer
218 views

Why is the digest algorithm specified in two places in CMS / PKCS7?

In RFC5652, Cryptographic Message Syntax (CMS), section 5.3. SignerInfo Type, there's a digestAlgorithm field that has values like id-sha256, id-sha1, etc. In that same RFC, section 5.1. SignedData ...
1
vote
1answer
536 views

How do I get the subject public key from a PKCS7 message?

Quoting RFC4562, Cryptographic Message Syntax (CMS), section 5.6. Signature Verification Process: The recipient MAY obtain the correct public key for the signer by any means, but the preferred ...
0
votes
1answer
75 views

extendedCertificate's in PKCS7 / CMS

In PKCS7 / CMS, for the signed-data content type, there's a CertifcateChoices field in the certicates field in SignedData that is a SET of CertificateChoices. CertificateChoices is defined thusly: ...
10
votes
2answers
463 views

Are there any meta-formats for crypto?

Are there are any (properly specified) meta-formats / schema formats for describing cryptographic message structures? I'm looking for a way to describe the format (where some channels might want ...
2
votes
0answers
447 views

CMS/PKCS#7: specifying signatureAlgorithm with digest?

I'm confused about algorithm selection for Cryptographic Message Syntax (a.k.a. CMS, PKCS#7) signed objects (RFC5652 Section 5.1). The SignerInfo structure (RFC5652 Section 5.3) has two separate ...
2
votes
1answer
79 views

Downloadable Autonomous System contact information

When under (a security) attack, it might be useful for the victim to first identify the source IP, then potentially contact the offending ISP. There seem to be plenty of tools for the part where an IP ...
5
votes
3answers
2k views

What part of the CSR is hashed in order to create its signature?

I'd like to change the CSR before it is transferred to the CA without going through the CSR creation process again. To do that I need to know how to calculate the signature of the CSR after I modified ...
1
vote
0answers
50 views

is this optional keyword redundant? [closed]

KDC-REQ ::= SEQUENCE { -- NOTE: first tag is [1], not [0] pvno [1] INTEGER (5) , msg-type [2] INTEGER (10 -- AS -- | 12 -- TGS --), padata [3] SEQUENCE OF PA-DATA ...
8
votes
1answer
8k views

Why does openssl writes EC parameters when generating private key?

When I'm generating a private key with openssl, it writes the curve's parameters, and the actual private key: ❯ openssl ecparam -name secp256k1 -genkey -----BEGIN EC PARAMETERS----- BgUrgQQACg== ----...
4
votes
1answer
3k views

How to verify the signature in an iOS Passbook pass?

The Passbook application in the new iOS6 keeps track of movie tickets, coupons, and other 'passes' for you, and the passes themselves are loaded onto the user's device via file packages with the ....
8
votes
2answers
3k views

ASN.1: ENUMERATED vs INTEGER

From the X.509 specs: CRLReason ::= ENUMERATED { unspecified (0), keyCompromise (1), cACompromise (2), affiliationChanged (3), ...
6
votes
3answers
1k views

How do I test and secure ASN.1 Parsers?

As far as I can tell, .NET doesn't have an ASN.1 parser for reading or writing data built in the framework. This means that any code that creates or verifies ASN.1 data is using a 3rd party library ...
2
votes
1answer
1k views

question about implicitly tags in ASN.1

From the X.509 RFC, in the "Implicitly Tagged Module" section: CRLDistributionPoints ::= SEQUENCE SIZE (1..MAX) OF DistributionPoint DistributionPoint ::= SEQUENCE { distributionPoint [0] ...