RFC 4357 - Additional Cryptographic Algorithms for Use with(3)

时间:2006-11-02 来源: 作者: 点击:
cryptographic-Gost-Useful-Definitions FROMCryptographic-Gost-Useful-Definitions {iso(1)member-body(2)ru(643)rans(2) cryptopro(2)other(1)modules(1) cryptographic-Gost-Useful-Definitions(0)1} Gost28147
  
           cryptographic-Gost-Useful-Definitions
           FROM Cryptographic-Gost-Useful-Definitions
               { iso(1) member-body(2) ru(643) rans(2)
                 cryptopro(2) other(1) modules(1)
                 cryptographic-Gost-Useful-Definitions(0) 1 }
           Gost28147-89-ParamSet
           FROM Gost28147-89-EncryptionSyntax
                gost28147-89-EncryptionSyntax
           id-GostR3411-94-TestParamSet,
           id-GostR3411-94-CryptoProParamSet
           FROM GostR3411-94-DigestSyntax gostR3411-94-DigestSyntax
       ;
     -- GOST R 34.10-94 OIDs
       id-GostR3410-94 OBJECT IDENTIFIER ::=
           { id-CryptoPro-algorithms gostR3410-94(20) }
       id-GostR3410-94DH OBJECT IDENTIFIER ::=
           { id-CryptoPro-algorithms gostR3410-94DH(99) }
       id-GostR3411-94-with-GostR3410-94 OBJECT IDENTIFIER ::=
           { id-CryptoPro-algorithms
             gostR3411-94-with-gostR3410-94(4) }
     -- GOST R 34.10-94 public key parameter set OIDs
       id-GostR3410-94-TestParamSet OBJECT IDENTIFIER ::=

           { id-CryptoPro-signs test(0) }
       id-GostR3410-94-CryptoPro-A-ParamSet OBJECT IDENTIFIER ::=
           { id-CryptoPro-signs cryptopro-A(2) }
       id-GostR3410-94-CryptoPro-B-ParamSet OBJECT IDENTIFIER ::=
           { id-CryptoPro-signs cryptopro-B(3) }
       id-GostR3410-94-CryptoPro-C-ParamSet OBJECT IDENTIFIER ::=
           { id-CryptoPro-signs cryptopro-C(4) }
       id-GostR3410-94-CryptoPro-D-ParamSet OBJECT IDENTIFIER ::=
           { id-CryptoPro-signs cryptopro-D(5) }
       id-GostR3410-94-CryptoPro-XchA-ParamSet OBJECT IDENTIFIER ::=
           { id-CryptoPro-exchanges cryptopro-XchA(1) }
       id-GostR3410-94-CryptoPro-XchB-ParamSet OBJECT IDENTIFIER ::=
           { id-CryptoPro-exchanges cryptopro-XchB(2) }
       id-GostR3410-94-CryptoPro-XchC-ParamSet OBJECT IDENTIFIER ::=
           { id-CryptoPro-exchanges cryptopro-XchC(3) }
     -- GOST R 34.10-94 data types
       GostR3410-94-CertificateSignature ::=
           BIT STRING ( SIZE(256..512) )
       GostR3410-94-PublicKey ::=
           OCTET STRING ( SIZE(
                           64 |    -- Only for testing purposes
                           128
                           ) )
       GostR3410-94-PublicKeyParameters ::=
           SEQUENCE {
               publicKeyParamSet
                   OBJECT IDENTIFIER (
                       id-GostR3410-94-TestParamSet |
                           -- Only for testing purposes
                       id-GostR3410-94-CryptoPro-A-ParamSet |
                       id-GostR3410-94-CryptoPro-B-ParamSet |
                       id-GostR3410-94-CryptoPro-C-ParamSet |
                       id-GostR3410-94-CryptoPro-D-ParamSet |
                       id-GostR3410-94-CryptoPro-XchA-ParamSet |
                       id-GostR3410-94-CryptoPro-XchB-ParamSet |
                       id-GostR3410-94-CryptoPro-XchC-ParamSet
                   ),
               digestParamSet
                   OBJECT IDENTIFIER (
                       id-GostR3411-94-TestParamSet |
                           -- Only for testing purposes
                       id-GostR3411-94-CryptoProParamSet
                   ),
               encryptionParamSet Gost28147-89-ParamSet OPTIONAL
           }
       GostR3410-94-PublicKeyAlgorithms  ALGORITHM-IDENTIFIER ::= {
           { GostR3410-94-PublicKeyParameters IDENTIFIED BY
                           id-GostR3410-94 }

       }
   END -- GostR3410-94-PKISyntax

10.7.  GostR3410-94-ParamSetSyntax

   GostR3410-94-ParamSetSyntax
       { iso(1) member-body(2) ru(643) rans(2) cryptopro(2)
         other(1) modules(1) gostR3410-94-ParamSetSyntax(8) 1 }
   DEFINITIONS ::=
   BEGIN
   -- EXPORTS All --
   -- The types and values defined in this module are exported for
   -- use in the other ASN.1 modules contained within the Russian
   -- Cryptography "GOST" & "GOST R" Specifications, and for the use
   -- of other applications that will use them to access Russian
   -- Cryptography services.  Other applications may use them for
   -- their own purposes, but this will not constrain extensions and
   -- modifications needed to maintain or improve the Russian
   -- Cryptography service.
       IMPORTS
           id-CryptoPro-algorithms,
           id-CryptoPro-signs, id-CryptoPro-exchanges,
           gostR3410-94-PKISyntax, ALGORITHM-IDENTIFIER,
           cryptographic-Gost-Useful-Definitions
           FROM Cryptographic-Gost-Useful-Definitions
               { iso(1) member-body(2) ru(643) rans(2)
                 cryptopro(2) other(1) modules(1)
                 cryptographic-Gost-Useful-Definitions(0) 1 }
           id-GostR3410-94,
           id-GostR3410-94-TestParamSet,
           id-GostR3410-94-CryptoPro-A-ParamSet,
           id-GostR3410-94-CryptoPro-B-ParamSet,
           id-GostR3410-94-CryptoPro-C-ParamSet,
           id-GostR3410-94-CryptoPro-D-ParamSet,
           id-GostR3410-94-CryptoPro-XchA-ParamSet,
           id-GostR3410-94-CryptoPro-XchB-ParamSet,
           id-GostR3410-94-CryptoPro-XchC-ParamSet
           FROM GostR3410-94-PKISyntax gostR3410-94-PKISyntax
           AlgorithmIdentifier
           FROM PKIX1Explicit88 {iso(1) identified-organization(3)
           dod(6) internet(1) security(5) mechanisms(5) pkix(7)
           id-mod(0) id-pkix1-explicit-88(1)}
       ;
     -- GOST R 34.10-94 public key parameter sets:
     -- OIDs for parameter sets are imported from
     -- GostR3410-94-PKISyntax
       GostR3410-94-ParamSetParameters-t ::= INTEGER (512 | 1024)
                   -- 512 - only for testing purposes

       GostR3410-94-ParamSetParameters ::=
           SEQUENCE {
               t GostR3410-94-ParamSetParameters-t,
               p INTEGER,  -- 2^1020 < p < 2^1024 or 2^509 < p < 2^512
               q INTEGER,  --  2^254 < q < 2^256
               a INTEGER,  --      1 < a < p-1 < 2^1024-1
               validationAlgorithm
                   AlgorithmIdentifier OPTIONAL
                   -- {{ GostR3410-94-ValidationAlgorithms }}
           }
       GostR3410-94-ParamSetAlgorithm ALGORITHM-IDENTIFIER ::= {
           { GostR3410-94-ParamSetParameters IDENTIFIED BY
                   id-GostR3410-94-TestParamSet } |
           { GostR3410-94-ParamSetParameters IDENTIFIED BY
                   id-GostR3410-94-CryptoPro-A-ParamSet  } |
           { GostR3410-94-ParamSetParameters IDENTIFIED BY
                   id-GostR3410-94-CryptoPro-B-ParamSet  } |
           { GostR3410-94-ParamSetParameters IDENTIFIED BY
                   id-GostR3410-94-CryptoPro-C-ParamSet  } |
           { GostR3410-94-ParamSetParameters IDENTIFIED BY
                   id-GostR3410-94-CryptoPro-D-ParamSet  } |
           { GostR3410-94-ParamSetParameters IDENTIFIED BY
                   id-GostR3410-94-CryptoPro-XchA-ParamSet  } |
           { GostR3410-94-ParamSetParameters IDENTIFIED BY
                   id-GostR3410-94-CryptoPro-XchB-ParamSet  } |
           { GostR3410-94-ParamSetParameters IDENTIFIED BY
                   id-GostR3410-94-CryptoPro-XchC-ParamSet  }
       }
     -- GOST R 34.10-94 validation/constructor
       id-GostR3410-94-a           OBJECT IDENTIFIER ::=
           { id-GostR3410-94 a(1) }
       id-GostR3410-94-aBis        OBJECT IDENTIFIER ::=
           { id-GostR3410-94 aBis(2) }
       id-GostR3410-94-b           OBJECT IDENTIFIER ::=
           { id-GostR3410-94 b(3) }
       id-GostR3410-94-bBis        OBJECT IDENTIFIER ::=
           { id-GostR3410-94 bBis(4) }
       GostR3410-94-ValidationParameters-c ::=
           INTEGER (0 ..  65535)
       GostR3410-94-ValidationParameters ::=
           SEQUENCE {
               x0   GostR3410-94-ValidationParameters-c,
               c    GostR3410-94-ValidationParameters-c,
               d    INTEGER OPTIONAL -- 1 < d < p-1 < 2^1024-1

           }
       GostR3410-94-ValidationBisParameters-c ::=
           INTEGER (0 ..  4294967295)

       GostR3410-94-ValidationBisParameters ::=
           SEQUENCE {
               x0   GostR3410-94-ValidationBisParameters-c,
               c    GostR3410-94-ValidationBisParameters-c,
               d    INTEGER OPTIONAL -- 1 < d < p-1 < 2^1024-1

           }
       GostR3410-94-ValidationAlgorithms  ALGORITHM-IDENTIFIER ::= {
           { GostR3410-94-ValidationParameters IDENTIFIED BY
                 id-GostR3410-94-a } |
           { GostR3410-94-ValidationBisParameters IDENTIFIED BY
                           id-GostR3410-94-aBis } |
           { GostR3410-94-ValidationParameters IDENTIFIED BY
                           id-GostR3410-94-b } |
           { GostR3410-94-ValidationBisParameters IDENTIFIED BY
                           id-GostR3410-94-bBis }
       }
   END -- GostR3410-94-ParamSetSyntax

10.8.  GostR3410-2001-PKISyntax

   GostR3410-2001-PKISyntax
       { iso(1) member-body(2) ru(643) rans(2) cryptopro(2)
         other(1) modules(1) gostR3410-2001-PKISyntax(9) 1 }
   DEFINITIONS ::=
   BEGIN
   -- EXPORTS All --
   -- The types and values defined in this module are exported for
   -- use in the other ASN.1 modules contained within the Russian
   -- Cryptography "GOST" & "GOST R" Specifications, and for the use
   -- of other applications that will use them to access Russian
   -- Cryptography services.  Other applications may use them for
   -- their own purposes, but this will not constrain extensions and
   -- modifications needed to maintain or improve the Russian
   -- Cryptography service.
       IMPORTS
           id-CryptoPro-algorithms,
           id-CryptoPro-ecc-signs, id-CryptoPro-ecc-exchanges,
           gost28147-89-EncryptionSyntax,
           gostR3411-94-DigestSyntax, ALGORITHM-IDENTIFIER,
           cryptographic-Gost-Useful-Definitions
           FROM Cryptographic-Gost-Useful-Definitions
               { iso(1) member-body(2) ru(643) rans(2)
                 cryptopro(2) other(1) modules(1)
                 cryptographic-Gost-Useful-Definitions(0) 1 }
           Gost28147-89-ParamSet
           FROM Gost28147-89-EncryptionSyntax
                gost28147-89-EncryptionSyntax

           id-GostR3411-94-TestParamSet,
           id-GostR3411-94-CryptoProParamSet
           FROM GostR3411-94-DigestSyntax gostR3411-94-DigestSyntax
       ;
     -- GOST R 34.10-2001 OIDs
       id-GostR3410-2001 OBJECT IDENTIFIER ::=
           { id-CryptoPro-algorithms gostR3410-2001(19) }
       id-GostR3410-2001DH OBJECT IDENTIFIER ::=
           { id-CryptoPro-algorithms gostR3410-2001DH(98) }
       id-GostR3411-94-with-GostR3410-2001 OBJECT IDENTIFIER ::=
           { id-CryptoPro-algorithms
             gostR3411-94-with-gostR3410-2001(3) }
     -- GOST R 34.10-2001 public key parameter set OIDs
       id-GostR3410-2001-TestParamSet OBJECT IDENTIFIER ::=
           { id-CryptoPro-ecc-signs test(0) }
       id-GostR3410-2001-CryptoPro-A-ParamSet OBJECT IDENTIFIER ::=
           { id-CryptoPro-ecc-signs cryptopro-A(1) }
       id-GostR3410-2001-CryptoPro-B-ParamSet OBJECT IDENTIFIER ::=
           { id-CryptoPro-ecc-signs cryptopro-B(2) }
       id-GostR3410-2001-CryptoPro-C-ParamSet OBJECT IDENTIFIER ::=
           { id-CryptoPro-ecc-signs cryptopro-C(3) }
       id-GostR3410-2001-CryptoPro-XchA-ParamSet
           OBJECT IDENTIFIER ::=
                   { id-CryptoPro-ecc-exchanges cryptopro-XchA(0) }
       id-GostR3410-2001-CryptoPro-XchB-ParamSet
           OBJECT IDENTIFIER ::=
                   { id-CryptoPro-ecc-exchanges cryptopro-XchB(1) }
     -- GOST R 34.10-2001 Data Types
       GostR3410-2001-CertificateSignature ::=
           BIT STRING ( SIZE(256..512) )
       GostR3410-2001-PublicKey ::=
           OCTET STRING ( SIZE(64) )
       GostR3410-2001-PublicKeyParameters ::=
           SEQUENCE {
               publicKeyParamSet
                   OBJECT IDENTIFIER (
                       id-GostR3410-2001-TestParamSet |
                           -- Only for testing purposes
                       id-GostR3410-2001-CryptoPro-A-ParamSet |
                       id-GostR3410-2001-CryptoPro-B-ParamSet |
                       id-GostR3410-2001-CryptoPro-C-ParamSet |
                       id-GostR3410-2001-CryptoPro-XchA-ParamSet |
                       id-GostR3410-2001-CryptoPro-XchB-ParamSet
                   ),
               digestParamSet
                   OBJECT IDENTIFIER (
                       id-GostR3411-94-TestParamSet |
                           -- Only for testing purposes

                       id-GostR3411-94-CryptoProParamSet
                   ),
               encryptionParamSet Gost28147-89-ParamSet OPTIONAL
           }
       GostR3410-2001-PublicKeyAlgorithms  ALGORITHM-IDENTIFIER ::= {
           { GostR3410-2001-PublicKeyParameters IDENTIFIED BY
                           id-GostR3410-2001 }
       }
   END -- GostR3410-2001-PKISyntax

10.9.  GostR3410-2001-ParamSetSyntax

   GostR3410-2001-ParamSetSyntax
       { iso(1) member-body(2) ru(643) rans(2) cryptopro(2)
         other(1) modules(1) gostR3410-2001-ParamSetSyntax(12) 1 }
   DEFINITIONS ::=
   BEGIN
   -- EXPORTS All --
   -- The types and values defined in this module are exported for
   -- use in the other ASN.1 modules contained within the Russian
   -- Cryptography "GOST" & "GOST R" Specifications, and for the use
   -- of other applications that will use them to access Russian
   -- Cryptography services.  Other applications may use them for
   -- their own purposes, but this will not constrain extensions and
   -- modifications needed to maintain or improve the Russian
   -- Cryptography service.
       IMPORTS
           gostR3410-2001-PKISyntax, ALGORITHM-IDENTIFIER,
           cryptographic-Gost-Useful-Definitions
           FROM Cryptographic-Gost-Useful-Definitions
               { iso(1) member-body(2) ru(643) rans(2)
                 cryptopro(2) other(1) modules(1)
                 cryptographic-Gost-Useful-Definitions(0) 1 }
           id-GostR3410-2001,
           id-GostR3410-2001-TestParamSet,
           id-GostR3410-2001-CryptoPro-A-ParamSet,
           id-GostR3410-2001-CryptoPro-B-ParamSet,
           id-GostR3410-2001-CryptoPro-C-ParamSet,
           id-GostR3410-2001-CryptoPro-XchA-ParamSet,
           id-GostR3410-2001-CryptoPro-XchB-ParamSet
           FROM GostR3410-2001-PKISyntax gostR3410-2001-PKISyntax
       ;
       GostR3410-2001-ParamSetParameters ::=
           SEQUENCE {
               a INTEGER,  -- 0 < a < p < 2^256
               b INTEGER,  -- 0 < b < p < 2^256
               p INTEGER,  -- 2^254 < p < 2^256
               q INTEGER,  -- 2^254 < q < 2^256

               x INTEGER,  -- 0 < x < p < 2^256
               y INTEGER   -- 0 < y < p < 2^256
           }
     -- GOST R 34.10-2001 public key parameter set:
     -- OIDs for parameter sets are imported from
     -- GostR3410-2001-PKISyntax
       GostR3410-2001-ParamSetAlgorithm ALGORITHM-IDENTIFIER ::= {
           { GostR3410-2001-ParamSetParameters IDENTIFIED BY
                   id-GostR3410-2001-TestParamSet } |
           { GostR3410-2001-ParamSetParameters IDENTIFIED BY
                   id-GostR3410-2001-CryptoPro-A-ParamSet  } |
           { GostR3410-2001-ParamSetParameters IDENTIFIED BY
                   id-GostR3410-2001-CryptoPro-B-ParamSet  } |
           { GostR3410-2001-ParamSetParameters IDENTIFIED BY
                   id-GostR3410-2001-CryptoPro-C-ParamSet  } |
           { GostR3410-2001-ParamSetParameters IDENTIFIED BY
                   id-GostR3410-2001-CryptoPro-XchA-ParamSet  } |
           { GostR3410-2001-ParamSetParameters IDENTIFIED BY
                   id-GostR3410-2001-CryptoPro-XchB-ParamSet  }
       }
   END -- GostR3410-2001-ParamSetSyntax

11.  Appendix Parameters

   Parameters here are given as SEQUENCE OF AlgorithmIdentifier in ASN.1
   DER encoding [X.660], stored in the same format as the examples in
   [RFC4134], can be extracted using the same program.

   If you want to extract without the program, copy all the lines
   between the "|>" and "|<" markers, remove any page breaks, and remove
   the "|" in the first column of each line.  The result is a valid
   Base64 blob that can be processed by any Base64 decoder.

11.1.  Encryption Algorithm Parameters

   For each AlgorithmIdentifier in this sequence, the parameters field
   contains Gost28147-89-ParamSetParameters.

       0 30  480: SEQUENCE {
       4 30   94:  SEQUENCE {
       6 06    7:   OBJECT IDENTIFIER
                :    id-Gost28147-89-TestParamSet
      15 30   83:   SEQUENCE {
      17 04   64:    OCTET STRING
                :     4C DE 38 9C 29 89 EF B6 FF EB 56 C5 5E C2 9B 02
                :     98 75 61 3B 11 3F 89 60 03 97 0C 79 8A A1 D5 5D
                :     E2 10 AD 43 37 5D B3 8E B4 2C 77 E7 CD 46 CA FA
                :     D6 6A 20 1F 70 F4 1E A4 AB 03 F2 21 65 B8 44 D8

      83 02    1:    INTEGER 0
      86 02    1:    INTEGER 64
      89 30    9:    SEQUENCE {
      91 06    7:     OBJECT IDENTIFIER
                :      id-Gost28147-89-None-KeyMeshing
                :     }
                :    }
                :   }
     100 30   94:  SEQUENCE {
     102 06    7:   OBJECT IDENTIFIER
                :    id-Gost28147-89-CryptoPro-A-ParamSet
     111 30   83:   SEQUENCE {
     113 04   64:    OCTET STRING

                      --  K1 K2 K3 K4 K5 K6 K7 K8
                      --  9  3  E  E  B  3  1  B
                      --  6  7  4  7  5  A  D  A
                      --  3  E  6  A  1  D  2  F
                      --  2  9  2  C  9  C  9  5
                      --  8  8  B  D  8  1  7  0
                      --  B  A  3  1  D  2  A  C
                      --  1  F  D  3  F  0  6  E
                      --  7  0  8  9  0  B  0  8
                      --  A  5  C  0  E  7  8  6
                      --  4  2  F  2  4  5  C  2
                      --  E  6  5  B  2  9  4  3
                      --  F  C  A  4  3  4  5  9
                      --  C  B  0  F  C  8  F  1
                      --  0  4  7  8  7  F  3  7
                      --  D  D  1  5  A  E  B  D
                      --  5  1  9  6  6  6  E  4

                :     93 EE B3 1B 67 47 5A DA 3E 6A 1D 2F 29 2C 9C 95
                :     88 BD 81 70 BA 31 D2 AC 1F D3 F0 6E 70 89 0B 08
                :     A5 C0 E7 86 42 F2 45 C2 E6 5B 29 43 FC A4 34 59
                :     CB 0F C8 F1 04 78 7F 37 DD 15 AE BD 51 96 66 E4
     179 02    1:    INTEGER 1
     182 02    1:    INTEGER 64
     185 30    9:    SEQUENCE {
     187 06    7:     OBJECT IDENTIFIER
                :      id-Gost28147-89-CryptoPro-KeyMeshing
                :     }
                :    }
                :   }
     196 30   94:  SEQUENCE {
     198 06    7:   OBJECT IDENTIFIER
------分隔线----------------------------
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
最新评论 查看所有评论
发表评论 查看所有评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 密码: 验证码:
推荐内容