ISO/IEC 18033-4:2005
(Main)Information technology — Security techniques — Encryption algorithms — Part 4: Stream ciphers
Information technology — Security techniques — Encryption algorithms — Part 4: Stream ciphers
ISO/IEC 18033-4:2005 specifies stream cipher algorithms. A stream cipher is an encryption mechanism that uses a keystream to encrypt a plaintext in bitwise or block-wise manner. A stream cipher is technically specified by choosing a keystream generator and a mode of stream ciphers. ISO/IEC 18033-4:2005 specifies the following ways to generate keystream. Mechanisms based on a block cipher: OFB, CTR, and CFB modes of block ciphers. Dedicated keystream generators: MUGI and SNOW 2.0. ISO/IEC 18033-4:2005 specifies the following modes of stream ciphers: binary-additive output function, MULTI-S01 output function. There are two types of stream cipher: a synchronous stream cipher, in which the keystream is only generated from the secret key (and an initialization vector) and a self-synchronizing stream cipher, in which the keystream is generated from the secret key and some past ciphertexts (and an initialization vector). Typically the encryption operation is the additive bitwise XOR operation between a keystream and the message. ISO/IEC 18033-4:2005 describes pseudorandom number generators for producing both keystream and output functions for stream ciphers.
Technologies de l'information — Techniques de sécurité — Algorithmes de chiffrement — Partie 4: Chiffrements en flot
General Information
Relations
Standards Content (Sample)
INTERNATIONAL ISO/IEC
STANDARD 18033-4
First edition
2005-07-15
Information technology — Security
techniques — Encryption algorithms —
Part 4:
Stream ciphers
Technologies de l'information — Techniques de sécurité — Algorithmes
de chiffrement —
Partie 4: Chiffrements en flot
Reference number
ISO/IEC 18033-4:2005(E)
©
ISO/IEC 2005
---------------------- Page: 1 ----------------------
ISO/IEC 18033-4:2005(E)
PDF disclaimer
This PDF file may contain embedded typefaces. In accordance with Adobe's licensing policy, this file may be printed or viewed but
shall not be edited unless the typefaces which are embedded are licensed to and installed on the computer performing the editing. In
downloading this file, parties accept therein the responsibility of not infringing Adobe's licensing policy. The ISO Central Secretariat
accepts no liability in this area.
Adobe is a trademark of Adobe Systems Incorporated.
Details of the software products used to create this PDF file can be found in the General Info relative to the file; the PDF-creation
parameters were optimized for printing. Every care has been taken to ensure that the file is suitable for use by ISO member bodies. In
the unlikely event that a problem relating to it is found, please inform the Central Secretariat at the address given below.
© ISO/IEC 2005
All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any means,
electronic or mechanical, including photocopying and microfilm, without permission in writing from either ISO at the address below or
ISO's member body in the country of the requester.
ISO copyright office
Case postale 56 • CH-1211 Geneva 20
Tel. + 41 22 749 01 11
Fax + 41 22 749 09 47
E-mail copyright@iso.org
Web www.iso.org
Published in Switzerland
ii © ISO/IEC 2005 – All rights reserved
---------------------- Page: 2 ----------------------
ISO/IEC 18033-4:2005(E)
Contents Page
Foreword.iv
Introduction . v
1 Scope . 1
2 Normative references . 1
3 Terms and definitions. 1
4 Symbols and abbreviated terms. 4
4.1 Left-truncation of bits. 5
4.2 Shift operation. 6
4.3 Variable I (k). 6
5 General models for stream ciphers . 6
5.1 Keystream generators. 6
5.1.1 Synchronous keystream generators . 6
5.1.2 Self-synchronizing keystream generators . 6
5.2 Output functions. 7
5.2.1 Binary-additive output function . 7
5.2.2 MULTI-S01 output function. 8
6 Constructing keystream generators from block ciphers. 10
6.1 Modes of a block cipher for a synchronous keystream generator. 10
6.1.1 OFB mode. 11
6.1.2 CTR mode . 11
6.2 Mode of a block cipher for a self-synchronizing keystream generator . 12
6.2.1 CFB mode . 12
7 Dedicated keystream generators . 13
7.1 MUGI keystream generator . 13
7.1.1 Initialization function Init. 14
7.1.2 Next-state function Next. 15
7.1.3 Keystream function Strm . 15
7.1.4 Function ρ . 15
1
7.1.5 Function λ . 16
1
7.1.6 Function F. 16
7.1.7 Function S . 17
R
7.1.8 Function M. 18
7.2 SNOW 2.0 keystream generator . 18
7.2.1 Initialization function Init. 19
7.2.2 Next-state function Next. 20
7.2.3 Keystream function Strm . 21
7.2.4 Function T. 21
7.2.5 Multiplications of α in finite field arithmetic. 22
–1
7.2.6 Multiplications of α in finite field arithmetic. 22
7.2.7 Function FSM (x, y, z) . 23
Annex A (informative) Examples. 24
n
A.1 Operations over the finite field GF(2 ). 24
A.2 Example for MUGI. 24
A.2.1 Key, initialization vector, and keystream triplets . 24
A.2.2 Sample internal states. 24
A.3 Example for SNOW 2.0 . 30
A.3.1 128-bit key. 30
A.3.2 256-bit key. 34
© ISO/IEC 2005 – All rights reserved iii
---------------------- Page: 3 ----------------------
ISO/IEC 18033-4:2005(E)
Annex B (informative) Security information . 39
B.1 Security levels of stream ciphers. 39
B.1.1 Security-efficiency trade-off in MULTI-S01 .40
B.2 Implementation examples of dedicated keystream generators. 40
Annex C (normative) Object identifiers. 41
Bibliography. 43
iv © ISO/IEC 2005 – All rights reserved
---------------------- Page: 4 ----------------------
ISO/IEC 18033-4:2005(E)
Foreword
ISO (the International Organization for Standardization) and IEC (the International Electrotechnical
Commission) form the specialized system for worldwide standardization. National bodies that are members of
ISO or IEC participate in the development of International Standards through technical committees
established by the respective organization to deal with particular fields of technical activity. ISO and IEC
technical committees collaborate in fields of mutual interest. Other international organizations, governmental
and non-governmental, in liaison with ISO and IEC, also take part in the work. In the field of information
technology, ISO and IEC have established a joint technical committee, ISO/IEC JTC 1.
International Standards are drafted in accordance with the rules given in the ISO/IEC Directives, Part 2.
The main task of the joint technical committee is to prepare International Standards. Draft International
Standards adopted by the joint technical committee are circulated to national bodies for voting. Publication as
an International Standard requires approval by at least 75 % of the national bodies casting a vote.
ISO/IEC 18033-4 was prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology,
Subcommittee SC 27, IT Security techniques.
ISO/IEC 18033 consists of the following parts, under the general title Information technology — Security
techniques — Encryption algorithms:
⎯ Part 1: General
⎯ Part 2: Asymmetric ciphers
⎯ Part 3: Block ciphers
⎯ Part 4: Stream ciphers
© ISO/IEC 2005 – All rights reserved v
---------------------- Page: 5 ----------------------
ISO/IEC 18033-4:2005(E)
Introduction
The International Organization for Standardization (ISO) and International Electrotechnical Commission (IEC)
draw attention to the fact that it is claimed that compliance with this International Standard may involve the
use of patents.
The ISO and IEC take no position concerning the evidence, validity and scope of these patent rights.
The holders of these patent rights have assured the ISO and IEC that they are willing to negotiate licences under
reasonable and non-discriminatory terms and conditions with applicants throughout the world. In this respect,
the statements of the holders of these patent rights are registered with the ISO and IEC. Information may be
obtained from:
ISO/IEC JTC 1/SC 27 Standing Document 8 (SD8) "Patent Information"
Standing Document 8 (SD8) is publicly available at: http://www.ni.din.de/sc27
Attention is drawn to the possibility that some of the elements of this International Standard may be the
subject of patent rights other than those identified above. ISO and IEC shall not be held responsible for
identifying any or all such patent rights.
vi © ISO/IEC 2005 – All rights reserved
---------------------- Page: 6 ----------------------
INTERNATIONAL STANDARD ISO/IEC 18033-4:2005(E)
Information technology — Security techniques — Encryption
algorithms —
Part 4:
Stream ciphers
1 Scope
This part of ISO/IEC 18033 specifies stream cipher algorithms. A stream cipher is an encryption mechanism
that uses a keystream to encrypt a plaintext in bitwise or block-wise manner. There are two types of stream
cipher: a synchronous stream cipher, in which the keystream is only generated from the secret key (and an
initialization vector) and a self-synchronizing stream cipher, in which the keystream is generated from the
secret key and some past ciphertexts (and an initialization vector). Typically the encryption operation is the
additive bitwise XOR operation between a keystream and the message. This part of ISO/IEC 18033 describes
both pseudorandom number generators for producing keystream, and output functions for stream ciphers.
The algorithms specified in this part of ISO/IEC 18033 have been assigned object identifiers in accordance with
ISO/IEC 9834. The list of assigned object identifiers is given in Annex C. Any change to the specification
of the algorithms resulting in a change of functional behaviour will result in a change of the object identifier
assigned to the algorithm.
NOTE 1 – In applications where a combination of algorithms is being used, or when an algorithm is parameterized by the
choice of a combination of other algorithms, the combination may be specified as a sequence of object identifiers.
Alternatively, the object identifiers of lower layer algorithms may be included in the parameter field of the higher layer
algorithm's identifier structure. For example, the object identifier of a block cipher could be included as a parameter in the
algorithm identifier structure for a keystream generator. The algorithm identifier structure is defined in ISO/IEC 9594-8.
NOTE 2 – The encoding of object identifiers is application dependent.
2 Normative references
The following referenced documents are indispensable for the application of this document. For dated
references, only the edition cited applies. For undated references, the latest edition of the referenced
document (including any amendments) applies.
ISO/IEC 18033-1, Information technology — Security techniques — Encryption algorithms — Part 1: General
ISO/IEC 18033-3, Information technology — Security techniques — Encryption algorithms — Part 3: Block
ciphers
3 Terms and definitions
For the purposes of this document, the terms and definitions given in ISO/IEC 18033-1 and the following
apply.
3.1
big-endian
a method of storage of multi-byte numbers with the most significant bytes at the lowest memory addresses.
[ISO/IEC 10118-1: 2000]
© ISO/IEC 2005 – All rights reserved 1
---------------------- Page: 7 ----------------------
ISO/IEC 18033-4:2005(E)
3.2
block
string of bits of defined length. [ISO/IEC 18033-1: 2005]
3.3
block cipher
symmetric encipherment system with the property that the encryption algorithm operates on a block of
plaintext, i.e. a string of bits of a defined length, to yield a block of ciphertext. [ISO/IEC 18033-1: 2005]
3.4
cipher
alternative term for encipherment system. [ISO/IEC 18033-1: 2005]
3.5
ciphertext
data which has been transformed to hide its information content. [ISO/IEC 10116: 1997]
3.6
confidentiality
the property that information is not made available or disclosed to unauthorized individuals, entities, or
processes. [ISO/IEC 13335-1: 2004]
3.7
data integrity
the property that data has not been altered or destroyed in an unauthorized manner. [ISO/IEC 9797-1: 1999]
3.8
decipherment
alternative term for decryption. [ISO/IEC 18033-1: 2005]
3.9
decryption
reversal of a corresponding encipherment. [ISO/IEC 11770-1: 1996]
3.10
encipherment
alternative term for encryption. [ISO/IEC 18033-1: 2005]
3.11
encryption
(reversible) transformation of data by a cryptographic algorithm to produce ciphertext, i.e., to hide the
information content of the data. [ISO/IEC 9797-1: 1996]
3.12
initialization value
value used in defining the starting point of an encipherment process. [ISO 8372: 1987]
3.13
key
sequence of symbols that controls the operation of a cryptographic transformation (e.g. encipherment,
decipherment). [ISO/IEC 11770-1: 1996]
3.14
keystream
pseudorandom sequence of symbols, intended to be secret, used by the encryption and decryption algorithms
of a stream cipher. If a portion of the keystream is known by an attacker, then it shall be computationally
infeasible for the attacker to deduce any information about the remainder of the keystream.
[ISO/IEC 18033-1:2005]
2 © ISO/IEC 2005 – All rights reserved
---------------------- Page: 8 ----------------------
ISO/IEC 18033-4:2005(E)
3.15
keystream function
function that takes as input the current state of the keystream generator and (optionally) part of the
previously output ciphertext, and gives as output the next part of the keystream.
3.16
keystream generator
state-based process (i.e. a finite state machine) that takes as inputs a key, an initialization vector, and if
necessary the ciphertext, and that outputs a keystream, i.e. a sequence of bits or blocks of bits, of arbitrary
length.
3.17
n-bit block cipher
block cipher with the property that plaintext blocks and ciphertext blocks are n bits in length.
[ISO/IEC 10116:1997]
3.18
next-state function
function that takes as input the current state of the keystream generator and (optionally) part of the
previously output ciphertext, and gives as output a new state for the keystream generator.
3.19
output function
output function that combines the keystream and the plaintext to produce the ciphertext. This function is often
bitwise XOR.
3.20
padding
appending extra bits to a data string. [ISO/IEC 10118-1: 2000]
3.21
plaintext
unenciphered information. [ISO/IEC 9797-1: 1999]
3.22
secret key
key used with symmetric cryptographic techniques by a specified set of entities. [ISO/IEC 11770-3: 1999]
3.23
self-synchronizing stream cipher
stream cipher with the property that the keystream symbols are generated as a function of a secret key and a
fixed number of previous ciphertext bits. [ISO/IEC 18033-1: 2005]
3.24
state
current internal state of a keystream generator.
3.25
stream cipher
symmetric encryption system with the property that the encryption algorithm involves combining a sequence of
plaintext symbols with a sequence of keystream symbols one symbol at a time, using an invertible function.
Two types of stream cipher can be identified: synchronous stream ciphers and self-synchronizing stream
ciphers, distinguished by the method to obtain the keystream. [ISO/IEC 18033-1: 2005]
3.26
synchronous stream cipher
stream cipher with the property that the keystream symbols are generated as a function of a secret key, and
are independent of the plaintext and ciphertext. [ISO/IEC 18033-1: 2005]
© ISO/IEC 2005 – All rights reserved 3
---------------------- Page: 9 ----------------------
ISO/IEC 18033-4:2005(E)
4 Symbols and abbreviated terms
(n)
0 n-bit variable where 0 is assigned to every bit.
0x Prefix for hexadecimal values.
a Variables in an internal state of a keystream generator.
i
b Variables in an internal state of a keystream generator.
i
C Ciphertext block.
i
CFB Cipher FeedBack mode of a block cipher.
CTR CounTeR mode of a block cipher.
D 64-bit constants used for MUGI.
i
e Symmetric block cipher encryption function using secret key K.
K
F Subfunction used for MUGI.
FSM Subfunction used for SNOW 2.0.
F[x] The polynomial ring over the finite field F.
n n
GF(2 ) Finite field of exactly 2 elements.
Init Function which generates the initial internal state of a keystream generator.
IV Initialization vector.
K Key.
M Subfunction used for MUGI.
n Block length.
Next Next-state function of a keystream generator.
OFB Output FeedBack mode of a block cipher.
OR Bitwise or operation.
Out Output function combining keystream and plaintext in order to generate ciphertext.
P Plaintext.
P Plaintext block.
i
R Additional input to Out.
S Internal state of a keystream generator.
i
NOTE – During normal operation of the cipher, i will increase monotonically starting from zero. However, during
initialization of the ciphers, it is convenient from a notational point of view to let i take negative values and define the starting
state S in terms of S values for i<0.
0 i
S Subfunction used for MUGI.
i
4 © ISO/IEC 2005 – All rights reserved
---------------------- Page: 10 ----------------------
ISO/IEC 18033-4:2005(E)
Strm Keystream function of a keystream generator.
SUB Lookup table used for MUGI and SNOW 2.0.
T Subfunction used for SNOW 2.0.
Z Keystream.
Z Keystream block.
i
α Lookup table used for SNOW 2.0.
MUL
α Lookup table used for SNOW 2.0.
inv_MUL
ρ Subfunction used for MUGI.
1
λ Subfunction used for MUGI.
1
�x� The smallest integer greater than or equal to the real number x.
¬x Bitwise complement operation.
•Polynomial multiplication.
|| Bit concatenation.
m
+ Integer addition modulo 2 .
m
⊕ Bitwise XOR (eXclusive OR) operation.
⊗ Operation of multiplication of elements in the finite field GF(2n). E.g. C = A ⊗ B: In this
operation, the finite field is represented as a selected irreducible polynomial F(x) of degree n
,a ,.,a } and B = {b ,b ,.,b } (where the a
with binary coefficients, the n-bit blocks A = {a
n–1 n–2 0 n–1 n–2 0 i
n–1 n–2
and b are bits) are represented as the polynomials, A(x) = a x + a x + . + a and B(x) =
i n–1 n–2 0
n–1 n–2
b x + b x + . + b respectively, then let C(x) = A(x) • B(x) mod F(x), i.e. C(x) is the
n–1 n–2 0
polynomial of degree at most n–1 obtained by multiplying A(x) and B(x), dividing the result by
n–1 n–2
F(x), and then taking the remainder. If C(x) = c x + c x + . + c (where the c are bits)
n–1 n–2 0 i
then let C be the n-bit block {c ,c ,.,c }.
n–1 n–2 0
<< t t-bit left shift in an n-bit register.
n
>> tt-bit right shift in an n-bit register.
n
<<< t t-bit left circular rotation in an n-bit register.
n
>>> tt-bit right circular rotation in an n-bit register.
n
4.1 Left-truncation of bits
The operation of selecting the j leftmost bits of an array A=(a , a ,., a ) to generate a j-bit array is written
0 1 m–1
( j ~ A)=(a , a ,., a ).
0 1 j–1
This operation is defined only when 1 ≤ j ≤ m. [ISO/IEC 10116]
© ISO/IEC 2005 – All rights reserved 5
---------------------- Page: 11 ----------------------
ISO/IEC 18033-4:2005(E)
4.2 Shift operation
A "shift operation" Shift is defined as follows: Given an n-bit variable X and a k-bit variable F where 1 ≤ k ≤ n,
the effect of the shift function Shift is to produce the n-bit variable
Shift (X | F ) = (x , x , ., x , f , f , ., f)(k < n)
k k k+1 n–1 0 1 k–1
Shift (X | F ) = (f , f , ., f)(k = n)
k 0 1 k–1
The effect is to shift the bits of array X left by k places, discarding x , x , ., x and to place the array F in the
0 1 k–1
rightmost k places of X. When k = n the effect is to totally replace X by F. [ISO/IEC 10116]
4.3 Variable I (k)
The variable I (k) is a k-bit variable where 1 is assigned to every bit. [ISO/IEC 10116]
5 General models for stream ciphers
In this clause general models for stream ciphers are specified. A stream cipher consists of the combination of
a keystream generator and an output function.
5.1 Keystream generators
5.1.1 Synchronous keystream generators
A synchronous keystream generator is a finite-state machine. It is defined by:
1. An initialization function, Init, which takes as input a key K and an initialization vector IV, and outputs
an initial state S for the keystream generator. The initialization vector should be chosen so that no
0
two messages are ever encrypted using the same key and the same IV.
2. A next-state function, Next, which takes as input the current state of the keystream generator S, and
i
outputs the next state of the keystream generator S .
i+1
3. A keystream function, Strm, which takes as input a state of the keystream generator S, and outputs a
i
keystream block Z.
i
When the synchronous keystream generator is first initialized, it will enter an initial state S defined by
0
S = Init(IV, K).
0
On demand the synchronous keystream generator will for i=0,1,.:
1. Output a keystream block Z = Strm(S, K).
i i
2. Update the state of the machine S = Next(S, K).
i+1 i
Therefore to define a synchronous keystream generator it is only necessary to specify the functions Init, Next
and Strm, along with the lengths and alphabets of the key, the initialization vector, the state, and the output
block.
5.1.2 Self-synchronizing keystream generators
Generation of keystream for a self-synchronizing stream cipher is dependent only on previous ciphertexts, the
key, and the initialization vector. A general model for a keystream generator for a self-synchronizing stream
cipher is now defined.
6 © ISO/IEC 2005 – All rights reserved
---------------------- Page: 12 ----------------------
ISO/IEC 18033-4:2005(E)
NOTE – A self-synchronizing stream cipher differs from a synchronous stream cipher in that the keystream depends only
on previous ciphertext, the initialization vector and the key, i.e. the keystream generator operates in a stateless fashion. As
a result, a decryptor for such a cipher can recover from loss of synchronization after receiving sufficient ciphertext blocks.
This also means that the method of keystream generation is dependent upon the selected output function Out, which is
typically the binary additive mode.
1. An initialization function, Init, which takes as input a key K and an initialization vector IV and outputs
an internal input for the keystream generator S and r dummy ciphertext blocks C , C , …, C .
–1 –2 –r
2. A keystream function, Strm, that takes as input S and r ciphertext blocks C , C , …, C , and
i–1 i–2 i–r
outputs a keystream block Z.
i
To define a self-synchronizing keystream generator it is only necessary to specify the number of feedback
blocks r and the functions Init and Strm.
5.2 Output functions
In this clause two stream cipher output functions are specified, i.e. techniques to be used in a stream cipher to
combine a keystream with plaintext to derive ciphertext.
An output function for a synchronous or a self-synchronizing stream cipher is an invertible function Out that
combines a plaintext block P
, a keystream block Zi and, optionally, some other input R to give a ciphertext
i
block C (i ≥ 0). A general model for stream cipher output function is now defined.
i
Encryption of a plaintext block P by a keystream block Z is given by:
i i
C = Out(P , Z , R),
i i i
and decryption of a ciphertext block C by a keystream block Z is given by:
i i
–1
P = Out (C , Z , R).
i i i
The output function shall be such that, for any keystream block Z, plaintext block P, and other input R, we
i i
have that
–1
P = Out (Out (P , Z , R), Z , R).
i i i i
5.2.1 Binary-additive output function
A binary-additive stream cipher is a stream cipher in which the keystream, plaintext, and ciphertext blocks are
binary digits, and the operation to combine plaintext with keystream is bitwise XOR. The operation Out takes
two inputs and does not use any additional information R for its calculation. Let n to be the bit length of P . This
i
function is specified by
(n)
Set R =0 .
Out(P , Z , R) = P ⊕ Z ⊕ R.
i i i i
–1
The operation Out is specified by
(n)
Set R =0 .
–1
Out (C , Z , R) = C ⊕ Z ⊕ R.
i i i i
NOTE – The binary-additive stream cipher does not provide any integrity protection for encrypted data. If data integrity is
required, either the MULTI-S01 output function or a separate integrity mechanism should be used, such as a Message
Authentication Code (such mechanisms are specified in ISO/IEC 9797).
© ISO/IEC 2005 – All rights reserved 7
---------------------- Page: 13 ----------------------
ISO/IEC 18033-4:2005(E)
5.2.2 MULTI-S01 output function
MULTI-S01 is an output function for a synchronous stream cipher that supports both data confidentiality and
data integrity. The MULTI-S01 encryption operation is suitable for use in an online environment. However, the
decryption operation of MULTI-S01 can only be performed in an offline situation, as the integrity check is only
performed after receiving all the ciphertext blocks. MULTI-S01 has a security parameter n. The MULTI-S01
function only accepts messages whose length is a multiple of n. To encrypt messages whose length is not a
multiple of n, it is necessary to pad the plaintext. A padding technique is described in clause 5.2.2.3. In
addition to P and Z, the MULTI-S01 takes as another input some redundancy R. One possibility is to make R
a fixed public n-bit value. This should be available to both the encryption and decryption processes.
NOTE 1 An encryption mechanism based on MULTI-S01 is secure as long as t
...
Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.