ebook img

Practical cryptography PDF

410 Pages·2003·63.57 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Practical cryptography

島 一 国 虹 一 ■ 只 户 冒 ~ 一 一 只 0 只 P 丫 C 丫 G A 臼 れ 肉 A じ 了 - 門 、 材 轴 丫 八 川 @ 內 P 姑 ー n ザ リ 恤 瞬 H す 丁 ⽹网 · イ : 自 川 り 医 電 腭 了 ⽹网 リ $ - : 料 ⽍歹 a . ĝÈ § Ë · Æ B R U C E S C H N E I E R N I E L S F E R G U S O N F b q ı S » cm t l v e P u b li s h e r R { »b e r t I p e e n E x e c u t i v e E d i t o r C a r o l A . L o n g E d l t o r l a l Ma n a s e r K a t y n A . M a l n ı M a n a l n E d it o r l ik e d B e r n a r d i g s T his b o o k i8 r in t e d o n a c i & e e p a p e r . p C o p y r igh t © 2003 by N ie ıs Pe r g u a o n a n d B r u c e S c hn e ie r . A l l r i gh t s r e e e r v e d . p u bıis h e d by W ile y P u b ıis hin g , I n c . , I ı ı di a n a p o liß , I n dia ı ı a P u b l is he i s i m u lt a n e o u s u in C a n a d a N o p a r t o f t h is p u b lic a t io n m a y be r e p r o d u c e d , s to r e d in a r e t r ie v a l ey et e m , o r tr a n s ı ı ı i t te d in a ı w fo r m o r by a n y m e a n s , e le c t r o n i c , m e c h a n ic a ı , p h o t o c o p y in g , r e c o r din g , s ca n n iı ı g , o r o t he r w is e , e x c e p t a a p e r m i t t e d u n d e r Se c t io n 1 07 o r 1 08 o f t h e 1 976 U n i t e d St a t e s C o p y r is ht A c t , w it h o u t e it h e r t he p ń o r w t i t t e n p e r m ia a io n o f t h e P u blis he r , o r a u t h n r i z a l, in n t hr o u gh p ew n e n t o f t h e a p p r o p ń a te p e r - c o p y fe e t o t h e C o p y r i g h t C le a r a n c e C e n t e r , I n c . , 222 R Jo e e w o o d D ń v e , D a n v e i B , M A 01 923 , (978) 750- 8400, i a x (978) 750-44 70. R e q u e s t e t o t he P u b lis h e r fo r p e r m is e io n eh o u l d be a d dr e s s e d t o t he Le g a l D ep a r tm e n t , W ile y P u b lis hi ı ı g , I n c . , 1 0475 C r o e a p o in t B lv d . , I n d i a n a p o lis , IN 46256 , (3 1 7 ) 5 72- 344 7, fa x (3 1 7 ) 5 72- 444 7 , D m R ì 1 p e r m c o o r d i n a t o r e w i l e y . c o m . r , im it o f L i a b ility / D ia c 뇨山n e r o f W ar r a n t y W n ile t h e p u bljs h e r a n d a u t h o r h a v e u s e d t h e ir be s t e a o r ts in r e a r in t h ie b o o k t h e ı n a k e n o r e p r e s e n t a t io n s o r w a r r a n t i s w i t h p p g , y r e s e c t t o t h e a c c u r a c y o r c o m le t e n e s s o f t h e c o n t e n t e o f t h is b o o k a n d ßp e c ffic a ]1y p p tlis c 】a im a n y im p lie d w a ar a n t ie s o f m e r c ha n t a bility o r fit n « w fn, a p a r t i c u l a r p u r p o s e . N o w a m n t y m a y b e c r e a t e d o r e x t e n de d b y s a l e s r e p r e s e n t a t i v e s o r m i t t e n s a Je s m a t e r ia Js . T he a dv ic e a n d s t r a t e g ie s c o n t a i n e d 】ı e r e i n m a y n o t b e s u it a ble fo r y o u r s it u a t io n . Y o u s ho u l d c o n s u l t w i t h a p r o fe a io n a l w he r e a p p r o p ń a t e . N e i t he r t h e p u b lis h e r n o r a u t ho r R 1 1 b e li a b le fo r a n y lo os o f p r o fit o r a n y o t he r c o m m e r c ia l da m a ge a , in c lu d in g b u t n o t 山 田 t e d t o s p e c i a l , in c id e n t a l , c o n s e q u e n t ia ı , o r o t h e r d a m a g e s . Fb r g e n e r a l in tbr m a t in n o n o u r o t he r p r o d u c t s a n d s e r v ic e s p le a s e c o n t m t o u r C u s t o m e r C a r e D e a r t m e n t w it h in t he U n it e d S t a t e s a t (800) 762- 2974 o u t s id e t h e U n i t e d S t a t e s a t p . , (3 1 7 ) 5 72 3993 f (3 1 7 ) 5 72 4002 - o r a x . . n a d e m a r ı¢s W ile t h e W ile P u blja h in g lo o a n d r e la t e d t r a de d r e s s a r e t r a ı le m a r ks o r y y g , r e g is t e r e d M a d e m a r ks o f W ile y P u b lis hin g , I n c . , in t he U n i t e d S t a t e s a n d o t he r c o u n t r ie s , a n d n ıa n o t b e u s e d w i t h o u t w r i t te n e r m is s io n A ll o t he r t r a d e ma r 】 a r e t he r o \ r t y y p . p o f t h e ir r e s p e c t i v e o w n e r s . W ile y P u b lis hin g , I n c . i8 n o t a s s o c ia t e d w it h a n y p r o d u c t o r , Ņ c n d o r n 】dm t io n e d in t h is bo o k . W il ey a ls o p u blis he s its b o o k s in a v a r i e ty o f e le c t r o n ic fo r m a t s . S o m e c o n t e n t t ha t a p p e a r s in p r in t m a y n o t b e a v a ila ble in e le c t r o n ic b o o k s . I S B N 0-47 1 2 2 8 X (C ) - I S B N 0-47 1 223 5 7 3 (P ) - - Fr iı r t e d in t he U n i S t a t e s o f A m e r ic a 1 0 9 8 7 6 5 4 3 2 C t t o n e n s P f r e a c e i i x v H o w t o R Je a d t h i s B o o k x ix O w D e 吕 l 8 n P h l l o 8 o h y 1 p 1 1 T h E i l f P f n . e v s o e r o m ı a n c e & . . . . 1 2 T h e E v il s o f F e a t u r e s 5 . T h e C o n t e x t o f C r y p t o g r a p h y 7 2 . 1 T h e R Jo le o f C r y p t o g r a p hy 8 2 2 T h e W e a k e s t L in k P r o e r t 9 . p y . . . . . . 2 3 T h e A d v e r s a r ia l S e t t i n g 1 1 . . . . . 2 4 1 A t t a c k 1 3 . . 2 5 T b r m t M o d e l 1 5 . 2 . 6 C r y p t o g r a p hy I s N o t t h e S o lu t i o n 1 7 2 . 7 C r y p t o g a p by I s V e r y D ißñc u l t 1 8 2 . 8 C r y p t o g r a p hy I s t h e E a s y P a r t . . . . . . . 1 9 2 . 9 B a c k g r o u n d R e a d ir ı g . 20 3 h t r o d u c t i o n t o C r y p t o g r a p h y 2 1 3 1 1 K e r c k h o æ ' P r in c ip le 23 . . 3 2 A u t h e n t ic a t io n 23 . . 3 . 3 P u b li c - K e y E n c r y p t i o n 26 3 4 D ig it a l S iw a t u r e s 2 8 . 3 5 P K I 29 . . . V C v i o n t e n t e O l 3 6 1 C i p h e r t e x t - n y . . . EĮ I . . 3 6 2 K n o w n P la in t e x t 31 . . . . . . 3 6 3 C h o s e n P la in t e ) ct . . 3 6 4 C h o s e n C ip h e r t e x t . . . . . 3 6 5 D is t in g u is w A t t a c k s 33 . . 3 6 6 B ir t h d 的 . . 3 6 7 M e e t in t h e M id d le 34 . . 3 6 8 0 t h e r m e s o f A tt a c k 脆 . . S e c u ń t y ı ıe v e l 弱 P f 37 e r o r m a n c e F n m n l n v i b r 羽 \ J L Pł ł ł P ł W U ı łJ · · · · · · · · I M S i t 4 1 e s s a g e e c u r y 4 B l k C i h 4 3 o c p e r s 4 1 W n a t I s a B lo c k C i p h e r T 43 . 4 2 W o f A t t 44 . 4 3 T h e I d e a l B lo c k C i p h e r 妫 . 4 4 D e t i o n o f B lo c k C i p h e r S e c u r i t y 妫 . 4 4 1 P a r it y o f a P e r m u t a t i o n 49 . . . . 4 5 R Je a l B lo c k C ip h e r s 闐 . 陜 D E S 一 . 聞 A E S 58 S e r e n t p . . . 59 T fi h w o s . O t h e r A E S F i n a li s t s 6 1 . . . . E lq u a t i o n - S o lv i n g A t t a c k s . 园 囲 W n i c h B lo c k C i p h e r S h o u ld I C h o o s e ? W n a t K e S iz e S h o u ld I U s e ? 聞 y 6 7 5 B ı o c k C i p h e r M o d e s 68 5 1 P ddi a n . g . . . 69 5 2 E C B . . . 7 0 5 3 C B C . 7 0 5 3 1 F i d r v x e . . . . . . C o n m M i i v 5 4 0 F B T3 . 5 5 C T R 7 5 . 5 . 7 W n i c h M o d e S ho u ld I U s e ? 7 7 . . . . . . 5 . 8 I n fo r m a t io n ı łe a k a ge 79 . . . . . . . . 5 . 8. 1 C h a n c e s o f a C o llis io n 80 . . . . 5 . 8. 2 H o w to D e a l W it h ı re a lca g e . 8 1 5 . 8. 3 A b o u t O u r M a t h 82 6 H a s h ħ ı n c t io n s 6 . 1 S e c u r ity o f H a s h Eh n c t io n ß 6 2 R l H h c t i o n s Je a a s . . . . . 6 2 ı M D 5 . . 6 2 2 S H A 1 . . - 6 2 3 S H A 25 6 S H A 384 d S H A 5 1 2 . . - , - , a n - 6 3 W e a Jm e s s e s o f H a s h ħ ı n c t io n s . 6 3 1 L e n g t h E x t e n s io n s . . . . . . 6 3 2 P a r t i a l - M e s s a g e C o llis io n . . . . . . . 6 4 F ix in g t h e W ė a k r ı e s s e s . . . 6 4 2 A M o r e E flñc ie n t F ix . . 6 5 W Di c h H a s h Fh n c t i o n S h o u l d I C h o o s e ? . . 6 6 Æ t ı ı r e W o r k . M e s s a g e A u t h e n t i c a t io n C o d e s 9 7 7 1 W tı a t a M A C D o e s 97 . 7 2 T h e I d e a t M A C 98 . 7 3 M A C S e c u r ity 9 8 . 7 4 C B G M A C 99 . 7 5 H M A C 1 01 . . . . 7 6 U M A C 1 04 . 7 6 1 S i f M A C 1 04 z e o . . . . . . . 7 6 2 W n i c h U M A C ? 1 05 . . . 7 6 3 P la t fo r n ı Fl bi l i t y 1 06 . . . . . . C t o n e n t e ii i v 1 06 7 6 4 A m o rı n t o f / l n a l y s is . . . 1 07 7 6 5 W n y M e n t io n U M A C a t A ll ? . . . 1 07 7 7 W h i c lı M A C t o C h o o s e ? . 1 08 M A C . 7 8 U s in g a . . 1 1 1 C h l S a m ı e e e e m 1 1 1 P r o b le m S t a t e m e n t 1 1 1 8 1 1 R to le s . . 1 1 2 . . 1 1 3 8 1 3 M e s s a g e s o r S t r e a m . . 1 1 3 8 ı 4 S e c tı r ity P r o p e r t ie s . . 1 1 5 O r d e r o f A u t h e n t ic a t io n a i ı d E n c r y p t i o n 1 1 7 . O li u t n e 1 1 7 8 3 1 M e s s a g e N u n ı b e r s . . 1 1 9 8 3 2 A u t h e n t i c a t i o n . . . . 1 1 9 8 3 3 E n c r p t i o n y . . . . 1 2 0 8 3 4 F ya m e F o r m a t . . 1 2 0 8 4 D e t a i ls . 1 2 1 8 4 1 I n i t i a li z a ti o n . . . . 1 22 8 4 2 S e n d i n g a M e s s a g e . . . . 1 2 3 8 4 3 R e c e iv i n g a M e s s a g e . . . 1 2 5 O d 8 4 4 M e s s a g e r e r . . . . . 1 2 6 8 5 Al t er nat i ves . 1 2 7 8 6 C o n c lu s io n . 1 2 9 I m p l e m e n t a t i o n I s s u e s (I ) 1 3 1 9 1 C r e a t in g C o r r e c t P r o g r a m s . 1 3 1 9 1 1 Speci f i cati ons . . 1 3 2 9 1 2 T e s t a n d F ix . . 1 3 3 9 1 3 L a x A t t i t u d e . . . 1 34 9 1 4 S o H o w D o W e P r o c e e d ? . . 1 3 5 9 2 C r e a t in g S e c u r e S o f tw a r e . 1 3 6 9 3 K e e in S e c r e t s . p g 1 3 6 9 3 1 W i p in g S t a t e . . . . . . . . 1 3 8 9 3 2 S w a F ile . . p . . . . 1 40 9 3 3 C h a c e s . . 1 4 1 9 . 3 . 4 D a t a t , e n t, io n b y M e m o r y . . C o n t e n t s ix 9 3 6 A c c e s s bj r O t h e r s 1 43 . . . . . . . . 9 3 7 W n a t t o D o 1 45 . . . . . . . . q u a li ty o f C o d e 1 46 . . . . . . . 9 . 4 . 1 S h n p li c ity . . . . . . . 1 46 9 4 3 A s s e r t io n s 1 48 . . . . . . . . S id æ c h a ı ı n e l A t t a c l«s 1 5 0 . . . . . C o n c h ı s io n 1 5 2 . . . . . I I K e y N e g o t i a t io n 1 5 3 1 0 G e n e r a t i n R a n d o m n e s 8 1 5 5 s 1 0. 1 . 1 P r o ble n H W it h U s i n g R Je a l R a n d o m D a t a . . . . . . . 1 5 8 1 0 1 2 P s e u d o r a n d o m D a t a 1 5 8 . . . . . . . . . . . 1 0 1 3 R Je a l d o m D a t a a n d P R N G s 1 5 9 . . . . . . . . . A t t a c k M o d e ls fo r a P R N G 1 60 . . . . 1 0 4 4 G e n e r a t e d o m D a t a 1 66 . . . . . . . . . . . 1 0 5 A c c u m u l a t o r 1 67 . . . . 1 0 5 1 E n t r o S o u r c e s 1 68 . . p y . . 1 0 5 3 I m le m e n t a t io n C o n s id e r a t io n s 1 7 1 . . p . . . . . . . . . . . . . 1 0 5 5 G e t t in g d o n ı D a t a 1 7 4 . . . . . . . . 1 0 5 6 A d d a n E v e n t 1 7 6 . . . . . . . . 1 0 6 S e e d F il e M a r ı a e m e n t 1 7 7 . g . . . . . 1 0 6 1 W ri t e S e e d F il e 1 78 . . X C o n t e s 1 0 6 2 U p d a t e S e e d F ile 1 7 8 . . 1 0 6 3 W n e n t o R e a d a i ı d W r it e t h e S e e d F i l e 1 7 9 . . . . . . . 1 0. 6 . 4 B a c k u p s · · · · 1 7 9 1 0. 6 . 5 A bo m i c ity o f F il e S y s t e n ı U p d a t e s . . . . . . . . 1 80 1 0 6 6 F i B 1 81 r s t o o t . . . 1 0 7 S o W n a t S h o u ld I D o ? 1 82 . 1 0 8 C h o o s in g R Àu ı d o m E le m e n t s 1 82 . 1 1 P r i n ı e s 1 8 5 1 1 1 D iv is ib ili ty a n d P r im e s 1 86 . 1 1 2 G i S ll P i 1 88 e n e r a t n g m a r m e s . 1 1 3 C i M d l P i 1 90 o m u t a t o n s o u o a r m e . p . 1 1 3 1 A d d it i o n a ı ı d S u b t r a c t io n 1 9 1 . . . 1 1 3 2 M l t i li i 1 92 u p c a t o n . . ı 1 3 3 G r o u p s a n d F i n i t e F ie lds 1 92 . . 1 1 3 4 T h e G C D A 1g o r i t h m · · 1 94 . . 1 1 3 5 T h e E x t e n d e d E u c lid e a ı ı A lg o r it h m 1 95 . . 1 1 3 6 W o r k in M o d u lo 2 1 97 . . g . . . . . 1 1 . 4 . 1 P r i m a li t y T e s t in g . . . 200 1 1 4 2 E v a l u a t i n P o w e r s 204 . . g . . . . . . . . . 1 2 D i æ H e l l m a n 2 0 7 1 2 1 G r o u s 208 . p . . 1 2 2 B a s i c D H 2 1 0 . . 1 2 3 M a n in t h e M i d d l e 2 1 1 . . . . . . . . . . 1 2 4 P it fa u s 2 1 2 . . . 1 2 5 S a fe P r im e s 2 1 4 . . . . , 1 2 6 U i S ll S b s n g a m a e r u g r o u p 2 1 5 . . . 1 2 . 9 W Da t C o u ld G o W r o n g 220 . . . . . . . . . . 1 3 R S A 2 2 3 1 3 1 I n t r o d u c t io n . 2 23 . . . 1 3 . 2 T h e C h i n e e e Rma i n de r T h e o r e ı n 224 . 1 3 2 1 Ga r ne r ' F b l . . 8 r m u a 2 25 C o n t e n t s i x 1 3 2 2 G l i i e n e r a z a t o n s . . 1 3 3 U 吕日吕 . , 。 . . . . . . . . . . . . . 1 3 . 3 M u l t ip li c a t io n M o d u l o n 1 3 . 4 . 1 D igi t a l S iw a t rı r e s w i t h R S A 1 3 4 2 P b li E u c x ) o n e n t s . . 1 3 4 3 T h P ń K . . e v a t e e y . . . . . . . 1 3 . 4 . 5 G e n e r a t in g R S A K e y s . . . . 1 3 6 P it fa l ls U s in R S A . g . . . . . . . . . 1 3 6 E n c r y p t io n . 1 3 7 S i g a a t 1ı r e s . 1 4 I n t r o d u c t i o n t o C r y p t o g r a p h i c P r o t o c o ls 2 4 5 1 4 1 R to le s 2 45 . . . . . . 1 4 3 h c e n t i v e 2 48 . . . . . . . 1 4 4 m s t i n C r t o g a h i c P r o t o c o ls 2 5 1 . y p p . . . 1 4 . 5 M e s s a g e s m d S t e p s . . . 2 5 1 1 4 5 1 T h e ħ a n s o r t L a e r 2 5 2 . . p y . . . . 1 4 . 5 . 2 P r o t o c o l m d M e s s a g e I d e n t ity . . . . . . . . . . . . 2 5 3 1 4 5 3 M e s s a e E n c o d i n a n d P a r s in g 2 5 4 . . g g . . . . . . 1 4 5 4 P r o t o c o l e c u t io n S t a t e s 2 5 5 . . . . . . . . . . 1 4 5 6 p l a y m d t r i e s 25 7 . . . . . . . . . 1 5 K e N e o t i a t i o n P r o t o c o l 2 6 1 y s 1 5 2 A F ir s t T r 262 . y . . . . 1 5 4 A n A u t h e n t i c a t io n C o n v e n t io n 265 . . . . . . . . 1 5 5 A S e c o n d A t t e n ı t 265 . p . . . 1 5 6 A T h ir d A t t e n ı t 267 . p 1 5 7 0 l ı r F in a l P r o t o c o l 268 . . . . . . 1 5 8 D iE e r e n t V ie w s o f t h e P r o t o c o l 27 1 . . . . . . . . . . . . C i i o n t e n t s x 1 5 8 1 A l i c e ' s V ie w . ' ' ' ' ' ' ' 27 1 . . ' V i 272 1 5 8 3 At t ai cl ær s e w . ' ' ' ' ' ' . . i 273 1 5 8 4 K e y C o m p r o m s e . . . . 1 5 9 C o n ı p u t a t io n a l C o m p l e x i t y o f t h e P r o t o c o l . . 2 74 . 275 1 5 9 1 0 p t in ı iz a t i o n n ic k s . . . . . . . . 2 76 1 5 1 0 P r o t o c o l C o m p le x i t y . . . ' ' ' ' ' ' . 2 77 1 5 1 1 A G e n t l e W a r n i n g ' ' ' ' ' ' . 27 7 1 5 1 2 K e N e g o t i a t i o n ħ o m a P a s s w o r d . . . . . . y . 1 6 in n p l e m e n t a t i o n I s s u e s (I I ) 1 6 1 L alT g e I n t e g e r A ń t h Jta e t ic . 1 6 1 1 W o o p i n g . . 1 6 1 2 C h e c k i n g D H C o n ı p u t a t io n s . . 1 6 1 3 C h e c k i n g R S A E n c r y p t io n . . 1 6 1 4 C h e c k i n g R S A S iw a t u r e s . . . . . . 1 6 1 5 C o n c h ı s io n . . 1 6 2 F t e r M u lt i p li c a t i o n . 1 6 3 S i d æ c h m e l A t t a c k s . 1 6 3 1 C o u n t e r m e a s ı ı r e s . . l 1 6 4 P r o t o c o s . 1 6 4 1 p r o t o c o ls O v e r a S e c u r e C h m e l . . 1 6 4 2 R e c e iv i n g a M e s s a g e . . . 1 6 4 3 T im e o u t s . . . 2 9 5 t I I I K e y M a n a g e m e n 2 9 7 1 7 T h e C l o c k 297 . . . . . . 1 7 1 U s e s fo r a C lo c k 297 . . . . . . . 1 7 1 1 E x p i r a t i o n 298 . . . . V l 1 7 1 2 U n i q u e a u e . 298 . . . . . . . . 1 7 1 3 M o n o t o n i c it y . 299 . . 1 7 . 2 U s in g t h e R Je a ıl- T im e C lo c k C h i p 300 . . 1 7 . 3 S e c u r i t y D u ı g e r s . 300 1 7 3 1 S e t t in g t h e C lo c k B a r k . . . ' ' ' . .

Description:
This book is about cryptography as it is used in real-world systems, about cryptography as an engineering discipline rather than cryptography as a mathematical science. Building real-world cryptographic systems is vastly different from the abstract world of most books on cryptography, which discuss
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.