draft-ietf-smime-cms-seed-00.txt   draft-ietf-smime-cms-seed-01.txt 
S/MIME Working Group Jongwook Park (KISA) S/MIME Working Group Jongwook Park (KISA)
Internet Draft Sungjae Lee (KISA) Internet Draft Sungjae Lee (KISA)
Document: draft-ietf-smime-cms-seed-00.txt Jeeyeon Kim (KISA) Document: draft-ietf-smime-cms-seed-01.txt Jeeyeon Kim (KISA)
Expires: September 29, 2004 Jaeil Lee (KISA) Expires: October 2004 Jaeil Lee (KISA)
Target category : Standard Track March 29, 2004 Target category : Standard Track April 2004
Use of the SEED Encryption Algorithm in CMS Use of the SEED Encryption Algorithm in CMS
draft-ietf-smime-cms-seed-00.txt <draft-ietf-smime-cms-seed-01.txt>
Status of this Memo Status of this Memo
This document is an Internet-Draft and is in full conformance with This document is an Internet-Draft and is in full conformance with
all provisions of Section 10 of RFC2026. all provisions of Section 10 of RFC2026.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that other
other groups may also distribute working documents as Internet- groups may also distribute working documents as Internet- Drafts.
Drafts.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
<a class="moz-txt-link-freetext" href="http://www.ietf.org/ietf/1id-abstracts.txt">http://www.ietf.org/ietf/1id-abstracts.txt</a> http://www.ietf.org/ietf/1id-abstracts.txt
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
<a class="moz-txt-link-freetext" href="http://www.ietf.org/shadow.html">http://www.ietf.org/shadow.html</a>. http://www.ietf.org/shadow.html.
Comments or suggestions for improvement may be made on the "ietf- Comments or suggestions for improvement may be made on the "ietf-
smime" mailing list, or directly to the author. smime" mailing list, or directly to the author.
Abstract Abstract
This document specifies the conventions for using the SEED encryption This document specifies the conventions for using the SEED encryption
algorithm for encryption with the Cryptographic Message Syntax (CMS). algorithm for encryption with the Cryptographic Message Syntax (CMS).
1. Introduction 1. Introduction
This document specifies the conventions for usting the SEED This document specifies the conventions for using the SEED encryption
encryption algorithm [SEED] [TTASSEED] for encryption with the algorithm [SEED][TTASSEED] for encryption with the Cryptographic
Cryptographic Message Syntax (CMS)[CMS]. The relevant object Message Syntax (CMS)[CMS]. The relevant object identifiers (OIDs) and
identifiers (OIDs) and processing steps are provided so that SEED may processing steps are provided so that SEED may be used in the CMS
be used in the CMS specification (RFC 3369, RFC 3370) for content and specification (RFC 3369, RFC 3370) for content and key encryption.
key encryption.
1.1 SEED 1.1 SEED
SEED is a symmetric encryption algorithm that had been developed by SEED is a symmetric encryption algorithm that had been developed by
KISA (Korea Information Security Agency) and a group of experts since KISA (Korea Information Security Agency) and a group of experts since
1998. The input/output block size of SEED is 128-bit and the key 1998. The input/output block size of SEED is 128-bit and the key
length is also 128-bit. SEED has the 16-round Feistel structure. A length is also 128-bit. SEED has the 16-round Feistel structure. A
128-bit input is divided into two 64-bit blocks and the right 64-bit 128-bit input is divided into two 64-bit blocks and the right 64-bit
block is an input to the round function with a 64-bit subkey block is an input to the round function with a 64-bit subkey
generated from the key scheduling. generated from the key scheduling.
skipping to change at page 2, line 41 skipping to change at page 2, line 35
SEED is robust against known attacks including DC (Differential SEED is robust against known attacks including DC (Differential
cryptanalysis), LC (Linear cryptanalysis) and related key attacks, cryptanalysis), LC (Linear cryptanalysis) and related key attacks,
etc. SEED has gone through wide public scrutinizing procedures. etc. SEED has gone through wide public scrutinizing procedures.
Especially, it has been evaluated and also considered Especially, it has been evaluated and also considered
cryptographically secure by trustworhty organizations such as ISO/IEC cryptographically secure by trustworhty organizations such as ISO/IEC
JTC 1/SC 27 and Japan CRYTEC (Cryptography Reasearch and Evaluation JTC 1/SC 27 and Japan CRYTEC (Cryptography Reasearch and Evaluation
Comittees) [ISOSEED][CRYPTEC]. Comittees) [ISOSEED][CRYPTEC].
SEED is a national industrial association standard [TTASSEED] and is SEED is a national industrial association standard [TTASSEED] and is
widely used in South Korea for electronic commerce and financial widely used in South Korea for electronic commerce and financial
services operated on wired &amp; wireless PKI. services operated on wired & wireless PKI.
1.2 Terminology 1.2 Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD NOT",
"RECOMMENDED", "MAY", and "OPTIONAL" in this document (in uppercase, "RECOMMENDED", "MAY", and "OPTIONAL" in this document (in uppercase,
as shown) are to be interpreted as described in [RFC2119]. as shown) are to be interpreted as described in [RFC2119].
2. Object Identifiers for Content and Key Encryption 2. Object Identifiers for Content and Key Encryption
This section provides the OIDs and processing information necessary This section provides the OIDs and processing information necessary
skipping to change at page 4, line 30 skipping to change at page 4, line 25
B1 | B2 Concatenate B1 and B2 B1 | B2 Concatenate B1 and B2
K The key-encryption key K K The key-encryption key K
n The number of 64-bit key data blocks n The number of 64-bit key data blocks
s The number of steps in the wrapping process, s The number of steps in the wrapping process,
s = 6n s = 6n
P[i] The ith plaintext key data block P[i] The ith plaintext key data block
C[i] The ith ciphertext data block C[i] The ith ciphertext data block
A The 64-bit integrity check register A The 64-bit integrity check register
R[i] An array of 64-bit registers where R[i] An array of 64-bit registers where
i = 0, 1, 2, ..., n i = 0, 1, 2, ..., n
A[t], R[i][t] The contents of registers A and R[i] after A[t], R[t][i] The contents of registers A and R[i] after
encryption step t. encryption step t.
IV The 64-bit initial value used during the IV The 64-bit initial value used during the
wrapping process. wrapping process.
In the key wrap algorithm, the concatenation function will be used to In the key wrap algorithm, the concatenation function will be used to
concatenate 64-bit quantities to form the 128-bit input to the SEED concatenate 64-bit quantities to form the 128-bit input to the SEED
codebook. The extraction functions will be used to split the 128-bit codebook. The extraction functions will be used to split the 128-bit
output from the SEED codebook into two 64-bit quantities. output from the SEED codebook into two 64-bit quantities.
3.2 SEED Key Wrap 3.2 SEED Key Wrap
Key wrapping with SEED is identical to Section 2.2.1 of [RFC3394] Key wrapping with SEED is identical to Section 2.2.1 of [RFC3394]
with "AES" replaced by "SEED". with "AES" replaced by "SEED".
The inputs to the key wrapping process are the KEK and the plaintext The inputs to the key wrapping process are the KEK and the plaintext
to be wrapped. The plaintext consists of n 64-bit blocks, containing to be wrapped. The plaintext consists of n 64-bit blocks, containing
the key data being wrapped. The key wrapping process is described the key data being wrapped. The key wrapping process is described
below. below.
Inputs: Plaintext, n 64-bit values {P1, P2, ..., Pn}, and Inputs: Plaintext, n 64-bit values {P[1], P[2], ..., P[n]}, and
Key, K (the KEK). Key, K (the KEK).
Outputs: Ciphertext, (n+1) 64-bit values {C0, C1, ..., Cn}. Outputs: Ciphertext, (n+1) 64-bit values {C[0], C[1], ..., C[n]}.
1) Initialize variables. 1) Initialize variables.
Set A[0] to an initial value (see Section 3.4) Set A[0] to an initial value (see Section 3.4)
For i = 1 to n For i = 1 to n
R[0][i] = P[i] R[0][i] = P[i]
2) Calculate intermediate values. 2) Calculate intermediate values.
For t = 1 to s, where s = 6n For t = 1 to s, where s = 6n
A[t] = MSB(64, SEED(K, A[t-1] | R[t-1][1])) ^ t A[t] = MSB(64, SEED(K, A[t-1] | R[t-1][1])) ^ t
For i = 1 to n-1 For i = 1 to n-1
R[t][i] = R[t-1][i+1] R[t][i] = R[t-1][i+1]
R[t][n] = LSB(64, SEED(K, A[t-1] | R[t-1][1])) R[t][n] = LSB(64, SEED(K, A[t-1] | R[t-1][1]))
3) Output the results. 3) Output the results.
Set C[0] = A[t] Set C[0] = A[s]
For i = 1 to n For i = 1 to n
C[i] = R[t][i] C[i] = R[s][i]
An alternative description of the key wrap algorithm involves An alternative description of the key wrap algorithm involves
indexing rather than shifting. This approach allows one to indexing rather than shifting. This approach allows one to
calculate the wrapped key in place, avoiding the rotation in the calculate the wrapped key in place, avoiding the rotation in the
previous description. This produces identical results and is more previous description. This produces identical results and is more
easily implemented in software. easily implemented in software.
Inputs: Plaintext, n 64-bit values {P1, P2, ..., Pn}, and Inputs: Plaintext, n 64-bit values {P[1], P[2], ..., P[n]}, and
Key, K (the KEK). Key, K (the KEK).
Outputs: Ciphertext, (n+1) 64-bit values {C0, C1, ..., Cn}. Outputs: Ciphertext, (n+1) 64-bit values {C[0], C[1], ..., C[n]}.
1) Initialize variables. 1) Initialize variables.
Set A = IV, an initial value (see Section 3.4) Set A = IV, an initial value (see Section 3.4)
For i = 1 to n For i = 1 to n
R[i] = P[i] R[i] = P[i]
2) Calculate intermediate values. 2) Calculate intermediate values.
For j = 0 to 5 For j = 0 to 5
skipping to change at page 6, line 16 skipping to change at page 6, line 15
3.3 SEED Key Unwrap 3.3 SEED Key Unwrap
Key unwrapping with SEED is identical to Section 2.2.2 of Key unwrapping with SEED is identical to Section 2.2.2 of
[RFC3394], with "AES" replaced by "SEED". [RFC3394], with "AES" replaced by "SEED".
The inputs to the unwrap process are the KEK and (n+1) 64-bit blocks The inputs to the unwrap process are the KEK and (n+1) 64-bit blocks
of ciphertext consisting of previously wrapped key. It returns n of ciphertext consisting of previously wrapped key. It returns n
blocks of plaintext consisting of the n 64-bit blocks of the blocks of plaintext consisting of the n 64-bit blocks of the
decrypted key data. decrypted key data.
Inputs: Ciphertext, (n+1) 64-bit values {C0, C1, ..., Cn}, and Inputs: Ciphertext, (n+1) 64-bit values {C[0], C[1], ..., C[n]}, and
Key, K (the KEK). Key, K (the KEK).
Outputs: Plaintext, n 64-bit values {P1, P2, ..., Pn}. Outputs: Plaintext, n 64-bit values {P[1], P[2], ..., P[n]}.
1) Initialize variables. 1) Initialize variables.
Set A[s] = C[0] where s = 6n Set A[s] = C[0] where s = 6n
For i = 1 to n For i = 1 to n
R[s][i] = C[i] R[s][i] = C[i]
2) Calculate the intermediate values. 2) Calculate the intermediate values.
For t = s to 1 For t = s to 1
skipping to change at page 6, line 48 skipping to change at page 6, line 47
For i = 1 to n For i = 1 to n
P[i] = R[0][i] P[i] = R[0][i]
Else Else
Return an error Return an error
The unwrap algorithm can also be specified as an index based The unwrap algorithm can also be specified as an index based
operation, allowing the calculations to be carried out in place. operation, allowing the calculations to be carried out in place.
Again, this produces the same results as the register shifting Again, this produces the same results as the register shifting
approach. approach.
Inputs: Ciphertext, (n+1) 64-bit values {C0, C1, ..., Cn}, and Inputs: Ciphertext, (n+1) 64-bit values {C[0], C[1], ..., C[n]}, and
Key, K (the KEK). Key, K (the KEK).
Outputs: Plaintext, n 64-bit values {P0, P1, K, Pn}. Outputs: Plaintext, n 64-bit values {P[0], P[1], ..., P[n]}.
1) Initialize variables. 1) Initialize variables.
Set A = C[0] Set A = C[0]
For i = 1 to n For i = 1 to n
R[i] = C[i] R[i] = C[i]
2) Compute intermediate values. 2) Compute intermediate values.
For j = 5 to 0 For j = 5 to 0
skipping to change at page 9, line 5 skipping to change at page 8, line 49
If an S/MIME client is required to support symmetric encryption with If an S/MIME client is required to support symmetric encryption with
SEED, the capabilities attribute MUST contain the SEED OID SEED, the capabilities attribute MUST contain the SEED OID
specified above in the category of symmetric algorithms. The specified above in the category of symmetric algorithms. The
parameter associated with this OID MUST be SeedSMimeCapability. parameter associated with this OID MUST be SeedSMimeCapability.
SeedSMimeCapabilty ::= NULL SeedSMimeCapabilty ::= NULL
The SMIMECapability SEQUENCE representing SEED MUST be The SMIMECapability SEQUENCE representing SEED MUST be
DER-encoded as the following hexadecimal strings: DER-encoded as the following hexadecimal strings:
30 0A 06 08 2A 83 1A 8C 9A 44 01 04 30 0C 06 08 2A 83 1A 8C 9A 44 01 04 05 00
When a sending agent creates an encrypted message, it has to decide When a sending agent creates an encrypted message, it has to decide
which type of encryption algorithm to use. In general the decision which type of encryption algorithm to use. In general the decision
process involves information obtained from the capabilities lists process involves information obtained from the capabilities lists
included in messages received from the recipient, as well as other included in messages received from the recipient, as well as other
information such as private agreements, user preferences, legal information such as private agreements, user preferences, legal
restrictions, and so on. If users require SEED for symmetric restrictions, and so on. If users require SEED for symmetric
encryption, it MUST be supported by the S/MIME clients on both the encryption, it MUST be supported by the S/MIME clients on both the
sending and receiving side, and it MUST be set in the user sending and receiving side, and it MUST be set in the user
preferences. preferences.
skipping to change at page 11, line 7 skipping to change at page 11, line 7
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2633] Ramsdell, B., Editor. S/MIME Version 3 Message [RFC2633] Ramsdell, B., Editor. S/MIME Version 3 Message
Specification. RFC 2633. June 1999. Specification. RFC 2633. June 1999.
[RFC3394] J. Schaad and R. Housley, "Advanced Encryption Standard [RFC3394] J. Schaad and R. Housley, "Advanced Encryption Standard
(AES) Key Wrap Algorithm", RFC 3394, September 2002. (AES) Key Wrap Algorithm", RFC 3394, September 2002.
[AES-WRAP] National Institute of Standards and Technology. AES Key [AES-WRAP] National Institute of Standards and Technology. AES Key
Wrap Specification. 17 November 2001. Wrap Specification. 17 November 2001.
<a class="moz-txt-link-freetext" href="http://csrc.nist.gov/encryption/kms/key-wrap.pdf">http://csrc.nist.gov/encryption/kms/key-wrap.pdf</a> http://csrc.nist.gov/encryption/kms/key-wrap.pdf
8.2 Informative Reference 8.2 Informative Reference
[SEED] KISA, "SEED Algorithm Specification", [SEED] Jongwook Park, Sungjae Lee, Jeeyeon Kim, Jaeil Lee,
<a class="moz-txt-link-freetext" href="http://www.kisa.or.kr/seed/seed_eng.html">http://www.kisa.or.kr/seed/seed_eng.html</a>" "The SEED Encryption Algorithm", draft-park-seed-00.txt
[SEED-WEB] KISA, "SEED Algorithm Specification",
http://www.kisa.or.kr/seed/seed_eng.html"
[TTASSEED] Telecommunications Technology Association (TTA), [TTASSEED] Telecommunications Technology Association (TTA),
South Korea, "128-bit Symmetric Block Cipher (SEED)", South Korea, "128-bit Symmetric Block Cipher (SEED)",
TTAS.KO-12.0004, September, 1998 (In Korean) TTAS.KO-12.0004, September, 1998 (In Korean)
<a class="moz-txt-link-freetext" href="http://www.tta.or.kr/English/new/main/index.htm">http://www.tta.or.kr/English/new/main/index.htm</a> http://www.tta.or.kr/English/new/main/index.htm
[ISOSEED] ISO/IEC, ISO/IEC JTC1/SC 27 N 256r1, "National Body [ISOSEED] ISO/IEC, ISO/IEC JTC1/SC 27 N 256r1, "National Body
contributions on NP 18033 Encryption algorithms in contributions on NP 18033 Encryption algorithms in
response to document SC 27 N 2563", October, 2000 response to document SC 27 N 2563", October, 2000
[CRYPTREC] Information-technology Promotion Agency (IPA), Japan, [CRYPTREC] Information-technology Promotion Agency (IPA), Japan,
CRYPTREC. "SEED Evaluation Report", February, 2002 CRYPTREC. "SEED Evaluation Report", February, 2002
<a class="moz-txt-link-freetext" href="http://www.kisa.or.kr">http://www.kisa.or.kr</a> http://www.kisa.or.kr
9. Authors' Address 9. Authors' Address
Jongwook Park Jongwook Park
Korea Information Security Agency Korea Information Security Agency
Phone: +82-2-405-5432 Phone: +82-2-405-5432
FAX : +82-2-405-5499 FAX : +82-2-405-5499
Email: <a class="moz-txt-link-abbreviated" href="mailto:khopri@kisa.or.kr">khopri@kisa.or.kr</a> Email: khopri@kisa.or.kr
Sungjae Lee Sungjae Lee
Korea Information Security Agency Korea Information Security Agency
Phone: +82-2-405-5243 Phone: +82-2-405-5243
FAX : +82-2-405-5499 FAX : +82-2-405-5499
Email: <a class="moz-txt-link-abbreviated" href="mailto:sjlee@kisa.or.kr">sjlee@kisa.or.kr</a> Email: sjlee@kisa.or.kr
Jeeyeon Kim Jeeyeon Kim
Korea Information Security Agency Korea Information Security Agency
Phone: +82-2-405-5238 Phone: +82-2-405-5238
FAX : +82-2-405-5499 FAX : +82-2-405-5499
Email: <a class="moz-txt-link-abbreviated" href="mailto:jykim@kisa.or.kr">jykim@kisa.or.kr</a> Email: jykim@kisa.or.kr
Jaeil Lee Jaeil Lee
Korea Information Security Agency Korea Information Security Agency
Phone: +82-2-405-5300 Phone: +82-2-405-5300
FAX : +82-2-405-5499 FAX : +82-2-405-5499
Email: <a class="moz-txt-link-abbreviated" href="mailto:jilee@kisa.or.kr">jilee@kisa.or.kr</a> Email: jilee@kisa.or.kr
Appendix A ASN.1 Module Appendix A ASN.1 Module
SeedEncryptionAlgorithmInCMS SeedEncryptionAlgorithmInCMS
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
pkcs9(9) smime(16) modules(0) id-mod-cms-seed(?) } pkcs9(9) smime(16) modules(0) id-mod-cms-seed(25) }
DEFINITIONS IMPLICIT TAGS ::= BEGIN DEFINITIONS IMPLICIT TAGS ::=
BEGIN
id-seedCBC OBJECT IDENTIFIER ::= id-seedCBC OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) korea(410) kisa(200004) { iso(1) member-body(2) korea(410) kisa(200004)
algorithm(1) seedCBC(4) } algorithm(1) seedCBC(4) }
-- Initialization Vector -- Initialization Vector
SeedCBCParameter ::= SeedIV SeedCBCParameter ::= SeedIV
SeedIV ::= OCTET STRING (SIZE(16)) SeedIV ::= OCTET STRING (SIZE(16))
 End of changes. 

This html diff was produced by rfcdiff 1.23, available from http://www.levkowetz.com/ietf/tools/rfcdiff/