rfc9337.original | rfc9337.txt | |||
---|---|---|---|---|
Network Working Group E.K. Karelina, Ed. | Independent Submission E. Karelina, Ed. | |||
Internet-Draft InfoTeCS | Request for Comments: 9337 InfoTeCS | |||
Intended status: Informational 28 September 2022 | Category: Informational December 2022 | |||
Expires: 1 April 2023 | ISSN: 2070-1721 | |||
Generating Password-based Keys Using the GOST Algorithms | Generating Password-Based Keys Using the GOST Algorithms | |||
draft-pkcs5-gost-09 | ||||
Abstract | Abstract | |||
This document specifies how to use the Password-Based Cryptography | This document specifies how to use "PKCS #5: Password-Based | |||
Specification version 2.1 (PKCS #5) defined in RFC8018 to generate a | Cryptography Specification Version 2.1" (RFC 8018) to generate a | |||
symmetric key from a password in conjunction with the Russian | symmetric key from a password in conjunction with the Russian | |||
national standard GOST algorithms. | national standard GOST algorithms. | |||
PKCS #5 applies a pseudorandom function (a cryptographic hash, | PKCS #5 applies a Pseudorandom Function (PRF) -- a cryptographic | |||
cipher, or HMAC) to the input password along with a salt value and | hash, cipher, or Hash-Based Message Authentication Code (HMAC) -- to | |||
repeats the process many times to produce a derived key. | the input password along with a salt value and repeats the process | |||
many times to produce a derived key. | ||||
This specification is developed outside the IETF and is published to | This specification has been developed outside the IETF. The purpose | |||
facilitate interoperable implementations that wish to support the | of publication being to facilitate interoperable implementations that | |||
GOST algorithms. This document does not imply IETF endorsement of | wish to support the GOST algorithms. This document does not imply | |||
the cryptographic algorithms used in this document. | IETF endorsement of the cryptographic algorithms used here. | |||
Status of This Memo | Status of This Memo | |||
This Internet-Draft is submitted in full conformance with the | This document is not an Internet Standards Track specification; it is | |||
provisions of BCP 78 and BCP 79. | published for informational purposes. | |||
Internet-Drafts are working documents of the Internet Engineering | ||||
Task Force (IETF). Note that other groups may also distribute | ||||
working documents as Internet-Drafts. The list of current Internet- | ||||
Drafts is at https://datatracker.ietf.org/drafts/current/. | ||||
Internet-Drafts are draft documents valid for a maximum of six months | This is a contribution to the RFC Series, independently of any other | |||
and may be updated, replaced, or obsoleted by other documents at any | RFC stream. The RFC Editor has chosen to publish this document at | |||
time. It is inappropriate to use Internet-Drafts as reference | its discretion and makes no statement about its value for | |||
material or to cite them other than as "work in progress." | implementation or deployment. Documents approved for publication by | |||
the RFC Editor are not candidates for any level of Internet Standard; | ||||
see Section 2 of RFC 7841. | ||||
This Internet-Draft will expire on 1 April 2023. | Information about the current status of this document, any errata, | |||
and how to provide feedback on it may be obtained at | ||||
https://www.rfc-editor.org/info/rfc9337. | ||||
Copyright Notice | Copyright Notice | |||
Copyright (c) 2022 IETF Trust and the persons identified as the | Copyright (c) 2022 IETF Trust and the persons identified as the | |||
document authors. All rights reserved. | document authors. All rights reserved. | |||
This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
Provisions Relating to IETF Documents (https://trustee.ietf.org/ | Provisions Relating to IETF Documents | |||
license-info) in effect on the date of publication of this document. | (https://trustee.ietf.org/license-info) in effect on the date of | |||
Please review these documents carefully, as they describe your rights | publication of this document. Please review these documents | |||
and restrictions with respect to this document. Code Components | carefully, as they describe your rights and restrictions with respect | |||
extracted from this document must include Revised BSD License text as | to this document. | |||
described in Section 4.e of the Trust Legal Provisions and are | ||||
provided without warranty as described in the Revised BSD License. | ||||
Table of Contents | Table of Contents | |||
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 | 1. Introduction | |||
2. Conventions Used in This Document . . . . . . . . . . . . . . 3 | 2. Conventions Used in This Document | |||
3. Basic Terms and Definitions . . . . . . . . . . . . . . . . . 3 | 3. Basic Terms and Definitions | |||
4. Algorithm For Generating a Key From a Password . . . . . . . 4 | 4. Algorithm for Generating a Key from a Password | |||
5. Data Encryption . . . . . . . . . . . . . . . . . . . . . . . 5 | 5. Data Encryption | |||
5.1. GOST R 34.12-2015 Data Encryption . . . . . . . . . . . . 5 | 5.1. GOST R 34.12-2015 Data Encryption | |||
5.1.1. Encryption . . . . . . . . . . . . . . . . . . . . . 5 | 5.1.1. Encryption | |||
5.1.2. Decryption . . . . . . . . . . . . . . . . . . . . . 6 | 5.1.2. Decryption | |||
6. Message Authentication . . . . . . . . . . . . . . . . . . . 8 | 6. Message Authentication | |||
6.1. MAC Generation . . . . . . . . . . . . . . . . . . . . . 8 | 6.1. MAC Generation | |||
6.2. MAC Verification . . . . . . . . . . . . . . . . . . . . 8 | 6.2. MAC Verification | |||
7. Identifiers and Parameters . . . . . . . . . . . . . . . . . 9 | 7. Identifiers and Parameters | |||
7.1. PBKDF2 . . . . . . . . . . . . . . . . . . . . . . . . . 9 | 7.1. PBKDF2 | |||
7.2. PBES2 . . . . . . . . . . . . . . . . . . . . . . . . . . 10 | 7.2. PBES2 | |||
7.3. Identifier and Parameters of Gost34.12-2015 Encryption | 7.3. Identifier and Parameters of Gost34.12-2015 Encryption | |||
Scheme . . . . . . . . . . . . . . . . . . . . . . . . . 11 | Scheme | |||
7.4. PBMAC1 . . . . . . . . . . . . . . . . . . . . . . . . . 12 | 7.4. PBMAC1 | |||
8. Security Considerations . . . . . . . . . . . . . . . . . . . 13 | 8. Security Considerations | |||
9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 | 9. IANA Considerations | |||
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 13 | 10. References | |||
Appendix A. PBKDF2 HMAC_GOSTR3411 Test Vectors . . . . . . . . . 14 | 10.1. Normative References | |||
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 16 | 10.2. Informative References | |||
Appendix A. PBKDF2 HMAC_GOSTR3411 Test Vectors | ||||
Acknowledgments | ||||
Author's Address | ||||
1. Introduction | 1. Introduction | |||
This document provides a specification of usage of GOST R 34.12-2015 | This document provides a specification of usage of GOST R 34.12-2015 | |||
encryption algorithms and the GOST R 34.11-2012 hashing functions | encryption algorithms and the GOST R 34.11-2012 hashing functions | |||
with PKCS #5. The methods described in this document are designed to | with PKCS #5. The methods described in this document are designed to | |||
generate key information using the user's password and to protect | generate key information using the user's password and to protect | |||
information using the generated keys. | information using the generated keys. | |||
2. Conventions Used in This Document | 2. Conventions Used in This Document | |||
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", | |||
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and | |||
"OPTIONAL" in this document are to be interpreted as described in BCP | "OPTIONAL" in this document are to be interpreted as described in | |||
14 [RFC2119] [RFC8174] when, and only when, they appear in all | BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all | |||
capitals, as shown here. | capitals, as shown here. | |||
3. Basic Terms and Definitions | 3. Basic Terms and Definitions | |||
Throughout this document, the following notation is used: | Throughout this document, the following notation is used: | |||
+==========+======================================================+ | +==========+====================================================+ | |||
+==========+======================================================+ | | Notation | Definition | | |||
| P | a password encoded as a Unicode UTF-8 string | | +==========+====================================================+ | |||
+----------+------------------------------------------------------+ | | P | a password encoded as a Unicode UTF-8 string | | |||
| S | a random initializing value | | +----------+----------------------------------------------------+ | |||
+----------+------------------------------------------------------+ | | S | a random initializing value | | |||
| c | a number of iterations of algorithm, a positive | | +----------+----------------------------------------------------+ | |||
| | integer | | | c | a number of iterations of algorithm, a positive | | |||
+----------+------------------------------------------------------+ | | | integer | | |||
| dkLen | a length in octets of derived key, a positive | | +----------+----------------------------------------------------+ | |||
| | integer | | | dkLen | a length in octets of derived key, a positive | | |||
+----------+------------------------------------------------------+ | | | integer | | |||
| DK | a derived key of length dkLen | | +----------+----------------------------------------------------+ | |||
+----------+------------------------------------------------------+ | | DK | a derived key of length dkLen | | |||
| B_n | a set of all octet strings of length n, n >= 0; if n | | +----------+----------------------------------------------------+ | |||
| | = 0, then the set B_n consists of an empty string of | | | B_n | a set of all octet strings of length n, n >= 0; if | | |||
| | length 0 | | | | n = 0, then the set B_n consists of an empty | | |||
+----------+------------------------------------------------------+ | | | string of length 0 | | |||
| A||C | a concatenation of two octet strings A, C, i.e., a | | +----------+----------------------------------------------------+ | |||
| | vector from B_(|A|+|C|), where the left subvector | | | A||C | a concatenation of two octet strings A, C, i.e., a | | |||
| | from B_(|A|) is equal to the vector A and the right | | | | vector from B_(|A|+|C|), where the left subvector | | |||
| | subvector from B_(|C|) is equal to the vector C: A = | | | | from B_(|A|) is equal to the vector A and the | | |||
| | (a_(n_1),...,a_1) in B_(n_1) and C = (c_(n_2),..., | | | | right subvector from B_(|C|) is equal to the | | |||
| | c_1) in B_(n_2), res = (a_(n_1),...,a_1,c_(n_2),..., | | | | vector C: A = (a_(n_1),...,a_1) in B_(n_1) and C = | | |||
| | c_1) in B_(n_1 + n_2); | | | | (c_(n_2),..., c_1) in B_(n_2), res = | | |||
+----------+------------------------------------------------------+ | | | (a_(n_1),...,a_1,c_(n_2),..., c_1) in B_(n_1+n_2)) | | |||
| \xor | a bit-wise exclusive-or of two octet strings of the | | +----------+----------------------------------------------------+ | |||
| | same length | | | \xor | a bit-wise exclusive-or of two octet strings of | | |||
+----------+------------------------------------------------------+ | | | the same length | | |||
| MSB^n_r: | a truncating of an octet string to size r by | | +----------+----------------------------------------------------+ | |||
| B_n -> | removing the least significant n-r octets: | | | MSB^n_r: | a truncating of an octet string to size r by | | |||
| B_r | MSB^n_r(a_n,...,a_(n-r+1),a_(n-r),...,a_1) | | | B_n -> | removing the least significant n-r octets: | | |||
| | =(a_n,...,a_(n-r+1)); | | | B_r | MSB^n_r(a_n,...,a_(n-r+1),a_(n-r),...,a_1) | | |||
+----------+------------------------------------------------------+ | | | =(a_n,...,a_(n-r+1)) | | |||
| LSB^n_r: | a truncating of a octet string to size r by removing | | +----------+----------------------------------------------------+ | |||
| B_n -> | the most significant n-r octets: | | | LSB^n_r: | a truncating of an octet string to size r by | | |||
| B_r | LSB^n_r(a_n,...,a_(n-r+1),a_(n-r),...,a_1) | | | B_n -> | removing the most significant n-r octets: | | |||
| | =(a_r,...,a_1) | | | B_r | LSB^n_r(a_n,...,a_(n-r+1),a_(n-r),...,a_1) | | |||
+----------+------------------------------------------------------+ | | | =(a_r,...,a_1) | | |||
| Int(i) | a four-octet encoding of the integer i =< 2^32: | | +----------+----------------------------------------------------+ | |||
| | (i_1, i_2, i_3, i_4) in B_4, i = i_1 + 2^8 * i_2 + | | | Int(i) | a four-octet encoding of the integer i =< 2^32: | | |||
| | 2^16 * i_3 + 2^24 * i_4 | | | | (i_1, i_2, i_3, i_4) in B_4, i = i_1 + 2^8 * i_2 + | | |||
+----------+------------------------------------------------------+ | | | 2^16 * i_3 + 2^24 * i_4 | | |||
| b[i, j] | a substring extraction operator: extracts octets i | | +----------+----------------------------------------------------+ | |||
| | through j, 0 =< i =< j. | | | b[i, j] | a substring extraction operator, extracts octets i | | |||
+----------+------------------------------------------------------+ | | | through j, 0 =< i =< j | | |||
| CEIL(x) | the smallest integer greater than, or equal to, x | | +----------+----------------------------------------------------+ | |||
+----------+------------------------------------------------------+ | | CEIL(x) | the smallest integer greater than or equal to x | | |||
+----------+----------------------------------------------------+ | ||||
Table 1 | Table 1: Terms and Definitions | |||
This document uses the following abbreviations and symbols: | This document uses the following abbreviations and symbols: | |||
+================+==============================================+ | +================+===============================================+ | |||
+================+==============================================+ | | Abbreviations | Definition | | |||
| HMAC_GOSTR3411 | Hashed-based Message Authentication Code. A | | | and Symbols | | | |||
| | function for calculating a message | | +================+===============================================+ | |||
| | authentication code, based on the GOST R | | | HMAC_GOSTR3411 | Hashed-Based Message Authentication Code. A | | |||
| | 34.11-2012 hash function ([RFC6986]) with | | | | function for calculating a Message | | |||
| | 512-bit output in accordance with [RFC2104]. | | | | Authentication Code (MAC) based on the GOST R | | |||
+----------------+----------------------------------------------+ | | | 34.11-2012 hash function (see [RFC6986]) with | | |||
| | 512-bit output in accordance with [RFC2104]. | | ||||
+----------------+-----------------------------------------------+ | ||||
Table 2 | Table 2: Abbreviations and Symbols | |||
4. Algorithm For Generating a Key From a Password | 4. Algorithm for Generating a Key from a Password | |||
The DK key is calculated by means of a key derivation function | The DK is calculated by means of a key derivation function PBKDF2 (P, | |||
PBKDF2(P, S, c, dkLen) [RFC8018], section 5.2 using the | S, c, dkLen) (see [RFC8018], Section 5.2) using the HMAC_GOSTR3411 | |||
HMAC_GOSTR3411 function as the PRF pseudo-random function: | function as the PRF: | |||
DK = PBKDF2(P,S,c,dkLen). | DK = PBKDF2 (P, S, c, dkLen). | |||
The PBKDF2 function is defined as the following algorithm: | The PBKDF2 function is defined as the following algorithm: | |||
1. If dkLen > (2^32 - 1) * 64, output "derived key too long" and | 1. If dkLen > (2^32 - 1) * 64, output "derived key too long" and | |||
stop. | stop. | |||
2. Calculate n = CEIL(dkLen / 64). | 2. Calculate n = CEIL (dkLen / 64). | |||
3. Calculate a set of values for each i from 1 to n: | 3. Calculate a set of values for each i from 1 to n: | |||
U_1(i) = HMAC_GOSTR3411 (P, S || INT (i)) | U_1(i) = HMAC_GOSTR3411 (P, S || INT (i)), | |||
U_2(i) = HMAC_GOSTR3411 (P, U_1(i)), | ||||
U_2(i) = HMAC_GOSTR3411 (P, U_1(i)) | ||||
... | ... | |||
U_c(i) = HMAC_GOSTR3411 (P, U_{c-1}(i)) | U_c(i) = HMAC_GOSTR3411 (P, U_(c-1)(i)), | |||
T(i) = U_1(i) \xor U_2(i) \xor ... \xor U_c(i) | T(i) = U_1(i) \xor U_2(i) \xor ... \xor U_c(i). | |||
4. Concatenate the octet strings T(i) and extract the first dkLen | 4. Concatenate the octet strings T(i) and extract the first dkLen | |||
octets to produce a derived key DK: | octets to produce a derived key DK: | |||
DK = MSB^{n * 64}_dkLen(T(1)||T(2)||...||T(n)) | * DK = MSB^(n * 64)_dkLen(T(1)||T(2)||...||T(n)) | |||
5. Data Encryption | 5. Data Encryption | |||
5.1. GOST R 34.12-2015 Data Encryption | 5.1. GOST R 34.12-2015 Data Encryption | |||
Data encryption using the DK key is carried out in accordance with | Data encryption using the DK is carried out in accordance with the | |||
the PBES2 scheme (see [RFC8018], section 6.2) using GOST R 34.12-2015 | PBES2 scheme (see [RFC8018], Section 6.2) using GOST R 34.12-2015 in | |||
in CTR_ACPKM mode (see [RFC8645]). | CTR_ACPKM mode (see [RFC8645]). | |||
5.1.1. Encryption | 5.1.1. Encryption | |||
The encryption process for PBES2 consists of the following steps: | The encryption process for PBES2 consists of the following steps: | |||
1. Select the random value S of length from 8 to 32 octets. | 1. Select the random value S of a length from 8 to 32 octets. | |||
2. Select the iteration count c depending on the conditions of use | 2. Select the iteration count c depending on the conditions of use | |||
(see [GostPkcs5]). The minimum allowable value for the parameter | (see [GostPkcs5]). The minimum allowable value for the parameter | |||
is 1000. | is 1000. | |||
3. Set the value dkLen = 32. | 3. Set the value dkLen = 32. | |||
4. Apply the key derivation function to the password P, the random | 4. Apply the key derivation function to the password P, the random | |||
value S and the iteration count c to produce a derived key DK of | value S, and the iteration count c to produce a derived key DK of | |||
length dkLen octets in accordance with the algorithm from | length dkLen octets in accordance with the algorithm from | |||
Section 4. Generate the sequence T(1) and truncate it to 32 | Section 4. Generate the sequence T(1) and truncate it to 32 | |||
octets, i.e., | octets, i.e., | |||
DK = PBKDF2(P,S,c,32) = MSB^64_32(T(1)). | DK = PBKDF2 (P, S, c, 32) = MSB^64_32(T(1)). | |||
5. Generate the random value ukm of size n, where n takes a value of | 5. Generate the random value ukm of size n, where n takes a value of | |||
12 or 16 octets, depending on the selected encryption algorithm: | 12 or 16 octets depending on the selected encryption algorithm: | |||
GOST R 34.12-2015 "Kuznyechik" n = 16 (see [RFC7801]) | * GOST R 34.12-2015 "Kuznyechik" n = 16 (see [RFC7801]) | |||
GOST R 34.12-2015 "Magma" n = 12 (see [RFC8891]) | * GOST R 34.12-2015 "Magma" n = 12 (see [RFC8891]) | |||
6. Set the value S' = ukm[1..n-8] | 6. Set the value S' = ukm[1..n-8]. | |||
7. For id-gostr3412-2015-magma-ctracpkm and id-gostr3412-2015- | ||||
kuznyechik-ctracpkm algorithms (see Section 7.3) encrypt the | ||||
message M with GOST R 34.12-2015 algorithm with the derived key | ||||
DK and the random value S' to produce a ciphertext C. | ||||
8. For id-gostr3412-2015-magma-ctracpkm-omac and id-gostr3412-2015- | 7. For the id-gostr3412-2015-magma-ctracpkm and id-gostr3412-2015- | |||
kuznyechik-ctracpkm-omac algorithms (see Section 7.3) encrypt the | kuznyechik-ctracpkm algorithms (see Section 7.3), encrypt the | |||
message M with GOST R 34.12-2015 algorithm with the derived key | message M with the GOST R 34.12-2015 algorithm with the derived | |||
DK and the ukm in accordance with the following steps: | key DK and the random value S' to produce a ciphertext C. | |||
- Generate two keys from the derived key DK using the | 8. For the id-gostr3412-2015-magma-ctracpkm-omac and id- | |||
gostr3412-2015-kuznyechik-ctracpkm-omac algorithms (see | ||||
Section 7.3), encrypt the message M with the GOST R 34.12-2015 | ||||
algorithm with the derived key DK and the ukm in accordance with | ||||
the following steps: | ||||
* Generate two keys from the derived key DK using the | ||||
KDF_TREE_GOSTR3411_2012_256 algorithm (see [RFC7836]): | KDF_TREE_GOSTR3411_2012_256 algorithm (see [RFC7836]): | |||
encryption key K(1) | encryption key K(1) | |||
MAC key K(2). | MAC key K(2) | |||
Input parameters for the KDF_TREE_GOSTR3411_2012_256 algorithm | Input parameters for the KDF_TREE_GOSTR3411_2012_256 algorithm | |||
take the folowing values: | take the following values: | |||
K_in = DK | K_in = DK | |||
label = "kdf tree" (8 octets) | label = "kdf tree" (8 octets) | |||
seed = ukm[n-7..n] | seed = ukm[n-7..n] | |||
R = 1 | R = 1 | |||
The input string label above is encoded using ASCII ( | The input string label above is encoded using ASCII (see | |||
[RFC0020] ). | [RFC0020]). | |||
- Compute MAC for the message M using the K(2) key in | * Compute the MAC for the message M using the K(2) key in | |||
accordance with GOST R 34.12-2015 algorithm. Append the | accordance with the GOST R 34.12-2015 algorithm. Append the | |||
computed MAC value to the message M: M||MAC. | computed MAC value to the message M: M||MAC. | |||
- Encrypt the resulting octet string with MAC with GOST R | * Encrypt the resulting octet string with MAC with the GOST R | |||
34.12-2015 algorithm with the derived key K(1) and the random | 34.12-2015 algorithm with the derived key K(1) and the random | |||
value S' to produce a ciphertext C. | value S' to produce a ciphertext C. | |||
9. Serialize the parameters S, c, ukm as algorithm parameters in | 9. Serialize the parameters S, c, and ukm as algorithm parameters in | |||
accordance with Section 7.2. | accordance with Section 7.2. | |||
5.1.2. Decryption | 5.1.2. Decryption | |||
The decryption process for PBES2 consists of the following steps: | The decryption process for PBES2 consists of the following steps: | |||
1. Set the value dkLen = 32. | 1. Set the value dkLen = 32. | |||
2. Apply the key derivation function PBKDF2 to the password P, the | 2. Apply the key derivation function PBKDF2 to the password P, the | |||
random value S and the iteration count c to produce a derived key | random value S, and the iteration count c to produce a derived | |||
DK of length dkLen octets in accordance with the algorithm from | key DK of length dkLen octets in accordance with the algorithm | |||
Section 4. Generate the sequence T(1) and truncate it to 32 | from Section 4. Generate the sequence T(1) and truncate it to 32 | |||
octets, i.e., DK = PBKFD2(P,S,c,32) = MSB^64_32(T(1)). | octets, i.e., DK = PBKFD2 (P, S, c, 32) = MSB^64_32(T(1)). | |||
3. Set the value S' = ukm[1..n-8], where n is the size of ukm in | 3. Set the value S' = ukm[1..n-8], where n is the size of ukm in | |||
octets. | octets. | |||
4. For id-gostr3412-2015-magma-ctracpkm and id-gostr3412-2015- | 4. For the id-gostr3412-2015-magma-ctracpkm and id-gostr3412-2015- | |||
kuznyechik-ctracpkm algorithms (see Section 7.3) decrypt the | kuznyechik-ctracpkm algorithms (see Section 7.3), decrypt the | |||
ciphertext C with GOST R 34.12-2015 algorithm with the derived | ciphertext C with the GOST R 34.12-2015 algorithm with the | |||
key DK and the random value S' to produce the message M. | derived key DK and the random value S' to produce the message M. | |||
5. For id-gostr3412-2015-magma-ctracpkm-omac and id-gostr3412-2015- | 5. For id-gostr3412-2015-magma-ctracpkm-omac and id-gostr3412-2015- | |||
kuznyechik-ctracpkm-omac algorithms (see Section 7.3) decrypt the | kuznyechik-ctracpkm-omac algorithms (see Section 7.3), decrypt | |||
ciphertext C with GOST R 34.12-2015 algorithm with the derived | the ciphertext C with the GOST R 34.12-2015 algorithm with the | |||
key DK and the ukm in accordance with the following steps: | derived key DK and the ukm in accordance with the following | |||
steps: | ||||
- Generate two keys from the derived key DK using the | * Generate two keys from the derived key DK using the | |||
KDF_TREE_GOSTR3411_2012_256 algorithm: | KDF_TREE_GOSTR3411_2012_256 algorithm: | |||
encryption key K(1) | encryption key K(1) | |||
MAC key K(2). | MAC key K(2) | |||
Input parameters for the KDF_TREE_GOSTR3411_2012_256 algorithm | Input parameters for the KDF_TREE_GOSTR3411_2012_256 algorithm | |||
take the folowing values: | take the following values: | |||
K_in = DK | K_in = DK | |||
label = "kdf tree" (8 octets) | label = "kdf tree" (8 octets) | |||
seed = ukm[n-7..n] | seed = ukm[n-7..n] | |||
R = 1 | R = 1 | |||
The input string label above is encoded using ASCII ( | The input string label above is encoded using ASCII (see | |||
[RFC0020] ). | [RFC0020]). | |||
- Decrypt the ciphertext C with GOST R 34.12-2015 algorithm | * Decrypt the ciphertext C with the GOST R 34.12-2015 algorithm | |||
with the derived key K(1) and the random value S' to produce | with the derived key K(1) and the random value S' to produce | |||
the plaintext. The last k octets of the text are the message | the plaintext. The last k octets of the text are the MAC, | |||
authentication code MAC', where k depends on the selected | where k depends on the selected encryption algorithm. | |||
encryption algorithm. | ||||
- Compute MAC for the text[1..m - k] using the K(2) key in | * Compute the MAC for the text[1..m - k] using the K(2) key in | |||
accordance with GOST R 34.12-2015 algorithm, where m is the | accordance with GOST R 34.12-2015 algorithm, where m is the | |||
size of text. | size of text. | |||
- Compare the original message authentication code MAC and the | * Compare the computing MAC and the receiving MAC. If the sizes | |||
receiving message authentication code MAC'. If the sizes or | or values do not match, the message is distorted. | |||
values do not match, the message is distorted. | ||||
6. Message Authentication | 6. Message Authentication | |||
PBMAC1 scheme is used for message authentication (see [RFC8018], | The PBMAC1 scheme is used for message authentication (see [RFC8018], | |||
section 7.1). This scheme bases on the HMAC_GOSTR3411 function. | Section 7.1). This scheme is based on the HMAC_GOSTR3411 function. | |||
6.1. MAC Generation | 6.1. MAC Generation | |||
The MAC generation operation for PBMAC1 consists of the following | The MAC generation operation for PBMAC1 consists of the following | |||
steps: | steps: | |||
1. Select the random value S of length from 8 to 32 octets. | 1. Select the random value S of a length from 8 to 32 octets. | |||
2. Select the iteration count c depending on the conditions of use | 2. Select the iteration count c depending on the conditions of use | |||
(see [GostPkcs5]). The minimum allowable value for the parameter | (see [GostPkcs5]). The minimum allowable value for the parameter | |||
is 1000. | is 1000. | |||
3. Set the dkLen to at least 32 octets. It depends on previous | 3. Set the dkLen to at least 32 octets. The number of octets | |||
parameter values. | depends on previous parameter values. | |||
4. Apply the key derivation function to the password P, the random | 4. Apply the key derivation function to the password P, the random | |||
value S and the iteration count c to generate a sequence K of | value S, and the iteration count c to generate a sequence K of | |||
length dkLen octets in accordance with the algorithm from | length dkLen octets in accordance with the algorithm from | |||
Section 4. | Section 4. | |||
5. Truncate the sequence K to 32 octets to get the derived key DK, | 5. Truncate the sequence K to 32 octets to get the derived key DK, | |||
i.e., DK = LSB^dkLen_32(K). | i.e., DK = LSB^dkLen_32(K). | |||
6. Process the message M with the underlying message authentication | 6. Process the message M with the underlying message authentication | |||
scheme with the derived key DK to generate a message | scheme with the derived key DK to generate a message | |||
authentication code T. | authentication code T. | |||
7. Save the parameters S, c as algorithm parameters in accordance | 7. Save the parameters S and c as algorithm parameters in accordance | |||
with Section 7.4. | with Section 7.4. | |||
6.2. MAC Verification | 6.2. MAC Verification | |||
The MAC verification operation for PBMAC1 consists of the following | The MAC verification operation for PBMAC1 consists of the following | |||
steps: | steps: | |||
1. Set the dkLen to at least 32 octets. It depends on previous | 1. Set the dkLen to at least 32 octets. The number of octets | |||
parameter values. | depends on previous parameter values. | |||
2. Apply the key derivation function to the password P, the random | 2. Apply the key derivation function to the password P, the random | |||
value S and the iteration count c to generate a sequence K of | value S, and the iteration count c to generate a sequence K of | |||
length dkLen octets in accordance with the algorithm from | length dkLen octets in accordance with the algorithm from | |||
Section 4. | Section 4. | |||
3. Truncate the sequence K to 32 octets to get the derived key DK, | 3. Truncate the sequence K to 32 octets to get the derived key DK, | |||
i.e., DK = LSB^dkLen_32(K). | i.e., DK = LSB^dkLen_32(K). | |||
4. Process the message M with the underlying message authentication | 4. Process the message M with the underlying message authentication | |||
scheme with the derived key DK to generate a message | scheme with the derived key DK to generate a MAC. | |||
authentication code MAC'. | ||||
5. Compare the original message authentication code MAC and the | 5. Compare the computing MAC and the receiving MAC. If the sizes or | |||
receiving message authentication code MAC'. If the sizes or | ||||
values do not match, the message is distorted. | values do not match, the message is distorted. | |||
7. Identifiers and Parameters | 7. Identifiers and Parameters | |||
This section defines ASN.1 syntax for the key derivation functions, | This section defines the ASN.1 syntax for the key derivation | |||
the encryption schemes, the message authentication scheme, and | functions, the encryption schemes, the message authentication scheme, | |||
supporting techniques ([RFC8018]). | and supporting techniques (see [RFC8018]). | |||
rsadsi OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) 113549 } | rsadsi OBJECT IDENTIFIER ::= { iso(1) member-body(2) us(840) 113549 } | |||
pkcs OBJECT IDENTIFIER ::= { rsadsi 1 } | pkcs OBJECT IDENTIFIER ::= { rsadsi 1 } | |||
pkcs-5 OBJECT IDENTIFIER ::= { pkcs 5 } | pkcs-5 OBJECT IDENTIFIER ::= { pkcs 5 } | |||
7.1. PBKDF2 | 7.1. PBKDF2 | |||
The object identifier id-PBKDF2 identifies the PBKDF2 key derivation | The Object Identifier (OID) id-PBKDF2 identifies the PBKDF2 key | |||
function: | derivation function: | |||
id-PBKDF2 OBJECT IDENTIFIER ::= { pkcs-5 12 } | id-PBKDF2 OBJECT IDENTIFIER ::= { pkcs-5 12 } | |||
The parameters field associated with this OID in an | The parameters field associated with this OID in an | |||
AlgorithmIdentifier SHALL have type PBKDF2-params: | AlgorithmIdentifier SHALL have type PBKDF2-params: | |||
PBKDF2-params ::= SEQUENCE | PBKDF2-params ::= SEQUENCE | |||
{ | { | |||
salt CHOICE | salt CHOICE | |||
{ | { | |||
specified OCTET STRING, | specified OCTET STRING, | |||
otherSource AlgorithmIdentifier {{PBKDF2-SaltSources}} | otherSource AlgorithmIdentifier {{PBKDF2-SaltSources}} | |||
}, | }, | |||
iterationCount INTEGER (1000..MAX), | iterationCount INTEGER (1000..MAX), | |||
keyLength INTEGER (32..MAX) OPTIONAL, | keyLength INTEGER (32..MAX) OPTIONAL, | |||
prf AlgorithmIdentifier {{PBKDF2-PRFs}} | prf AlgorithmIdentifier {{PBKDF2-PRFs}} | |||
} | } | |||
The fields of type PBKDF2-params have the following meanings: | The fields of type PBKDF2-params have the following meanings: | |||
- salt contains the random value S in OCTET STRING. | * salt contains the random value S in OCTET STRING. | |||
- iterationCount specifies the iteration count c. | * iterationCount specifies the iteration count c. | |||
- keyLength is the length of the derived key in octets. It is | * keyLength is the length of the derived key in octets. It is an | |||
optional field for PBES2 sheme since it is always 32 octets. It | optional field for the PBES2 scheme since it is always 32 octets. | |||
MUST be present for PBMAC1 sheme and MUST be at least 32 octets | It MUST be present for the PBMAC1 scheme and MUST be at least 32 | |||
since the HMAC_GOSTR3411 function has a variable key size. | octets since the HMAC_GOSTR3411 function has a variable key size. | |||
- prf identifies the pseudorandom function. The identifier value | * prf identifies the pseudorandom function. The identifier value | |||
MUST be id-tc26-hmac-gost-3411-12-512, the parameters value must | MUST be id-tc26-hmac-gost-3411-12-512 and the parameters value | |||
be NULL: | must be NULL: | |||
id-tc26-hmac-gost-3411-12-512 OBJECT IDENTIFIER ::= | id-tc26-hmac-gost-3411-12-512 OBJECT IDENTIFIER ::= | |||
{ | { | |||
iso(1) member-body(2) ru(643) reg7(7) | iso(1) member-body(2) ru(643) reg7(7) | |||
tk26(1) algorithms(1) hmac(4) 512(2) | tk26(1) algorithms(1) hmac(4) 512(2) | |||
} | } | |||
7.2. PBES2 | 7.2. PBES2 | |||
The object identifier id-PBES2 identifies the PBES2 encryption | The OID id-PBES2 identifies the PBES2 encryption scheme: | |||
scheme: | ||||
id-PBES2 OBJECT IDENTIFIER ::= { pkcs-5 13 } | id-PBES2 OBJECT IDENTIFIER ::= { pkcs-5 13 } | |||
The parameters field associated with this OID in an | The parameters field associated with this OID in an | |||
AlgorithmIdentifier SHALL have type PBES2-params: | AlgorithmIdentifier SHALL have type PBES2-params: | |||
PBES2-params ::= SEQUENCE | PBES2-params ::= SEQUENCE | |||
{ | { | |||
keyDerivationFunc AlgorithmIdentifier { { PBES2-KDFs } }, | keyDerivationFunc AlgorithmIdentifier { { PBES2-KDFs } }, | |||
encryptionScheme AlgorithmIdentifier { { PBES2-Encs } } | encryptionScheme AlgorithmIdentifier { { PBES2-Encs } } | |||
skipping to change at page 11, line 4 ¶ | skipping to change at line 463 ¶ | |||
id-PBES2 OBJECT IDENTIFIER ::= { pkcs-5 13 } | id-PBES2 OBJECT IDENTIFIER ::= { pkcs-5 13 } | |||
The parameters field associated with this OID in an | The parameters field associated with this OID in an | |||
AlgorithmIdentifier SHALL have type PBES2-params: | AlgorithmIdentifier SHALL have type PBES2-params: | |||
PBES2-params ::= SEQUENCE | PBES2-params ::= SEQUENCE | |||
{ | { | |||
keyDerivationFunc AlgorithmIdentifier { { PBES2-KDFs } }, | keyDerivationFunc AlgorithmIdentifier { { PBES2-KDFs } }, | |||
encryptionScheme AlgorithmIdentifier { { PBES2-Encs } } | encryptionScheme AlgorithmIdentifier { { PBES2-Encs } } | |||
} | } | |||
The fields of type PBES2-params have the following meanings: | The fields of type PBES2-params have the following meanings: | |||
- keyDerivationFunc identifies the key derivation function in | * keyDerivationFunc identifies the key derivation function in | |||
accordance with Section 7.1. | accordance with Section 7.1. | |||
- encryptionScheme identifies the encryption scheme in with | * encryptionScheme identifies the encryption scheme in accordance | |||
Section 7.3. | with Section 7.3. | |||
7.3. Identifier and Parameters of Gost34.12-2015 Encryption Scheme | 7.3. Identifier and Parameters of Gost34.12-2015 Encryption Scheme | |||
The Gost34.12-2015 encryption algorithm identifier SHALL take one of | The Gost34.12-2015 encryption algorithm identifier SHALL take one of | |||
the following values: | the following values: | |||
id-gostr3412-2015-magma-ctracpkm OBJECT IDENTIFIER ::= | id-gostr3412-2015-magma-ctracpkm OBJECT IDENTIFIER ::= | |||
{ | { | |||
iso(1) member-body(2) ru(643) rosstandart(7) | iso(1) member-body(2) ru(643) rosstandart(7) | |||
tc26(1) algorithms(1) cipher(5) | tc26(1) algorithms(1) cipher(5) | |||
gostr3412-2015-magma(1) mode-ctracpkm(1) | gostr3412-2015-magma(1) mode-ctracpkm(1) | |||
} | } | |||
In case of use id-gostr3412-2015-magma-ctracpkm identifier the data | When the id-gostr3412-2015-magma-ctracpkm identifier is used, the | |||
is encrypted by the GOST R 34.12-2015 Magma cipher in CTR_ACPKM mode | data is encrypted by the GOST R 34.12-2015 Magma cipher in CTR_ACPKM | |||
in accordance with [RFC8645]. The block size is 64 bits, the section | mode in accordance with [RFC8645]. The block size is 64 bits and the | |||
size is fixed within a specific protocol based on the requirements of | section size is fixed within a specific protocol based on the | |||
the system capacity and the key lifetime. | requirements of the system capacity and the key lifetime. | |||
id-gostr3412-2015-magma-ctracpkm-omac OBJECT IDENTIFIER ::= | id-gostr3412-2015-magma-ctracpkm-omac OBJECT IDENTIFIER ::= | |||
{ | { | |||
iso(1) member-body(2) ru(643) rosstandart(7) | iso(1) member-body(2) ru(643) rosstandart(7) | |||
tc26(1) algorithms(1) cipher(5) | tc26(1) algorithms(1) cipher(5) | |||
gostr3412-2015-magma(1) mode-ctracpkm-omac(2) | gostr3412-2015-magma(1) mode-ctracpkm-omac(2) | |||
} | } | |||
In case of use id-gostr3412-2015-magma-ctracpkm-omac identifier the | When the id-gostr3412-2015-magma-ctracpkm-omac identifier is used, | |||
data is encrypted by the GOST R 34.12-2015 Magma cipher in CTR_ACPKM | the data is encrypted by the GOST R 34.12-2015 Magma cipher in | |||
mode in accordance with [RFC8645], and MAC is computed by the GOST R | CTR_ACPKM mode in accordance with [RFC8645] and the MAC is computed | |||
34.12-2015 Magma cipher in MAC mode (MAC size is 64 bits). The block | by the GOST R 34.12-2015 Magma cipher in MAC mode (MAC size is 64 | |||
size is 64 bits, the section size is fixed within a specific protocol | bits). The block size is 64 bits and the section size is fixed | |||
based on the requirements of the system capacity and the key | within a specific protocol based on the requirements of the system | |||
lifetime. | capacity and the key lifetime. | |||
id-gostr3412-2015-kuznyechik-ctracpkm OBJECT IDENTIFIER ::= | id-gostr3412-2015-kuznyechik-ctracpkm OBJECT IDENTIFIER ::= | |||
{ | { | |||
iso(1) member-body(2) ru(643) rosstandart(7) | iso(1) member-body(2) ru(643) rosstandart(7) | |||
tc26(1) algorithms(1) cipher(5) | tc26(1) algorithms(1) cipher(5) | |||
gostr3412-2015-kuznyechik(2) mode-ctracpkm(1) | gostr3412-2015-kuznyechik(2) mode-ctracpkm(1) | |||
} | } | |||
In case of use id-gostr3412-2015-kuznyechik-ctracpkm identifier the | ||||
data is encrypted by the GOST R 34.12-2015 Kuznyechik cipher in | When the id-gostr3412-2015-kuznyechik-ctracpkm identifier is used, | |||
the data is encrypted by the GOST R 34.12-2015 Kuznyechik cipher in | ||||
CTR_ACPKM mode in accordance with [RFC8645]. The block size is 128 | CTR_ACPKM mode in accordance with [RFC8645]. The block size is 128 | |||
bits, the section size is fixed within a specific protocol based on | bits and the section size is fixed within a specific protocol based | |||
the requirements of the system capacity and the key lifetime. | on the requirements of the system capacity and the key lifetime. | |||
id-gostr3412-2015-kuznyechik-ctracpkm-omac OBJECT IDENTIFIER ::= | id-gostr3412-2015-kuznyechik-ctracpkm-omac OBJECT IDENTIFIER ::= | |||
{ | { | |||
iso(1) member-body(2) ru(643) rosstandart(7) | iso(1) member-body(2) ru(643) rosstandart(7) | |||
tc26(1) algorithms(1) cipher(5) | tc26(1) algorithms(1) cipher(5) | |||
gostr3412-2015-kuznyechik(2) mode-ctracpkm-omac(2) | gostr3412-2015-kuznyechik(2) mode-ctracpkm-omac(2) | |||
} | } | |||
In case of use id-gostr3412-2015-kuznyechik-ctracpkm-omac identifier | When the id-gostr3412-2015-kuznyechik-ctracpkm-omac identifier is | |||
the data is encrypted by the GOST R 34.12-2015 Kuznyechik cipher in | used, the data is encrypted by the GOST R 34.12-2015 Kuznyechik | |||
CTR_ACPKM mode in accordance with [RFC8645], and MAC is computed by | cipher in CTR_ACPKM mode in accordance with [RFC8645] and MAC is | |||
the GOST R 34.12-2015 Kuznyechik cipher in MAC mode (MAC size is 128 | computed by the GOST R 34.12-2015 Kuznyechik cipher in MAC mode (MAC | |||
bits). The block size is 128 bits, the section size is fixed within | size is 128 bits). The block size is 128 bits and the section size | |||
a specific protocol based on the requirements of the system capacity | is fixed within a specific protocol based on the requirements of the | |||
and the key lifetime. | system capacity and the key lifetime. | |||
The parameters field in an AlgorithmIdentifier SHALL have type | The parameters field in an AlgorithmIdentifier SHALL have type | |||
Gost3412-15-Encryption-Parameters: | Gost3412-15-Encryption-Parameters: | |||
Gost3412-15-Encryption-Parameters ::= SEQUENCE | Gost3412-15-Encryption-Parameters ::= SEQUENCE | |||
{ | { | |||
ukm OCTET STRING | ukm OCTET STRING | |||
} | } | |||
The field of type Gost3412-15-Encryption-Parameters have the | The field of type Gost3412-15-Encryption-Parameters have the | |||
following meanings: | following meanings: | |||
- ukm MUST be present and MUST contain n octets. Its value | * ukm MUST be present and MUST contain n octets. Its value depends | |||
depends on the selected encryption algorithm: | on the selected encryption algorithm: | |||
GOST R 34.12-2015 "Kuznyechik" n = 16 (see [RFC7801]) | - GOST R 34.12-2015 "Kuznyechik" n = 16 (see [RFC7801]) | |||
GOST R 34.12-2015 "Magma" n = 12 (see [RFC8891]) | - GOST R 34.12-2015 "Magma" n = 12 (see [RFC8891]) | |||
7.4. PBMAC1 | 7.4. PBMAC1 | |||
The object identifier id-PBMAC1 identifies the PBMAC1 message | The OID id-PBMAC1 identifies the PBMAC1 message authentication | |||
authentication scheme: | scheme: | |||
id-PBMAC1 OBJECT IDENTIFIER ::= { pkcs-5 14 } | id-PBMAC1 OBJECT IDENTIFIER ::= { pkcs-5 14 } | |||
The parameters field associated with this OID in an | The parameters field associated with this OID in an | |||
AlgorithmIdentifier SHALL have type PBMAC1-params: | AlgorithmIdentifier SHALL have type PBMAC1-params: | |||
PBMAC1-params ::= SEQUENCE | PBMAC1-params ::= SEQUENCE | |||
{ | { | |||
keyDerivationFunc AlgorithmIdentifier { { PBMAC1-KDFs } }, | keyDerivationFunc AlgorithmIdentifier { { PBMAC1-KDFs } }, | |||
messageAuthScheme AlgorithmIdentifier { { PBMAC1-MACs } } | messageAuthScheme AlgorithmIdentifier { { PBMAC1-MACs } } | |||
} | } | |||
The fields of type PBMAC1-params have the following meanings: | The fields of type PBMAC1-params have the following meanings: | |||
- keyDerivationFunc is identifier and parameters of key derivation | * keyDerivationFunc is the identifier and parameters of key | |||
function in accordance with Section 7.1 | derivation function in accordance with Section 7.1. | |||
- messageAuthScheme is identifier and parameters of HMAC_GOSTR3411 | * messageAuthScheme is the identifier and parameters of the | |||
algorithm. | HMAC_GOSTR3411 algorithm. | |||
8. Security Considerations | 8. Security Considerations | |||
For information on security considerations for password-based | For information on security considerations for password-based | |||
cryptography see [RFC8018]. | cryptography, see [RFC8018]. | |||
Conforming applications MUST use unique values for ukm and S in order | Conforming applications MUST use unique values for ukm and S in order | |||
to avoid the encryption of different data on the same keys with the | to avoid the encryption of different data on the same keys with the | |||
same initialization vector. | same initialization vector. | |||
It is RECOMMENDED that parameter S consist of at least 32 octets of | It is RECOMMENDED that parameter S consist of at least 32 octets of | |||
pseudo-random data in order to reduce the probability of collisions | pseudorandom data in order to reduce the probability of collisions of | |||
of keys generated from the same password. | keys generated from the same password. | |||
9. IANA Considerations | 9. IANA Considerations | |||
This document makes no requests for IANA action. | This document has no IANA actions. | |||
10. References | 10. References | |||
10.1. Normative References | ||||
[GostPkcs5] | [GostPkcs5] | |||
Karelina, E., Pianov, S., and A. Davletshina, "Information | Potashnikov, A., Karelina, E., Pianov, S., and A. | |||
technology. Cryptographic Data Security. Password-based | Naumenko, "Information technology. Cryptographic Data | |||
key security.", R 1323565.1.xxx-2022 (work in progress). | Security. Password-based key security.", R | |||
Federal Agency on Technical Regulating and Metrology (In | 1323565.1.040-2022. Federal Agency on Technical Regulating | |||
Russian). | and Metrology (In Russian). | |||
[RFC0020] Cerf, V., "ASCII format for network interchange", STD 80, | [RFC0020] Cerf, V., "ASCII format for network interchange", STD 80, | |||
RFC 20, DOI 10.17487/RFC0020, October 1969, | RFC 20, DOI 10.17487/RFC0020, October 1969, | |||
<https://www.rfc-editor.org/info/rfc20>. | <https://www.rfc-editor.org/info/rfc20>. | |||
[RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- | [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- | |||
Hashing for Message Authentication", RFC 2104, | Hashing for Message Authentication", RFC 2104, | |||
DOI 10.17487/RFC2104, February 1997, | DOI 10.17487/RFC2104, February 1997, | |||
<https://www.rfc-editor.org/info/rfc2104>. | <https://www.rfc-editor.org/info/rfc2104>. | |||
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
Requirement Levels", BCP 14, RFC 2119, | Requirement Levels", BCP 14, RFC 2119, | |||
DOI 10.17487/RFC2119, March 1997, | DOI 10.17487/RFC2119, March 1997, | |||
<https://www.rfc-editor.org/info/rfc2119>. | <https://www.rfc-editor.org/info/rfc2119>. | |||
[RFC6070] Josefsson, S., "PKCS #5: Password-Based Key Derivation | ||||
Function 2 (PBKDF2) Test Vectors", RFC 6070, | ||||
DOI 10.17487/RFC6070, January 2011, | ||||
<https://www.rfc-editor.org/info/rfc6070>. | ||||
[RFC6986] Dolmatov, V., Ed. and A. Degtyarev, "GOST R 34.11-2012: | [RFC6986] Dolmatov, V., Ed. and A. Degtyarev, "GOST R 34.11-2012: | |||
Hash Function", RFC 6986, DOI 10.17487/RFC6986, August | Hash Function", RFC 6986, DOI 10.17487/RFC6986, August | |||
2013, <https://www.rfc-editor.org/info/rfc6986>. | 2013, <https://www.rfc-editor.org/info/rfc6986>. | |||
[RFC7801] Dolmatov, V., Ed., "GOST R 34.12-2015: Block Cipher | [RFC7801] Dolmatov, V., Ed., "GOST R 34.12-2015: Block Cipher | |||
"Kuznyechik"", RFC 7801, DOI 10.17487/RFC7801, March 2016, | "Kuznyechik"", RFC 7801, DOI 10.17487/RFC7801, March 2016, | |||
<https://www.rfc-editor.org/info/rfc7801>. | <https://www.rfc-editor.org/info/rfc7801>. | |||
[RFC7836] Smyshlyaev, S., Ed., Alekseev, E., Oshkin, I., Popov, V., | [RFC7836] Smyshlyaev, S., Ed., Alekseev, E., Oshkin, I., Popov, V., | |||
Leontiev, S., Podobaev, V., and D. Belyavsky, "Guidelines | Leontiev, S., Podobaev, V., and D. Belyavsky, "Guidelines | |||
skipping to change at page 14, line 47 ¶ | skipping to change at line 649 ¶ | |||
May 2017, <https://www.rfc-editor.org/info/rfc8174>. | May 2017, <https://www.rfc-editor.org/info/rfc8174>. | |||
[RFC8645] Smyshlyaev, S., Ed., "Re-keying Mechanisms for Symmetric | [RFC8645] Smyshlyaev, S., Ed., "Re-keying Mechanisms for Symmetric | |||
Keys", RFC 8645, DOI 10.17487/RFC8645, August 2019, | Keys", RFC 8645, DOI 10.17487/RFC8645, August 2019, | |||
<https://www.rfc-editor.org/info/rfc8645>. | <https://www.rfc-editor.org/info/rfc8645>. | |||
[RFC8891] Dolmatov, V., Ed. and D. Baryshkov, "GOST R 34.12-2015: | [RFC8891] Dolmatov, V., Ed. and D. Baryshkov, "GOST R 34.12-2015: | |||
Block Cipher "Magma"", RFC 8891, DOI 10.17487/RFC8891, | Block Cipher "Magma"", RFC 8891, DOI 10.17487/RFC8891, | |||
September 2020, <https://www.rfc-editor.org/info/rfc8891>. | September 2020, <https://www.rfc-editor.org/info/rfc8891>. | |||
10.2. Informative References | ||||
[RFC6070] Josefsson, S., "PKCS #5: Password-Based Key Derivation | ||||
Function 2 (PBKDF2) Test Vectors", RFC 6070, | ||||
DOI 10.17487/RFC6070, January 2011, | ||||
<https://www.rfc-editor.org/info/rfc6070>. | ||||
Appendix A. PBKDF2 HMAC_GOSTR3411 Test Vectors | Appendix A. PBKDF2 HMAC_GOSTR3411 Test Vectors | |||
These test vectors are formed by analogy with test vectors from | These test vectors are formed by analogy with test vectors from | |||
[RFC6070]. The input strings below are encoded using ASCII ( | [RFC6070]. The input strings below are encoded using ASCII (see | |||
[RFC0020] ). The sequence "\0" (without quotation marks) means a | [RFC0020]). The sequence "\0" (without quotation marks) means a | |||
literal ASCII NULL value (1 octet). "DK" refers to the Derived Key. | literal ASCII NULL value (1 octet). "DK" refers to the derived key. | |||
Input: | Input: | |||
P = "password" (8 octets) | P = "password" (8 octets) | |||
S = "salt" (4 octets) | S = "salt" (4 octets) | |||
c = 1 | c = 1 | |||
dkLen = 64 | dkLen = 64 | |||
Output: | Output: | |||
DK = 64 77 0a f7 f7 48 c3 b1 c9 ac 83 1d bc fd 85 c2 | DK = 64 77 0a f7 f7 48 c3 b1 c9 ac 83 1d bc fd 85 c2 | |||
61 11 b3 0a 8a 65 7d dc 30 56 b8 0c a7 3e 04 0d | 61 11 b3 0a 8a 65 7d dc 30 56 b8 0c a7 3e 04 0d | |||
skipping to change at page 16, line 32 ¶ | skipping to change at line 738 ¶ | |||
S = "sa\0lt" (5 octets) | S = "sa\0lt" (5 octets) | |||
c = 4096 | c = 4096 | |||
dkLen = 64 | dkLen = 64 | |||
Output: | Output: | |||
DK = 50 df 06 28 85 b6 98 01 a3 c1 02 48 eb 0a 27 ab | DK = 50 df 06 28 85 b6 98 01 a3 c1 02 48 eb 0a 27 ab | |||
6e 52 2f fe b2 0c 99 1c 66 0f 00 14 75 d7 3a 4e | 6e 52 2f fe b2 0c 99 1c 66 0f 00 14 75 d7 3a 4e | |||
16 7f 78 2c 18 e9 7e 92 97 6d 9c 1d 97 08 31 ea | 16 7f 78 2c 18 e9 7e 92 97 6d 9c 1d 97 08 31 ea | |||
78 cc b8 79 f6 70 68 cd ac 19 10 74 08 44 e8 30 | 78 cc b8 79 f6 70 68 cd ac 19 10 74 08 44 e8 30 | |||
Acknowledgments | ||||
The author thanks Potashnikov Alexander, Pianov Semen, Davletshina | ||||
Alexandra, Belyavsky Dmitry, and Smyslov Valery for their careful | ||||
readings and useful comments. | ||||
Author's Address | Author's Address | |||
Karelina Ekaterina (editor) | Ekaterina Karelina (editor) | |||
InfoTeCS | InfoTeCS | |||
2B stroenie 1, ul. Otradnaya | 2B stroenie 1, ul. Otradnaya | |||
Moscow | Moscow | |||
127273 | 127273 | |||
Russian Federation | Russian Federation | |||
Phone: +7 (495) 737-61-92 | ||||
Email: Ekaterina.Karelina@infotecs.ru | Email: Ekaterina.Karelina@infotecs.ru | |||
End of changes. 93 change blocks. | ||||
262 lines changed or deleted | 275 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. |