Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs
18 votes
Accepted

Is PKCS7 a signature format or a certificate format?

So is PKCS7 a signature format or a certificate format or both? Neither. PKCS7 is now Cryptographic Message Syntax(CMS). From the RFC 5652: This syntax is used to digitally sign, digest, ...
Makif's user avatar
  • 820
4 votes
Accepted

Which padding is used for sha256WithRSAEncryption (1.2.840.113549.1.1.11), deterministic or random?

It uses deterministic padding, i.e. padding with FF octets, finalized by a single 00 valued byte. So it is indeed RSASSA-PKCS1-...
Maarten Bodewes's user avatar
3 votes
Accepted

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

The practical answer to this is: use a library. There are many available, and they already handle the complicated details below plus many more that exist in PKCS7/CMS in general but are not in this ...
dave_thompson_085's user avatar
3 votes
Accepted

How is PKCS a syntax to digitally sign, digest, authenticate, or encrypt arbitrary message content

PKCS stands for Public Key Cryptography Standards. The name was part of RSA Laboratories that managed to create and publish a very long list of standards, including: PKCS#1 : RSA with various schemes ...
Maarten Bodewes's user avatar
2 votes
Accepted

Different encryption standards and how they relate to auth and algorithms

PKCS#7 - Subsequently CMS, typically used for generating and verifying digital signatures. I wouldn't go for 'typically' there. There are three main uses of PKCS7/CMS today: signature on various ...
dave_thompson_085's user avatar
2 votes

PKCS#7 Signed Data contains always different signature

That's likely because the data used for the signature generation actually changes between the signing. That would e.g. be the case if that data contains the signing time. Note that within CMS the data ...
Maarten Bodewes's user avatar
2 votes
Accepted

How does RFC 5652 authenticated data confirm origin and data integrity?

How would receiver know that it was not from originator? The recipient doesn't know the sender with this scheme. It can be anybody. Why? There's no secret involved in the sending process that is ...
SEJPM's user avatar
  • 46.1k
2 votes
Accepted

OPENSSL CMS: Enveloped data's public key, Certificate's public key; Are they same?

No, CMS enveloped-data does not contain the recipient's publickey. (Enveloped-data and encrypted-data are different, even though OpenSSL confusingly uses -encrypt ...
dave_thompson_085's user avatar
2 votes
Accepted

PKCS#7 SignedData - how is the "encryptedDigest" constructed for RSAES‐PKCS‐v1_5?

ITU may provide information about PKCS (and CMS) but they are not the author. PKCS7 (like all PKCS) was originally from RSALabs and now remains available as rfc2315; several versions of CMS -- which ...
dave_thompson_085's user avatar
1 vote
Accepted

Does CMS AuthEnvelopedData type provide message authentication?

Authentication (and nonrepudiation) is relative to a source. 'Authenticated' encryption like GCM and CCM is a limited form of authentication that guarantees successfully decrypted data came from the ...
dave_thompson_085's user avatar
1 vote
Accepted

OPENSSL: What is the difference of enc command and cms' enc command?

openssl cms -encrypt/sign by default applies SMIME canonicalization -- even when the output format isn't SMIME. This changes LF to CRLF making the data 16 bytes, ...
dave_thompson_085's user avatar
1 vote

OPENSSL: What is the difference of enc command and cms' enc command?

AES is a block cipher and needs a proper mode of operation like CBC, CTR, and so on. While the streaming modes like CFB, OFB, and CTR don't require padding the CBC and ECB mode of operations requires ...
kelalaka's user avatar
  • 48.7k
1 vote

Why does CMS' PasswordRecipient use a KEK?

CMS is just following a standard design. CMS allows a message to be encrypted for multiple recipients. The content encryption uses a randomly generated key, the CEK. The CMS object contains an ...
Gilles 'SO- stop being evil''s user avatar
1 vote

What exactly is the contents of the LDAP userSMIMECertificate attribute?

Odd. I tried asking+posting on Cryptography first which then said my issue was out of scope. So moved to stackexchange which then also said out of scope. In any case a month or so of work with others ...
Rick's user avatar
  • 11
1 vote
Accepted

What exactly is the contents of the LDAP userSMIMECertificate attribute?

tl;dr The userSMIMECertificate attribute must hold a signed S/MIME message. To create the contents for userSMIMECertificate, sign an email message with an empty message body, then remove all mail ...
not2savvy's user avatar
  • 230

Only top scored, non community-wiki answers of a minimum length are eligible