13.11.2012 Views

Why Migrating to Triple DES is Not Easy

Why Migrating to Triple DES is Not Easy

Why Migrating to Triple DES is Not Easy

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Why</strong> <strong>Migrating</strong> <strong>to</strong> <strong>Triple</strong> <strong>DES</strong> <strong>is</strong> <strong>Not</strong> <strong>Easy</strong><br />

Abstract<br />

Financial institutions are performing large scale migrations of their systems<br />

from <strong>DES</strong> <strong>to</strong> triple-<strong>DES</strong>. In th<strong>is</strong> white paper we describe the basic<br />

character<strong>is</strong>tics of <strong>DES</strong> and triple-<strong>DES</strong> and look at the security properties<br />

that a financial transaction system will want <strong>to</strong> achieve. We then look at the<br />

problems related with a migration from <strong>DES</strong> <strong>to</strong> triple-<strong>DES</strong>, enumerating and<br />

d<strong>is</strong>cussing several points that we suggest should be considered. Finally, we<br />

give some suggestions that will help ease the problems of migration.


Contents<br />

1 Introduction 1<br />

2 Single <strong>DES</strong> and triple-<strong>DES</strong> 1<br />

3 Security properties wanted 3<br />

4 Migration <strong>is</strong>sues 4<br />

4.1 <strong>DES</strong> <strong>is</strong> the weakest link . . . . . . . . . . . . . . . . . . . . . . . 4<br />

4.2 The algorithm itself . . . . . . . . . . . . . . . . . . . . . . . . . 5<br />

4.3 Key blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6<br />

4.4 Hardware update . . . . . . . . . . . . . . . . . . . . . . . . . . 6<br />

4.5 Software/Firmware update . . . . . . . . . . . . . . . . . . . . . 7<br />

4.6 Payment application database . . . . . . . . . . . . . . . . . . . . 7<br />

4.7 Key Management . . . . . . . . . . . . . . . . . . . . . . . . . . 7<br />

4.8 Old vulnerabilities . . . . . . . . . . . . . . . . . . . . . . . . . 8<br />

5 Easing the migration 9<br />

6 Conclusion 10


1 Introduction<br />

<strong>Why</strong> <strong>Migrating</strong> <strong>to</strong> <strong>Triple</strong> <strong>DES</strong> <strong>is</strong> <strong>Not</strong> <strong>Easy</strong><br />

<strong>DES</strong>, the Data Encryption Standard, <strong>is</strong> a cryp<strong>to</strong>graphic algorithm that was standardized<br />

in 1977 by the National Institute of Science and Technology (NIST).<br />

When the financial industry started <strong>to</strong> deploy ATMs they opted for <strong>DES</strong> for securing<br />

transactions. Th<strong>is</strong> choice was reinforced by the development of X9 standards<br />

for financial transactions that were based on <strong>DES</strong>. <strong>DES</strong> has s<strong>to</strong>od the test of time,<br />

no attack against th<strong>is</strong> encryption algorithm in practice has been better than brute<br />

forcing the key space. However, <strong>DES</strong> uses short keys, with current technology<br />

the key space (of size 2 56 ) can be exhausted in around 56 hours using one single<br />

machine worth less than 250 000 US dollars, or in 22 hours with the combined<br />

help of a network of about 100 000 personal computers. Th<strong>is</strong> means that single<br />

<strong>DES</strong> <strong>is</strong> no longer secure. On the other hand, triple-<strong>DES</strong>, as defined in ANSI 9.52,<br />

<strong>is</strong> considered <strong>to</strong> be secure. Indeed, NIST renewed the <strong>DES</strong> standard in 1983 and<br />

1988, in 1993 it renewed it with hesitation and controversy and in 1999 <strong>DES</strong> was<br />

<strong>to</strong> be used only in legacy systems. NIST, in 1999, standardized triple-<strong>DES</strong>, based<br />

on ANSI 9.52. <strong>Triple</strong>-<strong>DES</strong> <strong>is</strong> a secure replacement for single <strong>DES</strong>, it <strong>is</strong> not currently<br />

feasible <strong>to</strong> exhaustively search the key space of triple-<strong>DES</strong>, nor will it be<br />

in the near future unless drastic unpredictable technological and/or cryptanalys<strong>is</strong><br />

advancements occur.<br />

In 1993 the financial industry had started replacing <strong>DES</strong> by triple-<strong>DES</strong> for<br />

the confidentiality of keys residing in cryp<strong>to</strong>graphic processors. In 1999, with<br />

the concordance of NIST no longer approving single <strong>DES</strong>, the financial industry<br />

started planning a migration, which cons<strong>is</strong>ts of replacing single <strong>DES</strong> with triple-<br />

<strong>DES</strong> in all its systems wherever single <strong>DES</strong> <strong>is</strong> used.<br />

Th<strong>is</strong> migration plan however places the industry, which uses single <strong>DES</strong> widely,<br />

in a challenging position. As will be d<strong>is</strong>cussed in th<strong>is</strong> document, the process of<br />

migrating from single <strong>DES</strong> <strong>to</strong> triple-<strong>DES</strong> <strong>is</strong> not as simple as just substituting one<br />

algorithm for another.<br />

2 Single <strong>DES</strong> and triple-<strong>DES</strong><br />

<strong>DES</strong> <strong>is</strong> a block cipher, encryption algorithm, which encrypts messages of block<br />

size 64 bits and produces cryp<strong>to</strong>grams of length 64 bits using a 56-bit key (<strong>DES</strong><br />

keys are actually 64 bits in length but 8 bits act as parity bits so only 56 bits are<br />

actually used for encryption).<br />

c○Copyright Okiok Data 2002 1


<strong>Why</strong> <strong>Migrating</strong> <strong>to</strong> <strong>Triple</strong> <strong>DES</strong> <strong>is</strong> <strong>Not</strong> <strong>Easy</strong><br />

We say that <strong>DES</strong> has strength 2 56 , meaning that the most efficient way <strong>to</strong> attack<br />

<strong>DES</strong> in practice 1 <strong>is</strong> <strong>to</strong> search its key space of size 2 56 . That <strong>is</strong>, <strong>to</strong> attack <strong>DES</strong> in<br />

practice one has <strong>to</strong> try each and every possible key until the correct encryption<br />

key <strong>is</strong> identified, th<strong>is</strong> takes on average 2 56 /2 = 2 55 steps.<br />

<strong>Triple</strong>-<strong>DES</strong>, noted as 3<strong>DES</strong> from here on, uses 2 keys, chosen independently<br />

at random, <strong>to</strong> <strong>DES</strong> encrypt a message multiple times. There are also ways <strong>to</strong> use<br />

3<strong>DES</strong> with 3 different keys, but these schemes do not give a significant amount<br />

of extra security in theory and are not considered in financial systems. The most<br />

common technique <strong>is</strong> <strong>to</strong> encrypt the initial plaintext message with one key, decrypt<br />

the result with a second key and finally encrypt th<strong>is</strong> last result with the first<br />

key again. Th<strong>is</strong> <strong>is</strong> known as E-D-E double length key 3<strong>DES</strong> encryption and <strong>is</strong><br />

illustrated in the following figure.<br />

1 other attacks ex<strong>is</strong>t in theory, but they demand an unreasonable amount of known or chosen<br />

plaintext-ciphertext pairs which renders the attacks unpractical.<br />

c○Copyright Okiok Data 2002 2


<strong>Why</strong> <strong>Migrating</strong> <strong>to</strong> <strong>Triple</strong> <strong>DES</strong> <strong>is</strong> <strong>Not</strong> <strong>Easy</strong><br />

E-D-E 3<strong>DES</strong> <strong>is</strong> compatible with single <strong>DES</strong> (when KL and KR are identical,<br />

E-D-E 3<strong>DES</strong> produces the same result as single <strong>DES</strong>). From here on, when we<br />

will talk about 3<strong>DES</strong> we will be referring <strong>to</strong> double length key E-D-E 3<strong>DES</strong>.<br />

The strength of 3<strong>DES</strong> <strong>is</strong> approximately 2 112 since using two 56 bit keys in E-D-E<br />

3<strong>DES</strong> <strong>is</strong> effectively equal <strong>to</strong> using one 112-bit key. A brute force search of 3<strong>DES</strong><br />

2 112 key space <strong>is</strong> currently not feasible nor will it be in the near future.<br />

3 Security properties wanted<br />

Many security properties are wanted in a financial transaction system. We will<br />

not go in<strong>to</strong> details and enumerate all of the security properties wanted but simply<br />

mention a couple of them in an informal way so as <strong>to</strong> motivate some of the<br />

d<strong>is</strong>cussions in the following sections.<br />

SP1 A cryp<strong>to</strong>graphic key should not be in cleartext in any single point of the<br />

system. Th<strong>is</strong> <strong>is</strong> the basic security property that a financial institution must<br />

achieve in order for users <strong>to</strong> have any sort of trust in the system. Th<strong>is</strong> <strong>is</strong> also<br />

an important point when different institutions interchange financial data between<br />

themselves, the security of one institution depends on that of others.<br />

To achieve th<strong>is</strong> property cryp<strong>to</strong>graphic keys must be s<strong>to</strong>red in secure cryp<strong>to</strong>graphic<br />

processors, if they are ever outside these processors they must be<br />

in a form that does not comprom<strong>is</strong>e the security of the keys, such as in split<br />

knowledge (under the possession of different individuals having certain perm<strong>is</strong>sions),<br />

or encrypted under another cryp<strong>to</strong>graphic key which <strong>is</strong> protected<br />

in a secure cryp<strong>to</strong>graphic processor.<br />

SP2 Security against known key attacks, if a working key in the system <strong>is</strong><br />

d<strong>is</strong>covered, th<strong>is</strong> should not enable an attacker <strong>to</strong> figure out the values of any<br />

other keys in the system. Some would say that if a system <strong>is</strong> secure, no<br />

single key will ever be comprom<strong>is</strong>ed so there <strong>is</strong> no need <strong>to</strong> worry about th<strong>is</strong><br />

security property, but as we will see later on th<strong>is</strong> can be a dangerous way of<br />

thinking.<br />

SP3 The security of any 3<strong>DES</strong> key should be 2 112 . It should not be possible<br />

for example <strong>to</strong> break a 3<strong>DES</strong> key by breaking one or a couple of single<br />

<strong>DES</strong> keys. If a cryp<strong>to</strong>graphic key <strong>is</strong> <strong>to</strong> be protected by another one, th<strong>is</strong><br />

last key should be of cryp<strong>to</strong>graphic strength equal or greater than the key<br />

it <strong>is</strong> protecting. Th<strong>is</strong> implies for example, among other things, that if any<br />

c○Copyright Okiok Data 2002 3


<strong>Why</strong> <strong>Migrating</strong> <strong>to</strong> <strong>Triple</strong> <strong>DES</strong> <strong>is</strong> <strong>Not</strong> <strong>Easy</strong><br />

working key <strong>is</strong> a 3<strong>DES</strong> key, the key encryption key should be a 3<strong>DES</strong> key as<br />

well.<br />

SP4 It should not be possible <strong>to</strong> combine different key parts in order <strong>to</strong> trick<br />

a secure cryp<strong>to</strong>graphic processor in<strong>to</strong> revealing information that can<br />

lead <strong>to</strong> breaking any cryp<strong>to</strong>graphic key secured by the processor. Th<strong>is</strong> <strong>is</strong><br />

important <strong>to</strong> consider for example when deciding how keys protected outside<br />

a security processor should be s<strong>to</strong>red.<br />

Of course, when analyzing the security of a system, the above security properties<br />

must be specified more formally, and others should be enumerated, but the<br />

above l<strong>is</strong>t <strong>is</strong> enough for us <strong>to</strong> be able <strong>to</strong> d<strong>is</strong>cuss about security problems related <strong>to</strong><br />

migrating from <strong>DES</strong> <strong>to</strong> 3<strong>DES</strong>.<br />

4 Migration <strong>is</strong>sues<br />

It <strong>is</strong> not sufficient <strong>to</strong> simply replace single <strong>DES</strong> with 3<strong>DES</strong>, security w<strong>is</strong>e and<br />

operationally w<strong>is</strong>e. In what follows we d<strong>is</strong>cuss about several problems that might<br />

ar<strong>is</strong>e and <strong>is</strong>sues that should be considered when attempting <strong>to</strong> migrate from single<br />

<strong>DES</strong> <strong>to</strong> 3<strong>DES</strong>.<br />

4.1 <strong>DES</strong> <strong>is</strong> the weakest link<br />

A system <strong>is</strong> just as secure as its weakest link. In a system that <strong>is</strong> composed of<br />

PIN pads, ATMs, acquiring hosts, switches, alternate switches, processors, etc., if<br />

a single entity in the system still utilizes single <strong>DES</strong> there <strong>is</strong> a possibility that the<br />

security of the whole system might be comprom<strong>is</strong>ed by an attack on single <strong>DES</strong>.<br />

As an extreme example, consider a secure cryp<strong>to</strong>graphic processor of an acquiring<br />

host that uses a 3<strong>DES</strong> master file key (MFK), but also uses a single <strong>DES</strong> key<br />

exchange key (KEK); the confidentiality of all keys that are sent <strong>to</strong> the processor<br />

can be comprom<strong>is</strong>ed, even if the keys s<strong>to</strong>red in the local database are protected by<br />

3<strong>DES</strong> encryption, so the fact that the MFK key <strong>is</strong> 3<strong>DES</strong> does not provide much<br />

of a security advantage. Less obvious examples can also lead <strong>to</strong> extreme security<br />

breakage. Consider the attack against the IBM 4758 cryp<strong>to</strong>processors using the<br />

CCA software that was found enabling an individual with a certain perm<strong>is</strong>sion <strong>to</strong><br />

extract all <strong>DES</strong> and 3<strong>DES</strong> keys from the processors ([9]). The attack was made<br />

possible by a combination of things that ex<strong>is</strong>ted because the processors had <strong>to</strong><br />

c○Copyright Okiok Data 2002 4


<strong>Why</strong> <strong>Migrating</strong> <strong>to</strong> <strong>Triple</strong> <strong>DES</strong> <strong>is</strong> <strong>Not</strong> <strong>Easy</strong><br />

continue <strong>to</strong> support single <strong>DES</strong> even though 3<strong>DES</strong> was used for protecting the<br />

keys.<br />

Due <strong>to</strong> the complexity of financial systems, it <strong>is</strong> not feasible <strong>to</strong> replace all keys<br />

with 3<strong>DES</strong> keys right away, systems will have <strong>to</strong> live in a heterogeneous state.<br />

It <strong>is</strong> important however <strong>to</strong> analyze each situation and <strong>to</strong> consider how the system<br />

sat<strong>is</strong>fies the security properties wanted. Most certainly, until all keys are replaced<br />

with 3<strong>DES</strong> keys, the system will not achieve 2 112 security, but the system can be<br />

upgraded progressively so as <strong>to</strong> withstand more and more attacks. Security, as in<br />

th<strong>is</strong> case, <strong>is</strong> often an incremental process.<br />

4.2 The algorithm itself<br />

When using 3<strong>DES</strong> certain variants of modes of operations are available which are<br />

not for single <strong>DES</strong>. Some of these variants may seem attractive at first glance because<br />

of their performance gain properties, unfortunately they are not all secure.<br />

For example, for single <strong>DES</strong>, cipher-block chaining (CBC) <strong>is</strong> a good mode <strong>to</strong> use<br />

since it <strong>is</strong> provably secure [3]. However, there are different ways of implementing<br />

CBC mode for 3<strong>DES</strong>, one can use triple-outer-CBC mode (CBC mode applied directly<br />

<strong>to</strong> 3<strong>DES</strong>) or triple-inner-CBC mode (a variant, a multiple encryption mode<br />

of operation where the feedbacks are taken from the single <strong>DES</strong> operations of<br />

which 3<strong>DES</strong> <strong>is</strong> composed of). We do not describe these modes in further detail<br />

in th<strong>is</strong> document (see [10] if interested), it suffices <strong>to</strong> know that they are two variants<br />

of CBC for 3<strong>DES</strong>. Although triple-inner-CBC mode can appear <strong>to</strong> be more<br />

appealing since it can be pipelined, thus allowing for more efficient implementations,<br />

triple-inner-CBC mode <strong>is</strong> significantly weaker than outer-inner-CBC mode<br />

under certain attack models and <strong>is</strong> not recommended ([4]).<br />

When migrating from single <strong>DES</strong> <strong>to</strong> 3<strong>DES</strong> and designing a new system or<br />

looking for ex<strong>is</strong>ting solutions, it might also be fruitful <strong>to</strong> consider other encryption<br />

algorithms as well, such as the AES, which will become a U.S. government<br />

standard may 26th, 2002. If when migrating <strong>to</strong> 3<strong>DES</strong> you also make your system<br />

ready <strong>to</strong> accept other encryption algorithms or modes of operations, you will have<br />

an advantage and will save time and money in the long run. Flexibility <strong>is</strong> our<br />

friend here.<br />

c○Copyright Okiok Data 2002 5


4.3 Key blocks<br />

<strong>Why</strong> <strong>Migrating</strong> <strong>to</strong> <strong>Triple</strong> <strong>DES</strong> <strong>is</strong> <strong>Not</strong> <strong>Easy</strong><br />

Current key blocks 2 such as the key block for the keys encrypted in the payment<br />

application key databases, and the key blocks for the key exchange keys, are not<br />

adequate <strong>to</strong> support 3<strong>DES</strong>. Attacks have been presented ([7], [5]) against key<br />

blocks currently used by the financial institutions, in which keys can be used for<br />

functionalities that they where not intended for, and knowledge of certain working<br />

keys can leak knowledge of other keys, violating security property SP2. The<br />

attacks work even if the key blocks use encryption with a provably secure mode of<br />

operation such as CBC, even when used in combination with variants or control<br />

vec<strong>to</strong>rs 3 . The techniques of the attacks are based on substituting parts of the keys<br />

and brute forcing single <strong>DES</strong> keys twice. Th<strong>is</strong> can be done on average in 2×2 55 =<br />

2 56 steps, which <strong>is</strong> much smaller than 2 112 (the number of steps needed <strong>to</strong> try each<br />

and every double length 3<strong>DES</strong> key). Th<strong>is</strong> clearly violates security properties SP3<br />

and SP4. It <strong>is</strong> crucial <strong>to</strong> cryp<strong>to</strong>graphically tie the functionality of a key <strong>to</strong> the key<br />

itself, th<strong>is</strong> can be achieved by securely using a MAC or a digital signature scheme<br />

for example, or an encryption mode of operation that also provides integrity such<br />

as the one described in [8]. A proposal <strong>to</strong> ANSI X.9F for a new key block format<br />

<strong>is</strong> described in [5]. What <strong>is</strong> important <strong>to</strong> remember <strong>is</strong> that encryption alone does<br />

not provide integrity.<br />

4.4 Hardware update<br />

There are obvious problems if hardware, such as PIN pads, ATMs and cryp<strong>to</strong>graphic<br />

processors, cannot be upgraded in the field. Even if upgrades can be done<br />

in the field, migration has <strong>to</strong> be coordinated with other devices and software. If a<br />

PIN pad can only use single <strong>DES</strong> and a switch has been upgraded <strong>to</strong> use 3<strong>DES</strong>,<br />

the switch needs <strong>to</strong> be configured <strong>to</strong> be backwards compatible with single <strong>DES</strong>.<br />

Th<strong>is</strong> backwards compatibility feature could potentially be used <strong>to</strong> the advantage<br />

of an attacker (as was d<strong>is</strong>cussed in section 4.1).<br />

There <strong>is</strong> also a question of speed. 3<strong>DES</strong> encryption and decryption takes approximately<br />

three times longer <strong>to</strong> execute than does single <strong>DES</strong> encryption and<br />

2 a key block <strong>is</strong> a data structure for specifying the value and attributes of a key that <strong>is</strong> <strong>to</strong> be<br />

s<strong>to</strong>red or exchanged, key blocks for private keys usually use some sort of encryption.<br />

3 variants and control vec<strong>to</strong>rs are bitpatterns that are bound <strong>to</strong> encrypted keys by a XOR operation<br />

with the encrypting key. If a naive attacker introduces in<strong>to</strong> a cryp<strong>to</strong>processor a cryp<strong>to</strong>gram<br />

of a key bounded by a control vec<strong>to</strong>r or variant of the wrong type the cryp<strong>to</strong>processor’s decryption<br />

operation should simply produce garble and no useful information about the key would be<br />

revealed. Th<strong>is</strong> technique does not work when encrypting keys longer then the block size.<br />

c○Copyright Okiok Data 2002 6


<strong>Why</strong> <strong>Migrating</strong> <strong>to</strong> <strong>Triple</strong> <strong>DES</strong> <strong>is</strong> <strong>Not</strong> <strong>Easy</strong><br />

decryption 4 . Memory allocation and caching can also affect the speed of execution<br />

of 3<strong>DES</strong> encryption and decryption, especially during the key setup stages.<br />

Some cus<strong>to</strong>m designed cryp<strong>to</strong>processors also deal poorly with the safeguarding<br />

of 3<strong>DES</strong> keys in memory reg<strong>is</strong>ter, some key parts can get overwritten in their<br />

reg<strong>is</strong>ter slots by other 3<strong>DES</strong> key parts or single <strong>DES</strong> keys if allocation <strong>is</strong> not done<br />

correctly. Th<strong>is</strong> was observed in a PIN pad we once evaluated, the problem had<br />

<strong>to</strong> do more with the architecture of the hardware rather than 3<strong>DES</strong> itself however,<br />

mostly due <strong>to</strong> the fact that some embedded systems have limited s<strong>to</strong>rage space.<br />

The lesson <strong>to</strong> learn <strong>is</strong> that a cryp<strong>to</strong>processor can work perfectly well when it only<br />

does single <strong>DES</strong> but start showing strange behavior when using 3<strong>DES</strong>.<br />

4.5 Software/Firmware update<br />

Command sets will undoubtedly be modified if a system <strong>is</strong> <strong>to</strong> support 3<strong>DES</strong>. It<br />

<strong>is</strong> crucial <strong>to</strong> make certain that there will be no compatibility problems and that<br />

security <strong>is</strong> not affected. For example, one can have software running on a device<br />

which will accept <strong>to</strong> load new software after verifying a MAC. If the new software<br />

<strong>is</strong> needed <strong>to</strong> use 3<strong>DES</strong>, but the old software’s MAC <strong>is</strong> based on single <strong>DES</strong>, one<br />

needs <strong>to</strong> make sure that th<strong>is</strong> procedure <strong>is</strong> secure in the given context (for example,<br />

it <strong>is</strong> secure if you still trust single <strong>DES</strong>).<br />

It <strong>is</strong> highly recommended <strong>to</strong> analyze any new transaction set, <strong>to</strong> be convinced<br />

of th<strong>is</strong> one simply has <strong>to</strong> look at the recent API-level attacks on embedded systems<br />

described in [2].<br />

4.6 Payment application database<br />

We already talked about the need for a new key block in section 4.3. It <strong>is</strong> also<br />

important <strong>to</strong> consider the simple fact that 3<strong>DES</strong> keys are larger than single <strong>DES</strong><br />

keys and that the format of the key blocks will be different. One should make sure<br />

that databases will be able <strong>to</strong> handle th<strong>is</strong> change.<br />

4.7 Key Management<br />

Key management <strong>is</strong> probably one of the more complex parts of any cryp<strong>to</strong>system.<br />

New kinds of cryp<strong>to</strong>graphic keys means new kinds of key management. Key<br />

exchange methods (manual or au<strong>to</strong>mated) for 3<strong>DES</strong> will differ from those for<br />

4 if no pipelining <strong>is</strong> done.<br />

c○Copyright Okiok Data 2002 7


<strong>Why</strong> <strong>Migrating</strong> <strong>to</strong> <strong>Triple</strong> <strong>DES</strong> <strong>is</strong> <strong>Not</strong> <strong>Easy</strong><br />

single <strong>DES</strong>. For example, split knowledge schemes for 3<strong>DES</strong> are different than<br />

those for single <strong>DES</strong> and it <strong>is</strong> important <strong>to</strong> make sure that the new schemes that<br />

will be used continue <strong>to</strong> sat<strong>is</strong>fy the security requirements. When one splits a 3<strong>DES</strong><br />

key between two individuals, a typical scheme will produce four parts, K1L and<br />

K2L, which when XORed <strong>to</strong>gether forms KL (the first part of the 3<strong>DES</strong> key) as<br />

well as K1R and K2R which when XORed <strong>to</strong>gether forms KR (the other part of<br />

the 3<strong>DES</strong> key). Now, the scheme <strong>is</strong> secure if the first person <strong>is</strong> in cus<strong>to</strong>dy of K1L<br />

and K1R, and the second person <strong>is</strong> in cus<strong>to</strong>dy of K2L and K2R. Th<strong>is</strong> way, neither<br />

individual has any information what so ever about the 3<strong>DES</strong> key. However, if the<br />

first individual <strong>is</strong> in cus<strong>to</strong>dy of K1L and K2L, and the second of K1R and K2R,<br />

each individual learns information about the key (notably, one whole part of the<br />

key by XORing both of the individual’s parts <strong>to</strong>gether). If one of the individuals<br />

can have access <strong>to</strong> the encryption of a message under the key in question (most<br />

processors will have a command that will allow them <strong>to</strong> do so), they simply need<br />

<strong>to</strong> do the equivalent of a brute force attack on a single <strong>DES</strong> key <strong>to</strong> compute the<br />

whole 3<strong>DES</strong> key. Thus, there <strong>is</strong> not 2 112 security.<br />

Key generation <strong>is</strong> another important part of key management. It <strong>is</strong> important<br />

<strong>to</strong> securely generate random 3<strong>DES</strong> keys, poor randomness if often a weak point<br />

in a cryp<strong>to</strong>system, (see [6] for a motivational example.) For example, one should<br />

not generate a 3<strong>DES</strong> key by first generating a single <strong>DES</strong> key, defining it <strong>to</strong> be<br />

KL, and then using a known variant in order <strong>to</strong> generate KR from KL. Both part<br />

of the 3<strong>DES</strong> key should be generated independently and uniformly at random.<br />

4.8 Old vulnerabilities<br />

Most systems have vulnerabilities, see for example [1]. Some security vulnerabilities<br />

are known and they are considered acceptable in certain contexts. It all<br />

depends on the outcome of a r<strong>is</strong>k analys<strong>is</strong>, which <strong>is</strong> a very important step <strong>to</strong> take<br />

when migrating a system. It <strong>is</strong> important <strong>to</strong> fully study the r<strong>is</strong>ks that might ar<strong>is</strong>e<br />

and determine the best way <strong>to</strong> manage them, <strong>to</strong> accompl<strong>is</strong>h th<strong>is</strong> one needs <strong>to</strong> know<br />

the security properties that must be achieved and the security state of the system<br />

and evaluate the r<strong>is</strong>ks. R<strong>is</strong>k analys<strong>is</strong> should be done at every phase of the migration<br />

plan.<br />

When migrating <strong>to</strong> 3<strong>DES</strong>, with the goal of achieving 2 112 security, it <strong>is</strong> also<br />

important <strong>to</strong> reconsider old vulnerabilities. It might have been acceptable for a<br />

system <strong>to</strong> be vulnerable <strong>to</strong> a 2 56 brute force attack at the time of deployment<br />

and accreditation, but it <strong>is</strong> probably no longer acceptable. When you modify a<br />

system that has old vulnerabilities you also r<strong>is</strong>k the danger of creating new ones,<br />

c○Copyright Okiok Data 2002 8


<strong>Why</strong> <strong>Migrating</strong> <strong>to</strong> <strong>Triple</strong> <strong>DES</strong> <strong>is</strong> <strong>Not</strong> <strong>Easy</strong><br />

sometimes even worst ones. One should take time <strong>to</strong> analyze the problem, review<br />

the security properties that the system <strong>is</strong> <strong>to</strong> respect and make sure that the updated<br />

system does not introduce any new security loopholes. It <strong>is</strong> important <strong>to</strong> try <strong>to</strong><br />

solve old security problems and avoid new vulnerabilities.<br />

5 Easing the migration<br />

In th<strong>is</strong> section we give a l<strong>is</strong>t of checkpoints useful for easing a migration from<br />

single <strong>DES</strong> <strong>to</strong> 3<strong>DES</strong>. Th<strong>is</strong> <strong>is</strong> not intended <strong>to</strong> be an exhaustive l<strong>is</strong>t but simply a<br />

bases for reflection on planning the migration. The items are not presented in any<br />

particular order.<br />

1. Make sure that implementations of <strong>DES</strong> can be configured <strong>to</strong> use 3<strong>DES</strong>.<br />

As mentioned in section 4.4, just because an implementation states that it<br />

<strong>is</strong> 3<strong>DES</strong> compatible does not necessarily mean that it will work with ease.<br />

Before planning a migration <strong>to</strong> 3<strong>DES</strong>, make sure that the system <strong>is</strong> capable<br />

of using 3<strong>DES</strong>. Systems already deployed may require re-certifica<strong>to</strong>n/reaccreditation.<br />

2. Validate that the system sat<strong>is</strong>fies the new algorithm’s memory requirements.<br />

Double length 3<strong>DES</strong> keys are twice as long, and new block formats for encrypting<br />

3<strong>DES</strong> keys might have some extra overhead. One should verify that<br />

databases, processors, etc., can handle th<strong>is</strong> increase in data size.<br />

3. 3<strong>DES</strong> keys should not be protected using single <strong>DES</strong> keys. It <strong>is</strong> important<br />

<strong>to</strong> verify that <strong>DES</strong> does not become the weakest link in any segment of the<br />

system.<br />

4. Planning ahead. One should plan the hardware and software updates, so that<br />

everything <strong>is</strong> coordinated as necessary. Procedures need <strong>to</strong> be reviewed and<br />

most probably updated.<br />

5. If both single <strong>DES</strong> and 3<strong>DES</strong> are <strong>to</strong> be supported, it might be useful <strong>to</strong><br />

split the system in<strong>to</strong> two parts, one that securely uses 3<strong>DES</strong> and no single<br />

<strong>DES</strong> encryption and the other that continues <strong>to</strong> use single <strong>DES</strong>. For example,<br />

instead of having two cryp<strong>to</strong>processors configured <strong>to</strong> both use single<br />

<strong>DES</strong> and 3<strong>DES</strong>, have one cryp<strong>to</strong>processor simply use single <strong>DES</strong> and the<br />

other strictly use 3<strong>DES</strong>. Th<strong>is</strong> may require modifications <strong>to</strong> the transaction<br />

d<strong>is</strong>patcher in order for it <strong>to</strong> act differently depending on the end point. Th<strong>is</strong><br />

enables at least part of the system <strong>to</strong> attain 3<strong>DES</strong> security, instead of having<br />

c○Copyright Okiok Data 2002 9


<strong>Why</strong> <strong>Migrating</strong> <strong>to</strong> <strong>Triple</strong> <strong>DES</strong> <strong>is</strong> <strong>Not</strong> <strong>Easy</strong><br />

the whole system vulnerable <strong>to</strong> single <strong>DES</strong> because it <strong>is</strong> needed for backwards<br />

compatibility or other functionality that <strong>is</strong> not part of the migration<br />

plan.<br />

6. Sending managers on site in order <strong>to</strong> load new keys can be costly. It might<br />

be useful <strong>to</strong> try <strong>to</strong> synchronize on site hardware update with on site physical<br />

key loading.<br />

7. Certain cryp<strong>to</strong>graphic keys will no longer be used, evaluate the key hierarchy<br />

and decomm<strong>is</strong>sion obsolete keys. Managing keys <strong>is</strong> a challenging task,<br />

keeping unused keys around simply adds <strong>to</strong> the complexity.<br />

8. It might be useful <strong>to</strong> construct wrappers around ex<strong>is</strong>ting encryption technology,<br />

so that these can be changed and updated more conveniently (<strong>DES</strong> <strong>to</strong><br />

3<strong>DES</strong>, or <strong>DES</strong> <strong>to</strong> AES for example). One has <strong>to</strong> be careful however so as <strong>to</strong><br />

not give way <strong>to</strong> security weaknesses based on backward compatibility of the<br />

encryption technology.<br />

9. R<strong>is</strong>k Analys<strong>is</strong>. Th<strong>is</strong> <strong>is</strong> probably the most important part of the migration. As<br />

d<strong>is</strong>cussed in section 4.8, r<strong>is</strong>k analys<strong>is</strong> should be done at every phase of the<br />

migration plan.<br />

These are just a few suggestions and points <strong>to</strong> be considered. <strong>Migrating</strong> from<br />

single <strong>DES</strong> <strong>to</strong> 3<strong>DES</strong> <strong>is</strong> not easy, but careful planning and adequate analys<strong>is</strong> and<br />

support can ease the process.<br />

6 Conclusion<br />

The Data Encryption Standard (<strong>DES</strong>) has allowed financial institutions thru out<br />

the world <strong>to</strong> share au<strong>to</strong>mated self-service facilities while maintaining open competition<br />

on the market. Th<strong>is</strong> 1977 based cryp<strong>to</strong>graphic standard <strong>is</strong> no longer considered<br />

secure and the general approach (approved by NIST and the financial industry)<br />

<strong>is</strong> <strong>to</strong> replace <strong>DES</strong> by 3<strong>DES</strong> everywhere encryption <strong>is</strong> done. We have pointed<br />

out and d<strong>is</strong>cussed many <strong>is</strong>sues concerning migration <strong>to</strong> 3<strong>DES</strong>. Banks will need <strong>to</strong><br />

carefully review their own implementation <strong>to</strong> take in<strong>to</strong> account these concerns.<br />

c○Copyright Okiok Data 2002 10


References<br />

<strong>Why</strong> <strong>Migrating</strong> <strong>to</strong> <strong>Triple</strong> <strong>DES</strong> <strong>is</strong> <strong>Not</strong> <strong>Easy</strong><br />

[1] ANDERSON, R. <strong>Why</strong> cryp<strong>to</strong>systems fail, from communications of the ACM,<br />

november, 1994. In William Stallings, Practical Cryp<strong>to</strong>graphy for Data Internetworks,<br />

IEEE Computer Society Press, 1996. 1996.<br />

[2] ANDERSON, R., AND BOND, M. API level attacks on embedded systems.<br />

IEEE Computer 34 (Oc<strong>to</strong>ber 2001).<br />

[3] BELLARE, M., KILIAN, J., AND ROGAWAY, P. The security of the cipher<br />

block chaining message authentication code. JCSS: Journal of Computer<br />

and System Sciences 61 (2000).<br />

[4] BIHAM, E. Cryptanalys<strong>is</strong> of multiple modes of operation. In Proc. 4th<br />

International Advances in Cryp<strong>to</strong>logy Conference – ASIACRYPT ’94 (1994),<br />

pp. 278–292.<br />

[5] COMPAQ COMPUTER CORPORATION. A proposal <strong>to</strong> ANSI X.9F for a new,<br />

standard key block <strong>to</strong> enable secure s<strong>to</strong>rage, transm<strong>is</strong>sion and control of<br />

cryp<strong>to</strong>graphic keys, 2002.<br />

[6] GOLDBERG, I., AND WAGNER, D. Randomness and the Netscape browser.<br />

Dr. Dobb’s Journal of Software Tools 21, 1 (Jan. 1996), 66, 68–70.<br />

[7] HOPKINS, D. Private Communication (2001).<br />

[8] JUTLA, C. S. Encryption modes with almost free message integrity.<br />

In Advances in Cryp<strong>to</strong>logy – EUROCRYPT ’ 2001 (Innsbruck, Austria,<br />

2001), B. Pfitzmann, Ed., vol. 2045 of Lecture <strong>Not</strong>es in Computer Science,<br />

Springer-Verlag, Berlin Germany, pp. 525–542.<br />

[9] M. BOND, R. C. Extracting a 3des key from an ibm 4758.<br />

http://www.cl.cam.ac.uk/ rnc1/descrack/.<br />

[10] MENEZES, A. J. A. J., VAN OORSCHOT, P. C., AND VANSTONE, S. A.<br />

Handbook of applied cryp<strong>to</strong>graphy. The CRC Press series on d<strong>is</strong>crete mathematics<br />

and its applications. CRC Press, 2000 N.W. Corporate Blvd., Boca<br />

Ra<strong>to</strong>n, FL 33431-9868, USA, 1997.<br />

c○Copyright Okiok Data 2002 11


About Okiok Data<br />

<strong>Why</strong> <strong>Migrating</strong> <strong>to</strong> <strong>Triple</strong> <strong>DES</strong> <strong>is</strong> <strong>Not</strong> <strong>Easy</strong><br />

OKIOK DATA has been at the forefront of the Information Security field since<br />

1983. The new business models born from the use of IT have brought about a<br />

number of new business r<strong>is</strong>ks. Counting on its many years of experience in IT<br />

security, OKIOK DATA proposes a set of services that will help you manage<br />

these r<strong>is</strong>ks in a manner that <strong>is</strong> appropriate for your business: Analys<strong>is</strong> of your<br />

requirements, your systems architecture, and the threats linked <strong>to</strong> your business<br />

activities. Diagnostics on the security level of your systems and identification of<br />

the areas of weaknesses. Product compar<strong>is</strong>ons and recommendations on security<br />

measures and products that will help control your r<strong>is</strong>ks. Whether you w<strong>is</strong>h <strong>to</strong> add<br />

specific security expert<strong>is</strong>e in a timely fashion, or <strong>to</strong> simply complement your team<br />

of security professionals, OKIOK DATA’s experts can get involved at any stage<br />

of your projects, including at the corporate strategic level. Our clients come from,<br />

amongst others, the financial world, telecommunications, health and governments.<br />

3945 St-Martin West<br />

Laval (Quebec)<br />

Canada, H7T 1B7<br />

Phone: (450) 681-1681<br />

Fax: (450) 681-1682<br />

www.okiok.com<br />

c○Copyright Okiok Data 2002 12

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!