SetPKCS7Plus

[ Changed 7th November 1996 ]


HTML Annotations, Copyright 1996, T.M.A. Lomas,
Computer Security Group, University of Cambridge Computer Laboratory.
All Rights Reserved.

These are based upon a protocol description issued 8th August 1996 by MasterCard and VISA, who we presume to retain copyright in the text of these documents.

Permission is granted to use or distribute these files provided this copyright information is preserved, and subject to any conditions imposed by MasterCard and VISA.


Defined but not used:


1746 SetPKCS7Plus DEFINITIONS EXPLICIT TAGS ::= BEGIN
1747
1748 --
1749 -- This module defines types for manipulating RSA PKCS #7 Cryptographic
1750 -- Messages, as well as SET-specific messages which contain these types.
1751 -- Note that SET uses definitions for PKCS-7 version 1.5, with some
1752 -- extensions made in anticipation of the proposed PKCS-7 version 2.0
1753 -- standard.
1754 --
1755 -- Notice that all occurances of type set-of have been replaced by
1756 -- sequence-of types, since ISO/IEC 8825-1:1995(E) section 11.6 requires
1757 -- that set-of value components appear in ascending order. This change
1758 -- is intended to preserve the original intent of the PKCS-7 authors.
1759 -- Also note that the definition of ContentInfo has been replaced by
1760 -- ASN.1 Information Object defintions to make the definitions conform
1761 -- to the 1994 ASN.1 ISO standards.
1762 --
1763 -- The PKCS-6 type ExtendedCertificateOrCertificate is now obsolete, and
1764 -- has been replaced by type Certificates at the request of RSA. A set
1765 -- of Information Objects have been specified to replaced the generic
1766 -- AlgorithmIdentifier type, so that SET-specific algorithms and their
1767 -- parameters can be tightly coupled with individual PKCS-7 message
1768 -- types.
1769 --
1770
1771 -- EXPORTS All;
1772
1773 IMPORTS
1774
1775    Attribute, Name
1776       FROM SetAttribute
1777
1778    Certificate, CertificateSerialNumber
1779       FROM SetCertificate
1780
1781    id-set
1782       FROM SetCertificateExtensions
1783
1784    CRL
1785       FROM SetCRL
1786
1787    CardExpiry, PAN
1788       FROM SetMessage;
1789
1790
1791 CertificateRevocationLists ::= SEQUENCE OF CRL
1792
1793 IssuerAndSerialNumber ::= SEQUENCE {  -- Uniquely identifies certificate
1794    issuer        Name,
1795    serialNumber  CertificateSerialNumber
1796 }
1797
1798 CONTENT-INFO ::= TYPE-IDENTIFIER
1799
1800 SupportedContents CONTENT-INFO ::= {
1801    setData                      |
1802    pkcs7Data                    |
1803    pkcs7SignedData              |
1804    pkcs7EnvelopedData           |
1805    pkcs7DigestedData
1806 }
1807
1808 setData CONTENT-INFO ::= {
1809    TYPE-IDENTIFIER.&Type IDENTIFIED BY id-set-data }        -- Open type
1810
1811 pkcs7Data CONTENT-INFO ::= {
1812    Data IDENTIFIED BY data }
1813
1814 pkcs7SignedData CONTENT-INFO ::= {
1815    SignedData IDENTIFIED BY signedData }
1816
1817 pkcs7EnvelopedData CONTENT-INFO ::= {
1818    EnvelopedData IDENTIFIED BY envelopedData }
1819
1820 pkcs7DigestedData CONTENT-INFO ::= {
1821    DigestedData IDENTIFIED BY digestedData }
1822
1823 ContentInfo ::= SEQUENCE {
1824    contentType  CONTENT-INFO.&id({SupportedContents}),
1825    content      [0] EXPLICIT CONTENT-INFO.&Type({SupportedContents}
1826                                                {@contentType})  OPTIONAL
1827 }
1828
1829 ContentType ::= OBJECT IDENTIFIER
1830
1831 Data ::= OCTET STRING                               -- Data content type
1832
1833 SignedData ::= SEQUENCE {                                      -- PKCS#7
1834    sdVersion         INTEGER { sdVer2(2) } (sdVer2),
1835    digestAlgorithms  DAlgorithmIdentifiers,
1836    contentInfo       ContentInfo,
1837    certificates      [0] IMPLICIT Certificates  OPTIONAL,
1838    crls              [1] IMPLICIT CertificateRevocationLists  OPTIONAL,
1839    signerInfos       SignerInfos
1840 }
1841
1842 SignerInfos ::= SEQUENCE OF SignerInfo (WITH COMPONENTS { ...,
1843                                      authenticatedAttributes   PRESENT,
1844                                      unauthenticatedAttributes ABSENT })
1845
1846 SignerInfo ::= SEQUENCE {
1847    siVersion                  INTEGER { siVer2(2) } (siVer2),
1848    issuerAndSerialNumber      IssuerAndSerialNumber,
1849    digestAlgorithm            DAlgorithmIdentifier,
1850    authenticatedAttributes    [0] IMPLICIT Attributes  OPTIONAL,
1851    digestEncryptionAlgorithm  DEAlgorithmIdentifier,
1852    encryptedDigest            EncryptedDigest,
1853    unauthenticatedAttributes  [1] IMPLICIT Attributes  OPTIONAL
1854 }
1855
1856 Certificates ::= SEQUENCE OF Certificate
1857
1858 DAlgorithmIdentifiers ::= SEQUENCE OF DAlgorithmIdentifier
1859
1860 DIGEST-ALGORITHM ::= TYPE-IDENTIFIER
1861
1862 DAlgorithmIdentifier ::= SEQUENCE {
1863  algorithm   DIGEST-ALGORITHM.&id({SupportedDigestAlgorithms}),
1864  parameters  DIGEST-ALGORITHM.&Type({SupportedDigestAlgorithms}
1865                                                   {@algorithm}) OPTIONAL
1866 }
1867
1868 SupportedDigestAlgorithms DIGEST-ALGORITHM ::= { sha1 }
1869
1870 sha1 DIGEST-ALGORITHM ::= { NULL IDENTIFIED BY id-sha1 }
1871
1872 DIGEST-ENCRYPTION-ALGORITHM ::= TYPE-IDENTIFIER
1873
1874 DEAlgorithmIdentifier ::= SEQUENCE {
1875    algorithm   DIGEST-ENCRYPTION-ALGORITHM.&id({SupportedDEAlgorithms}),
1876    parameters  DIGEST-ENCRYPTION-ALGORITHM.&Type({SupportedDEAlgorithms}
1877                                                   {@algorithm}) OPTIONAL
1878 }
1879
1880 SupportedDEAlgorithms DIGEST-ENCRYPTION-ALGORITHM ::= {
1881    de-rsaEncryption
1882 }
1883
1884 de-rsaEncryption DIGEST-ENCRYPTION-ALGORITHM ::= {
1885    NULL IDENTIFIED BY id-rsaEncryption }
1886
1887 DigestInfo ::= SEQUENCE {
1888    digestAlgorithm  DAlgorithmIdentifier,
1889    digest           Digest
1890 }
1891
1892 Digest ::= OCTET STRING (SIZE(1..20))
1893
1894 Digests ::= SEQUENCE OF Digest
1895
1896 EnvelopedData ::= SEQUENCE {
1897    edVersion             INTEGER { edVer1(1) } (edVer1),
1898    recipientInfos        RecipientInfos,
1899    encryptedContentInfo  EncryptedContentInfo
1900 }
1901
1902 RecipientInfos ::= SEQUENCE OF RecipientInfo
1903
1904 EncryptedContentInfo ::= SEQUENCE {
1905    contentType                 ContentType,
1906    contentEncryptionAlgorithm  CEAlgorithmIdentifier,
1907    encryptedContent            [0] IMPLICIT EncryptedContent  OPTIONAL
1908 }
1909
1910 EncryptedContent ::= OCTET STRING
1911
1912 CONTENT-ENCRYPTION-ALGORITHM ::= TYPE-IDENTIFIER
1913
1914 CEAlgorithmIdentifier ::= SEQUENCE {
1915    algorithm  CONTENT-ENCRYPTION-ALGORITHM.&id({SupportedCEAlgorithms}),
1916    parameters CONTENT-ENCRYPTION-ALGORITHM.&Type({SupportedCEAlgorithms}
1917                                                   {@algorithm}) OPTIONAL
1918 }
1919
1920 SupportedCEAlgorithms CONTENT-ENCRYPTION-ALGORITHM ::= {
1921    desCDMF |
1922    desCBC
1923 }
1924
1925 desCDMF CONTENT-ENCRYPTION-ALGORITHM ::= {
1926    CBC8Parameter IDENTIFIED BY id-desCDMF }
1927
1928 desCBC CONTENT-ENCRYPTION-ALGORITHM ::= {
1929    CBC8Parameter IDENTIFIED BY id-desCBC }
1930
1931 CBC8Parameter ::= IV8
1932
1933 IV8 ::= OCTET STRING (SIZE(8))
1934
1935 RecipientInfo ::= SEQUENCE {
1936    riVersion               INTEGER { riVer0(0) } (riVer0),
1937    issuerAndSerialNumber   IssuerAndSerialNumber,
1938    keyEncryptionAlgorithm  KEAlgorithmIdentifier,
1939    encryptedKey            EncryptedKey
1940 }
1941
1942 EncryptedKey ::= OCTET STRING
1943
1944 KEY-ENCRYPTION-ALGORITHM ::= TYPE-IDENTIFIER
1945
1946 KEAlgorithmIdentifier ::= SEQUENCE {
1947    algorithm   KEY-ENCRYPTION-ALGORITHM.&id({SupportedKEAlgorithms}),
1948    parameters  KEY-ENCRYPTION-ALGORITHM.&Type({SupportedKEAlgorithms}
1949                                                   {@algorithm}) OPTIONAL
1950 }
1951
1952 SupportedKEAlgorithms KEY-ENCRYPTION-ALGORITHM ::= {
1953    key-rsaOAEPEncryptionSET
1954 }
1955
1956 key-rsaOAEPEncryptionSET KEY-ENCRYPTION-ALGORITHM ::= {
1957    NULL IDENTIFIED BY rsaOAEPEncryptionSET }
1958
1959 DigestedData ::= SEQUENCE {
1960    ddVersion        INTEGER { ddVer0(0) } (ddVer0),
1961    digestAlgorithm  DAlgorithmIdentifier,
1962    contentInfo      ContentInfo,
1963    digest           OCTET STRING
1964 }
1965
1966 EncryptedDigest ::= OCTET STRING
1967
1968 Attributes ::= SEQUENCE OF Attribute
1969
1970 -- Cryptographic Parameterized Types --
1971
1972 L { T1, T2 } ::= SEQUENCE {                     -- Linkage from t1 to t2
1973    t1  T1,
1974    t2  DD { T2 }                                  -- PKCS#7 DigestedData
1975 }
1976
1977 DD { ToBeHashed } ::= DetachedDigest
1978    (CONSTRAINED BY { -- digest of the DER representation, including --
1979                      -- the tag and length octets, of -- ToBeHashed })
1980
1981 DetachedDigest ::= DigestedData                          -- No parameter
1982    (WITH COMPONENTS {..., contentInfo (WITH COMPONENTS
1983                     {..., contentType (id-set-data), content ABSENT}) })
1984
1985
1986 H { ToBeHashed } ::= OCTET STRING (SIZE(1..20)) (CONSTRAINED BY {
1987         -- HASH is an n-byte value, which must be the results --
1988         -- of the application of a valid digest procedure     --
1989         -- applied to -- ToBeHashed })
1990
1991 HMAC { ToBeHashed, Key } ::= Digest
1992   (CONSTRAINED BY { -- HMAC keyed digest of -- ToBeHashed,
1993                                                       -- using -- Key })
1994
1995 HMACPanData ::= SEQUENCE {           -- For HMAC, unique cardholder data
1996    pan         PAN,
1997    cardExpiry  CardExpiry
1998 }
1999
2000 S { Signer, ToBeSigned } ::= SignedData
2001    (CONSTRAINED BY { Signer, -- signs -- ToBeSigned })
2002    (WITH COMPONENTS { ..., contentInfo
2003         (WITH COMPONENTS {
2004                   ..., contentType (id-set-data), content PRESENT }) } ^
2005     WITH COMPONENTS { ..., signerInfos (SIZE(1)) })
2006
2007 SO { Signer, ToBeSigned } ::= SignedData             -- Detached content
2008    (CONSTRAINED BY { Signer, -- signs -- ToBeSigned })
2009    (WITH COMPONENTS { ..., contentInfo
2010        (WITH COMPONENTS{
2011                   ..., contentType (id-set-data),  content ABSENT }) } ^
2012     WITH COMPONENTS { ..., signerInfos (SIZE(1)) })
2013
2014
2015 -- Set Encapsulation Types
2016
2017
2018 -- Simple Encapsulation with Signature --
2019
2020 Enc { Signer, Recipient, T } ::= E {
2021    Recipient,
2022    S { Signer, T }
2023 } (WITH COMPONENTS { ..., encryptedContentInfo
2024                   (WITH COMPONENTS { ..., contentType (signedData) }) })
2025
2026
2027 -- Simple Encapsulation with Signature and a Provided Key --
2028
2029 EncK { Key, Signer, T } ::= EK {
2030    Key,
2031    S { Signer, T }
2032 } (WITH COMPONENTS { ..., encryptedContentInfo
2033                   (WITH COMPONENTS { ..., contentType (signedData) }) })
2034
2035
2036 -- Extra Encapsulation with Signature --
2037
2038 EncX { Signer, Recipient, T, Parameter } ::= E {
2039    Recipient,
2040     SEQUENCE {
2041        t  T,
2042        s  SO { Signer, SEQUENCE { t  T, p  Parameter } }
2043     }
2044 } (CONSTRAINED BY { Parameter -- data, which must contain a fresh --
2045                     -- nonce 'n', is included in the OAEP block.  -- } )
2046   (WITH COMPONENTS { ..., encryptedContentInfo
2047                  (WITH COMPONENTS { ..., contentType (id-set-data) }) })
2048
2049
2050 -- Simple Encapsulation with Signature and Baggage --
2051
2052 EncB { Signer, Recipient, T, Baggage } ::= SEQUENCE {
2053    enc      Enc { Signer, Recipient, L { T, Baggage } },
2054    baggage  Baggage
2055 }
2056
2057
2058 -- Extra Encapsulation with Signature and Baggage --
2059
2060 EncBX { Signer, Recipient, T, Baggage, Parameter } ::= SEQUENCE {
2061    encX     EncX { Signer, Recipient, L { T, Baggage }, Parameter },
2062    baggage  Baggage
2063 }
2064
2065
2066 -- Other Cryptographic Messages --
2067
2068 E { Recipient, ToBeEnveloped } ::= EnvelopedData
2069    (CONSTRAINED BY { ToBeEnveloped, -- is encrypted, and the --
2070                       -- fresh session key is encrypted using the --
2071                       -- public key of -- Recipient } )
2072    (WITH COMPONENTS {..., encryptedContentInfo
2073                  (WITH COMPONENTS { ..., encryptedContent PRESENT }) } ^
2074     WITH COMPONENTS { ..., recipientInfos (SIZE(1)) })
2075
2076 EH { Recipient, ToBeEnveloped } ::= E {
2077    Recipient,
2078    ToBeEnveloped
2079 } (CONSTRAINED BY { -- H(ToBeEnveloped) included in the OAEP block -- })
2080
2081 EX { Recipient, ToBeEnveloped, Parameter } ::= E {
2082    Recipient,
2083    L { ToBeEnveloped, Parameter }
2084 }(CONSTRAINED BY { Parameter -- data is included in the OAEP block -- })
2085  (WITH COMPONENTS { ..., encryptedContentInfo
2086                  (WITH COMPONENTS { ..., contentType (id-set-data) }) })
2087
2088 EXH { Recipient, ToBeEnveloped, Parameter } ::= EX {
2089    Recipient,
2090    ToBeEnveloped,
2091    Parameter
2092 } (CONSTRAINED BY { -- H(ToBeEnveloped) included in the OAEP block -- })
2093
2094 EK { Key, ToBeEnveloped } ::= EnvelopedData
2095    (CONSTRAINED BY { ToBeEnveloped, -- encrypted with session -- Key } )
2096    (WITH COMPONENTS { ..., encryptedContentInfo
2097                   (WITH COMPONENTS { ..., encryptedContent PRESENT}) } ^
2098     WITH COMPONENTS { ..., recipientInfos (SIZE(0)) })
2099
2100 ENTITY-IDENTIFIER ::= TYPE-IDENTIFIER             -- Generic placeholder
2101
2102 C  ::= ENTITY-IDENTIFIER  -- Cardholder
2103 M  ::= ENTITY-IDENTIFIER  -- Merchant
2104 P  ::= ENTITY-IDENTIFIER  -- Payment Gateway
2105 EE ::= ENTITY-IDENTIFIER  -- End Entity
2106 CA ::= ENTITY-IDENTIFIER  -- Certifying Authority
2107 P1 ::= ENTITY-IDENTIFIER  -- Gateway One
2108 P2 ::= ENTITY-IDENTIFIER  -- Gateway Two
2109
2110 -- Object Identifiers --
2111
2112 secsig OBJECT IDENTIFIER ::= {
2113    iso(1) identified-organization(3) oiw(14) secsig(3) }
2114
2115 pkcs-1 OBJECT IDENTIFIER ::= {
2116    iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 1 }
2117
2118 rsaOAEPEncryptionSET OBJECT IDENTIFIER ::= {
2119    pkcs-1 6 }
2120
2121 id-rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 }
2122
2123 id-sha1-with-rsa-signature  OBJECT IDENTIFIER ::= { pkcs-1 5 }
2124
2125 id-sha1  OBJECT IDENTIFIER ::= { secsig 2 26 }
2126
2127 id-desCBC  OBJECT IDENTIFIER ::= { secsig 2 7 }
2128
2129 id-desCDMF  OBJECT IDENTIFIER ::= {
2130    secsig 2 99 }                     -- A real one to be supplied by IBM
2131
2132 pkcs-7 OBJECT IDENTIFIER ::= {
2133    iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 7 }
2134
2135 data OBJECT IDENTIFIER ::= { pkcs-7 1 }
2136 signedData OBJECT IDENTIFIER ::= { pkcs-7 2 }
2137 envelopedData OBJECT IDENTIFIER ::= { pkcs-7 3 }
2138 digestedData OBJECT IDENTIFIER ::= { pkcs-7 5 }
2139
2140 pkcs-9 OBJECT IDENTIFIER ::= {
2141    iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) 9 }
2142
2143 contentType OBJECT IDENTIFIER ::= { pkcs-9 3 }
2144
2145 messageDigest OBJECT IDENTIFIER ::= { pkcs-9 4 }
2146
2147 id-set-data OBJECT IDENTIFIER ::= { id-set 99 }
2148
2149
2150 END
            

Please e-mail any comments to webmaster