Thursday, July 2, 2020

Procedure for Signing Data: More About Crypto Message Syntax used in Digital Signature and encryption Standards


This page from Microsoft defines the concepts.

https://docs.microsoft.com/en-us/windows/win32/seccrypto/procedure-for-signing-data

PKCS #12
The Personal Information Exchange Syntax Standard, developed and maintained by RSA Data Security, Inc. This syntax standard specifies a portable format for storing or transporting a user's private keys, certificates, and miscellaneous secrets.

PKCS #7
The Cryptographic Message Syntax Standard. A general syntax for data to which cryptography may be applied, such as digital signatures and encryption. It also provides a syntax for disseminating certificates or certificate revocation lists and other message attributes, such as time stamps, to the message.


PKCS #7 Signed Data
A data object that is signed with the Public Key Cryptography Standard #7 (PKCS #7) and that encapsulates the information used to sign a file. Typically, it includes the signer's certificate and the root certificate.



The content types defined in the PKCS #7 standard are as follows.
TABLE 1
Content typeDescription
DataAn octet (BYTE) string.
Signed DataContent of any type and encrypted message hashes (digests) of the content for zero or more signers.
Enveloped DataEncrypted content of any type and encrypted content-encryption keys for one or more recipients. The combination of encrypted content and encrypted content-encryption key for a recipient is a digital envelope for that recipient.
Signed-and-Enveloped DataEncrypted content of any type, encrypted content-encryption keys for one or more recipients, and doubly encrypted message digests for one or more signers. The double encryption consists of an encryption with a signer's private key followed by an encryption with the content-encryption key.
Digested DataContent of any type and a message hash (digest) of the content.
Encrypted DataEncrypted content of any type. Unlike the enveloped-data content type, the encrypted-data content type has neither recipients nor encrypted content-encryption keys. Keys are assumed to be managed by other means.

No comments:

Post a Comment