elliptic curve digital signature algorithm
TRANSCRIPT
-
7/30/2019 Elliptic Curve Digital Signature Algorithm
1/55
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A )
1 2
D o n J o h n s o n
C e r t i c o m R e s e a r c h
d j o h n s o n @ c e r t i c o m . c o m
A l f r e d M e n e z e s
U n i v e r s i t y o f W a t e r l o o
a j m e n e z e @ u w a t e r l o o . c a
A u g u s t 2 3 , 1 9 9 9
U p d a t e d : F e b r u a r y 2 4 , 2 0 0 0
1
T e c h n i c a l R e p o r t C O R R 9 9 - 3 4 , D e p t . o f C & O , U n i v e r s i t y o f W a t e r l o o , C a n a d a . A l s o a v a i l a b l e f r o m
h t t p : / / w w w . c a c r . m a t h . u w a t e r l o o . c a
2
c
D o n J o h n s o n a n d A l f r e d M e n e z e s . A l l r i g h t s r e s e r v e d .
-
7/30/2019 Elliptic Curve Digital Signature Algorithm
2/55
A b s t r a c t
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A ) i s t h e e l l i p t i c c u r v e a n a l o g u e o f t h e D i g i -
t a l S i g n a t u r e A l g o r i t h m ( D S A ) . I t w a s a c c e p t e d i n 1 9 9 9 a s a n A N S I s t a n d a r d , a n d w a s a c c e p t e d i n
2 0 0 0 a s I E E E a n d N I S T s t a n d a r d s . I t w a s a l s o a c c e p t e d i n 1 9 9 8 a s a n I S O s t a n d a r d , a n d i s u n d e r
c o n s i d e r a t i o n f o r i n c l u s i o n i n s o m e o t h e r I S O s t a n d a r d s . U n l i k e t h e o r d i n a r y d i s c r e t e l o g a r i t h m
p r o b l e m a n d t h e i n t e g e r f a c t o r i z a t i o n p r o b l e m , n o s u b e x p o n e n t i a l - t i m e a l g o r i t h m i s k n o w n f o r t h e
e l l i p t i c c u r v e d i s c r e t e l o g a r i t h m p r o b l e m . F o r t h i s r e a s o n , t h e s t r e n g t h - p e r - k e y - b i t i s s u b s t a n t i a l l y
g r e a t e r i n a n a l g o r i t h m t h a t u s e s e l l i p t i c c u r v e s . T h i s p a p e r d e s c r i b e s t h e A N S I X 9 . 6 2 E C D S A ,
a n d d i s c u s s e s r e l a t e d s e c u r i t y , i m p l e m e n t a t i o n , a n d i n t e r o p e r a b i l i t y i s s u e s .
K e y w o r d s : S i g n a t u r e s c h e m e s , e l l i p t i c c u r v e c r y p t o g r a p h y , D S A , E C D S A .
-
7/30/2019 Elliptic Curve Digital Signature Algorithm
3/55
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A ) 1
C o n t e n t s
1 I n t r o d u c t i o n 3
2 D i g i t a l S i g n a t u r e S c h e m e s 3
2 . 1 B a c k g r o u n d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 . 2 T h e D i g i t a l S i g n a t u r e A l g o r i t h m ( D S A ) . . . . . . . . . . . . . . . . . . . . . . . . . 4
3 F i n i t e F i e l d s 6
3 . 1 T h e F i n i t e F i e l d F
p
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3 . 2 T h e F i n i t e F i e l d F
2
m
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3 . 2 . 1 P o l y n o m i a l B a s i s R e p r e s e n t a t i o n s . . . . . . . . . . . . . . . . . . . . . . . . 7
3 . 2 . 2 N o r m a l B a s i s R e p r e s e n t a t i o n s . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4 E l l i p t i c C u r v e s O v e r F i n i t e F i e l d s 1 1
4 . 1 E l l i p t i c C u r v e s O v e r F
p
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1
4 . 2 E l l i p t i c C u r v e s O v e r F
2
m
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 4
4 . 3 B a s i c F a c t s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 5
5 E C D S A D o m a i n P a r a m e t e r s 1 6
5 . 1 D o m a i n P a r a m e t e r s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 6
5 . 2 G e n e r a t i n g a n E l l i p t i c C u r v e V e r i a b l y a t R a n d o m . . . . . . . . . . . . . . . . . . . 1 7
5 . 2 . 1 T h e C a s e q = p . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 7
5 . 2 . 2 T h e C a s e q = 2
m
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 9
5 . 3 D o m a i n P a r a m e t e r G e n e r a t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 0
5 . 4 D o m a i n P a r a m e t e r V a l i d a t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1
6 E C D S A K e y P a i r s 2 3
6 . 1 K e y P a i r G e n e r a t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 3
6 . 2 P u b l i c K e y V a l i d a t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 3
6 . 3 P r o o f o f P o s s e s s i o n o f a P r i v a t e K e y . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 4
7 E C D S A S i g n a t u r e G e n e r a t i o n a n d V e r i c a t i o n 2 4
8 S e c u r i t y C o n s i d e r a t i o n s 2 6
8 . 1 T h e E l l i p t i c C u r v e D i s c r e t e L o g a r i t h m P r o b l e m . . . . . . . . . . . . . . . . . . . . . 2 6
8 . 1 . 1 K n o w n A t t a c k s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 6
8 . 1 . 2 E x p e r i m e n t a l R e s u l t s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 9
8 . 1 . 3 H a r d w a r e A t t a c k s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 0
8 . 2 A t t a c k s o n t h e H a s h F u n c t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 0
8 . 3 O t h e r A t t a c k s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1
9 I m p l e m e n t a t i o n C o n s i d e r a t i o n s 3 2
-
7/30/2019 Elliptic Curve Digital Signature Algorithm
4/55
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A ) 2
1 0 I n t e r o p e r a b i l i t y C o n s i d e r a t i o n s 3 3
1 0 . 1 E C D S A S t a n d a r d s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 4
1 0 . 2 N I S T R e c o m m e n d e d C u r v e s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 6
1 0 . 2 . 1 R a n d o m E l l i p t i c C u r v e s O v e r F
p
. . . . . . . . . . . . . . . . . . . . . . . . . 3 7
1 0 . 2 . 2 K o b l i t z E l l i p t i c C u r v e s O v e r F
2
m
. . . . . . . . . . . . . . . . . . . . . . . . . 3 9
1 0 . 2 . 3 R a n d o m E l l i p t i c C u r v e s O v e r F
2
m
. . . . . . . . . . . . . . . . . . . . . . . . 4 2
1 0 . 2 . 4 C o n v e r t i n g B e t w e e n P o l y n o m i a l a n d N o r m a l B a s i s R e p r e s e n t a t i o n s . . . . . . 4 5
1 1 C o n c l u s i o n s 4 6
R e f e r e n c e s 4 6
-
7/30/2019 Elliptic Curve Digital Signature Algorithm
5/55
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A ) 3
1 I n t r o d u c t i o n
T h e D i g i t a l S i g n a t u r e A l g o r i t h m ( D S A ) w a s s p e c i e d i n a U . S . G o v e r n m e n t F e d e r a l I n f o r m a t i o n
P r o c e s s i n g S t a n d a r d ( F I P S ) c a l l e d t h e D i g i t a l S i g n a t u r e S t a n d a r d ( D S S 6 0 ] ) . I t s s e c u r i t y i s b a s e d
o n t h e c o m p u t a t i o n a l i n t r a c t a b i l i t y o f t h e d i s c r e t e l o g a r i t h m p r o b l e m ( D L P ) i n p r i m e - o r d e r s u b -
g r o u p s o f Z
p
E l l i p t i c c u r v e c r y p t o s y s t e m s ( E C C ) w e r e i n v e n t e d b y N e a l K o b l i t z 4 0 ] a n d V i c t o r M i l l e r 5 7 ]
i n 1 9 8 5 . T h e y c a n b e v i e w e d a s e l l i p t i c c u r v e a n a l o g u e s o f t h e o l d e r d i s c r e t e l o g a r i t h m ( D L )
c r y p t o s y s t e m s i n w h i c h t h e s u b g r o u p o f Z
p
i s r e p l a c e d b y t h e g r o u p o f p o i n t s o n a n e l l i p t i c c u r v e
o v e r a n i t e e l d . T h e m a t h e m a t i c a l b a s i s f o r t h e s e c u r i t y o f e l l i p t i c c u r v e c r y p t o s y s t e m s i s t h e
c o m p u t a t i o n a l i n t r a c t a b i l i t y o f t h e e l l i p t i c c u r v e d i s c r e t e l o g a r i t h m p r o b l e m ( E C D L P ) .
S i n c e t h e E C D L P a p p e a r s t o b e s i g n i c a n t l y h a r d e r t h a n t h e D L P , t h e s t r e n g t h - p e r - k e y - b i t
i s s u b s t a n t i a l l y g r e a t e r i n e l l i p t i c c u r v e s y s t e m s t h a n i n c o n v e n t i o n a l d i s c r e t e l o g a r i t h m s y s t e m s .
T h u s , s m a l l e r p a r a m e t e r s c a n b e u s e d i n E C C t h a n w i t h D L s y s t e m s b u t w i t h e q u i v a l e n t l e v e l s o f
s e c u r i t y . T h e a d v a n t a g e s t h a t c a n b e g a i n e d f r o m s m a l l e r p a r a m e t e r s i n c l u d e s p e e d ( f a s t e r c o m p u t a -
t i o n s ) a n d s m a l l e r k e y s a n d c e r t i c a t e s . T h e s e a d v a n t a g e s a r e e s p e c i a l l y i m p o r t a n t i n e n v i r o n m e n t s
w h e r e p r o c e s s i n g p o w e r , s t o r a g e s p a c e , b a n d w i d t h , o r p o w e r c o n s u m p t i o n i s c o n s t r a i n e d .
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A ) i s t h e e l l i p t i c c u r v e a n a l o g u e o f t h e
D S A . E C D S A w a s r s t p r o p o s e d i n 1 9 9 2 b y S c o t t V a n s t o n e 9 4 ] i n r e s p o n s e t o N I S T ' s ( N a t i o n a l
I n s t i t u t e o f S t a n d a r d s a n d T e c h n o l o g y ) r e q u e s t f o r p u b l i c c o m m e n t s o n t h e i r r s t p r o p o s a l f o r D S S .
I t w a s a c c e p t e d i n 1 9 9 8 a s a n I S O ( I n t e r n a t i o n a l S t a n d a r d s O r g a n i z a t i o n ) s t a n d a r d ( I S O 1 4 8 8 8 - 3 ) ,
a c c e p t e d i n 1 9 9 9 a s a n A N S I ( A m e r i c a n N a t i o n a l S t a n d a r d s I n s t i t u t e ) s t a n d a r d ( A N S I X 9 . 6 2 ) , a n d
a c c e p t e d i n 2 0 0 0 a s a n I E E E ( I n s t i t u t e o f E l e c t r i c a l a n d E l e c t r o n i c s E n g i n e e r s ) s t a n d a r d ( I E E E
P 1 3 6 3 ) a n d a F I P S s t a n d a r d ( F I P S 1 8 6 - 2 ) . I t i s a l s o u n d e r c o n s i d e r a t i o n f o r i n c l u s i o n i n s o m e o t h e r
I S O s t a n d a r d s . I n t h i s p a p e r , w e d e s c r i b e t h e A N S I X 9 . 6 2 E C D S A , p r e s e n t r a t i o n a l e f o r s o m e o f
t h e d e s i g n d e c i s i o n s , a n d d i s c u s s r e l a t e d s e c u r i t y , i m p l e m e n t a t i o n , a n d i n t e r o p e r a b i l i t y i s s u e s .
T h e r e m a i n d e r o f t h i s p a p e r i s o r g a n i z e d a s f o l l o w s . I n x 2 , w e r e v i e w d i g i t a l s i g n a t u r e s c h e m e s
a n d t h e D S A . A b r i e f t u t o r i a l o n n i t e e l d s a n d e l l i p t i c c u r v e s i s p r o v i d e d i n x 3 a n d x 4 , r e s p e c -
t i v e l y . I n x 5 , m e t h o d s f o r d o m a i n p a r a m e t e r g e n e r a t i o n a n d v a l i d a t i o n a r e c o n s i d e r e d , w h i l e x 6
d i s c u s s e s m e t h o d s f o r k e y p a i r g e n e r a t i o n a n d p u b l i c k e y v a l i d a t i o n . T h e E C D S A s i g n a t u r e a n d
v e r i c a t i o n a l g o r i t h m s a r e p r e s e n t e d i n x 7 . T h e s e c u r i t y o f E C D S A i s s t u d i e d i n x 8 . F i n a l l y , s o m e
i m p l e m e n t a t i o n a n d i n t e r o p e r a b i l i t y i s s u e s a r e c o n s i d e r e d i n x 9 a n d x 1 0
2 D i g i t a l S i g n a t u r e S c h e m e s
2 . 1 B a c k g r o u n d
D i g i t a l s i g n a t u r e s c h e m e s a r e d e s i g n e d t o p r o v i d e t h e d i g i t a l c o u n t e r p a r t t o h a n d w r i t t e n s i g n a t u r e s
( a n d m o r e ) . A d i g i t a l s i g n a t u r e i s a n u m b e r d e p e n d e n t o n s o m e s e c r e t k n o w n o n l y t o t h e s i g n e r ( t h e
s i g n e r ' s p r i v a t e k e y ) , a n d , a d d i t i o n a l l y , o n t h e c o n t e n t s o f t h e m e s s a g e b e i n g s i g n e d . S i g n a t u r e s
m u s t b e v e r i a b l e | i f a d i s p u t e a r i s e s a s t o w h e t h e r a n e n t i t y s i g n e d a d o c u m e n t , a n u n b i a s e d
t h i r d p a r t y s h o u l d b e a b l e t o r e s o l v e t h e m a t t e r e q u i t a b l y , w i t h o u t r e q u i r i n g a c c e s s t o t h e s i g n e r ' s
-
7/30/2019 Elliptic Curve Digital Signature Algorithm
6/55
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A ) 4
p r i v a t e k e y . D i s p u t e s m a y a r i s e w h e n a s i g n e r t r i e s t o r e p u d i a t e a s i g n a t u r e i t d i d c r e a t e , o r w h e n
a f o r g e r m a k e s a f r a u d u l e n t c l a i m .
T h i s p a p e r i s c o n c e r n e d w i t h a s y m m e t r i c d i g i t a l s i g n a t u r e s s c h e m e s w i t h a p p e n d i x . \ A s y m -
m e t r i c " m e a n s t h a t e a c h e n t i t y s e l e c t s a k e y p a i r c o n s i s t i n g o f a p r i v a t e k e y a n d a r e l a t e d p u b l i c
k e y . T h e e n t i t y m a i n t a i n s t h e s e c r e c y o f t h e p r i v a t e k e y w h i c h i t u s e s f o r s i g n i n g m e s s a g e s , a n d
m a k e s a u t h e n t i c c o p i e s o f i t s p u b l i c k e y a v a i l a b l e t o o t h e r e n t i t i e s w h i c h u s e i t t o v e r i f y s i g n a t u r e s .
\ A p p e n d i x " m e a n s t h a t a c r y p t o g r a p h i c h a s h f u n c t i o n i s u s e d t o c r e a t e a m e s s a g e d i g e s t o f t h e
m e s s a g e , a n d t h e s i g n i n g t r a n s f o r m a t i o n i s a p p l i e d t o t h e m e s s a g e d i g e s t r a t h e r t h a n t o t h e m e s s a g e
i t s e l f .
S e c u r i t y . I d e a l l y , a d i g i t a l s i g n a t u r e s c h e m e s h o u l d b e e x i s t e n t i a l l y u n f o r g e a b l e u n d e r c h o s e n -
m e s s a g e a t t a c k . T h i s n o t i o n o f s e c u r i t y w a s i n t r o d u c e d b y G o l d w a s s e r , M i c a l i a n d R i v e s t 2 5 ] .
I n f o r m a l l y , i t a s s e r t s t h a t a n a d v e r s a r y w h o i s a b l e t o o b t a i n e n t i t y A ' s s i g n a t u r e s f o r a n y m e s s a g e s
o f i t s c h o i c e i s u n a b l e t o s u c c e s s f u l l y f o r g e A ' s s i g n a t u r e o n a s i n g l e o t h e r m e s s a g e .
A p p l i c a t i o n s . D i g i t a l s i g n a t u r e s c h e m e s c a n b e u s e d t o p r o v i d e t h e f o l l o w i n g b a s i c c r y p t o g r a p h i c
s e r v i c e s : d a t a i n t e g r i t y ( t h e a s s u r a n c e t h a t d a t a h a s n o t b e e n a l t e r e d b y u n a u t h o r i z e d o r u n k n o w n
m e a n s ) , d a t a o r i g i n a u t h e n t i c a t i o n ( t h e a s s u r a n c e t h a t t h e s o u r c e o f d a t a i s a s c l a i m e d ) , a n d n o n -
r e p u d i a t i o n ( t h e a s s u r a n c e t h a t a n e n t i t y c a n n o t d e n y p r e v i o u s a c t i o n s o r c o m m i t m e n t s ) . D i g i t a l
s i g n a t u r e s c h e m e s a r e c o m m o n l y u s e d a s p r i m i t i v e s i n c r y p t o g r a p h i c p r o t o c o l s t h a t p r o v i d e o t h e r
s e r v i c e s i n c l u d i n g e n t i t y a u t h e n t i c a t i o n ( e . g . , F I P S 1 9 6 6 4 ] , I S O / I E C 9 7 9 8 - 3 3 1 ] , a n d B l a k e - W i l s o n
a n d M e n e z e s 9 ] ) , a u t h e n t i c a t e d k e y t r a n s p o r t ( e . g . , B l a k e - W i l s o n a n d M e n e z e s 9 ] , A N S I X 9 . 6 3 4 ] ,
a n d I S O / I E C 1 1 7 7 0 - 3 3 2 ] ) , a n d a u t h e n t i c a t e d k e y a g r e e m e n t ( e . g . , I S O / I E C 1 1 7 7 0 - 3 3 2 ] , D i e ,
v a n O o r s c h o t a n d W i e n e r 1 6 ] , a n d B e l l a r e , C a n e t t i a n d K r a w c z y k 8 ] ) .
C l a s s i f i c a t i o n . T h e d i g i t a l s i g n a t u r e s c h e m e s i n u s e t o d a y c a n b e c l a s s i e d a c c o r d i n g t o t h e
h a r d u n d e r l y i n g m a t h e m a t i c a l p r o b l e m w h i c h p r o v i d e s t h e b a s i s f o r t h e i r s e c u r i t y :
1 . I n t e g e r F a c t o r i z a t i o n ( I F ) s c h e m e s , w h i c h b a s e t h e i r s e c u r i t y o n t h e i n t r a c t a b i l i t y o f t h e i n t e -
g e r f a c t o r i z a t i o n p r o b l e m . E x a m p l e s o f t h e s e i n c l u d e t h e R S A 7 5 ] a n d R a b i n 7 4 ] s i g n a t u r e
s c h e m e s .
2 . D i s c r e t e L o g a r i t h m ( D L ) s c h e m e s , w h i c h b a s e t h e i r s e c u r i t y o n t h e i n t r a c t a b i l i t y o f t h e ( o r -
d i n a r y ) d i s c r e t e l o g a r i t h m p r o b l e m i n a n i t e e l d . E x a m p l e s o f t h e s e i n c l u d e t h e E l G a m a l
1 8 ] , S c h n o r r 7 9 ] , D S A 6 0 ] , a n d N y b e r g - R u e p p e l 6 8 , 6 9 ] s i g n a t u r e s c h e m e s .
3 . E l l i p t i c C u r v e ( E C ) s c h e m e s , w h i c h b a s e t h e i r s e c u r i t y o n t h e i n t r a c t a b i l i t y o f t h e e l l i p t i c
c u r v e d i s c r e t e l o g a r i t h m p r o b l e m .
2 . 2 T h e D i g i t a l S i g n a t u r e A l g o r i t h m ( D S A )
T h e D S A w a s p r o p o s e d i n A u g u s t 1 9 9 1 b y t h e U . S . N a t i o n a l I n s t i t u t e o f S t a n d a r d s a n d T e c h n o l o g y
( N I S T ) a n d w a s s p e c i e d i n a U . S . G o v e r n m e n t F e d e r a l I n f o r m a t i o n P r o c e s s i n g S t a n d a r d ( F I P S
1 8 6 6 0 ] ) c a l l e d t h e D i g i t a l S i g n a t u r e S t a n d a r d ( D S S ) . T h e D S A c a n b e v i e w e d a s a v a r i a n t o f t h e
E l G a m a l s i g n a t u r e s c h e m e 1 8 ] . I t s s e c u r i t y i s b a s e d o n t h e i n t r a c t a b i l i t y o f t h e d i s c r e t e l o g a r i t h m
p r o b l e m i n p r i m e - o r d e r s u b g r o u p s o f Z
p
-
7/30/2019 Elliptic Curve Digital Signature Algorithm
7/55
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A ) 5
D S A D o m a i n P a r a m e t e r G e n e r a t i o n . D o m a i n p a r a m e t e r s a r e g e n e r a t e d f o r e a c h e n t i t y i n a
p a r t i c u l a r s e c u r i t y d o m a i n . ( S e e a l s o t h e n o t e b e l o w o n s e c u r e g e n e r a t i o n o f p a r a m e t e r s . )
1 . S e l e c t a 1 6 0 - b i t p r i m e q a n d a 1 0 2 4 - b i t p r i m e p w i t h t h e p r o p e r t y t h a t q p ? 1
2 . ( S e l e c t a g e n e r a t o r g o f t h e u n i q u e c y c l i c g r o u p o f o r d e r q i n Z
p
)
S e l e c t a n e l e m e n t h 2 Z
p
a n d c o m p u t e g = h
( p ? 1 ) = q
m o d p . ( R e p e a t u n t i l g 6= 1 . )
3 . D o m a i n p a r a m e t e r s a r e p , q a n d g
D S A K e y P a i r G e n e r a t i o n . E a c h e n t i t y A i n t h e d o m a i n w i t h d o m a i n p a r a m e t e r s ( p ; q ; g ) d o e s
t h e f o l l o w i n g :
1 . S e l e c t a r a n d o m o r p s e u d o r a n d o m i n t e g e r x s u c h t h a t 1 x q ? 1
2 . C o m p u t e y = g
x
m o d p
3 A ' s p u b l i c k e y i s y ; A ' s p r i v a t e k e y i s x
D S A S i g n a t u r e G e n e r a t i o n . T o s i g n a m e s s a g e m , A d o e s t h e f o l l o w i n g :
1 . S e l e c t a r a n d o m o r p s e u d o r a n d o m i n t e g e r k , 1 k q ? 1
2 . C o m p u t e X = g
k
m o d p a n d r = X m o d q I f r = 0 t h e n g o t o s t e p 1 .
3 . C o m p u t e k
? 1
m o d q
4 . C o m p u t e e = S H A - 1 ( m )
5 . C o m p u t e s = k
? 1
f e + x r g m o d q I f s = 0 t h e n g o t o s t e p 1 .
6 A ' s s i g n a t u r e f o r t h e m e s s a g e m i s ( r ; s )
D S A S i g n a t u r e V e r i f i c a t i o n T o v e r i f y A ' s s i g n a t u r e ( r ; s ) o n m , B o b t a i n s a u t h e n t i c c o p i e s o f
A ' s d o m a i n p a r a m e t e r s ( p ; q ; g ) a n d p u b l i c k e y y a n d d o e s t h e f o l l o w i n g :
1 . V e r i f y t h a t r a n d s a r e i n t e g e r s i n t h e i n t e r v a l 1 ; q ? 1
2 . C o m p u t e e = S H A - 1 ( m )
3 . C o m p u t e w = s
? 1
m o d q
4 . C o m p u t e u
1
= e w m o d q a n d u
2
= r w m o d q
5 . C o m p u t e X = g
u
1
y
u
2
m o d p a n d v = X m o d q
6 . A c c e p t t h e s i g n a t u r e i f a n d o n l y i f v = r
S e c u r i t y A n a l y s i s . S i n c e r a n d s a r e e a c h i n t e g e r s l e s s t h a n q , D S A s i g n a t u r e s a r e 3 2 0 b i t s i n
s i z e . T h e s e c u r i t y o f t h e D S A r e l i e s o n t w o d i s t i n c t b u t r e l a t e d d i s c r e t e l o g a r i t h m p r o b l e m s . O n e
i s t h e d i s c r e t e l o g a r i t h m p r o b l e m i n Z
p
w h e r e t h e n u m b e r e l d s i e v e a l g o r i t h m ( s e e G o r d o n 2 7 ]
a n d S c h i r o k a u e r 7 8 ] ) a p p l i e s ; t h i s a l g o r i t h m h a s a s u b e x p o n e n t i a l r u n n i n g t i m e . M o r e p r e c i s e l y ,
t h e e x p e c t e d r u n n i n g t i m e o f t h e a l g o r i t h m i s
O
e x p
( c + o ( 1 ) ) ( l n p )
1 = 3
( l n l n p )
2 = 3
; ( 1 )
-
7/30/2019 Elliptic Curve Digital Signature Algorithm
8/55
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A ) 6
w h e r e c 1 9 2 3 , a n d l n n d e n o t e s t h e n a t u r a l l o g a r i t h m f u n c t i o n . I f p i s a 1 0 2 4 - b i t p r i m e , t h e n
t h e e x p r e s s i o n ( 1 ) r e p r e s e n t s a n i n f e a s i b l e a m o u n t o f c o m p u t a t i o n ; t h u s t h e D S A u s i n g a 1 0 2 4 - b i t
p r i m e p i s c u r r e n t l y n o t v u l n e r a b l e t o t h i s a t t a c k . T h e s e c o n d d i s c r e t e l o g a r i t h m p r o b l e m w o r k s t o
t h e b a s e g : g i v e n p , q , g , a n d y , n d x s u c h t h a t y g
x
( m o d p ) . F o r l a r g e p ( e . g . , 1 0 2 4 - b i t s ) , t h e
b e s t a l g o r i t h m k n o w n f o r t h i s p r o b l e m i s P o l l a r d ' s r h o m e t h o d 7 3 ] , a n d t a k e s a b o u t
p
q = 2 ( 2 )
s t e p s . I f q 2
1 6 0
, t h e n t h e e x p r e s s i o n ( 2 ) r e p r e s e n t s a n i n f e a s i b l e a m o u n t o f c o m p u t a t i o n ; t h u s t h e
D S A i s n o t v u l n e r a b l e t o t h i s a t t a c k . H o w e v e r , n o t e t h a t t h e r e a r e t w o p r i m a r y s e c u r i t y p a r a m e t e r s
f o r D S A , t h e s i z e o f p a n d t h e s i z e o f q . I n c r e a s i n g o n e w i t h o u t a c o r r e s p o n d i n g i n c r e a s e i n t h e
o t h e r w i l l n o t r e s u l t i n a n e e c t i v e i n c r e a s e i n s e c u r i t y . F u r t h e r m o r e , a n a d v a n c e i n a l g o r i t h m s f o r
e i t h e r o n e o f t h e t w o d i s c r e t e l o g a r i t h m p r o b l e m s c o u l d w e a k e n D S A .
S e c u r e G e n e r a t i o n o f P a r a m e t e r s . I n r e s p o n s e t o s o m e c r i t i c i s m s r e c e i v e d o n t h e r s t d r a f t
( s e e R u e p p e l e t a l . 7 6 ] a n d S m i d a n d B r a n s t a d 8 7 ] ) , F I P S 1 8 6 s p e c i e d a m e t h o d f o r g e n e r a t i n g
p r i m e s p a n d q \ v e r i a b l y a t r a n d o m " . T h i s f e a t u r e p r e v e n t s a n e n t i t y ( e . g . , a c e n t r a l a u t h o r i t y
g e n e r a t i n g d o m a i n p a r a m e t e r s t o b e s h a r e d b y a n e t w o r k o f e n t i t i e s ) f r o m i n t e n t i o n a l l y c o n s t r u c t i n g
\ w e a k " p r i m e s p a n d q f o r w h i c h t h e d i s c r e t e l o g a r i t h m p r o b l e m i s r e l a t i v e l y e a s y . F o r f u r t h e r
d i s c u s s i o n o f t h i s i s s u e , s e e G o r d o n 2 6 ] . F I P S 1 8 6 a l s o s p e c i e s t w o m e t h o d s , b a s e d o n D E S
a n d S H A - 1 , f o r p s e u d o r a n d o m l y g e n e r a t i n g p r i v a t e k e y s x a n d p e r - m e s s a g e s e c r e t s k . F I P S 1 8 6
m a n d a t e s t h e u s e o f t h e s e a l g o r i t h m s , o r a n y o t h e r F I P S - a p p r o v e d s e c u r i t y m e t h o d s .
3 F i n i t e F i e l d s
W e p r o v i d e a b r i e f i n t r o d u c t i o n t o n i t e e l d s . F o r f u r t h e r i n f o r m a t i o n , s e e C h a p t e r 3 o f K o b l i t z
4 3 ] , o r t h e b o o k s b y M c E l i e c e 5 2 ] a n d L i d l a n d N i e d e r r e i t t e r 5 0 ] .
A n i t e e l d c o n s i s t s o f a n i t e s e t o f e l e m e n t s F t o g e t h e r w i t h t w o b i n a r y o p e r a t i o n s o n F ,
c a l l e d a d d i t i o n a n d m u l t i p l i c a t i o n , t h a t s a t i s f y c e r t a i n a r i t h m e t i c p r o p e r t i e s . T h e o r d e r o f a n i t e
e l d i s t h e n u m b e r o f e l e m e n t s i n t h e e l d . T h e r e e x i s t s a n i t e e l d o f o r d e r q i f a n d o n l y i f q i s
a p r i m e p o w e r . I f q i s a p r i m e p o w e r , t h e n t h e r e i s e s s e n t i a l l y o n l y o n e n i t e e l d o f o r d e r q ; t h i s
e l d i s d e n o t e d b y F
q
. T h e r e a r e , h o w e v e r , m a n y w a y s o f r e p r e s e n t i n g t h e e l e m e n t s o f F
q
. S o m e
r e p r e s e n t a t i o n s m a y l e a d t o m o r e e c i e n t i m p l e m e n t a t i o n s o f t h e e l d a r i t h m e t i c i n h a r d w a r e o r
i n s o f t w a r e .
I f q = p
m
w h e r e p i s a p r i m e a n d m i s a p o s i t i v e i n t e g e r , t h e n p i s c a l l e d t h e c h a r a c t e r i s t i c
o f F
q
a n d m i s c a l l e d t h e e x t e n s i o n d e g r e e o f F
q
. M o s t s t a n d a r d s w h i c h s p e c i f y t h e e l l i p t i c c u r v e
c r y p t o g r a p h i c t e c h n i q u e s r e s t r i c t t h e o r d e r o f t h e u n d e r l y i n g n i t e e l d t o b e a n o d d p r i m e ( q = p )
o r a p o w e r o f 2 ( q = 2
m
) . I n x 3 . 1 , w e d e s c r i b e t h e e l e m e n t s a n d t h e o p e r a t i o n s o f t h e n i t e e l d
F
p
I n x 3 . 2 , e l e m e n t s a n d t h e o p e r a t i o n s o f t h e n i t e e l d F
2
m
a r e d e s c r i b e d , t o g e t h e r w i t h t w o
m e t h o d s f o r r e p r e s e n t i n g t h e e l d e l e m e n t s : p o l y n o m i a l b a s i s r e p r e s e n t a t i o n s a n d n o r m a l b a s i s
r e p r e s e n t a t i o n s
-
7/30/2019 Elliptic Curve Digital Signature Algorithm
9/55
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A ) 7
3 . 1 T h e F i n i t e F i e l d F
p
L e t p b e a p r i m e n u m b e r . T h e n i t e e l d F
p
, c a l l e d a p r i m e e l d , i s c o m p r i s e d o f t h e s e t o f i n t e g e r s
f 0 ; 1 ; 2 ; : : : ; p ? 1 g
w i t h t h e f o l l o w i n g a r i t h m e t i c o p e r a t i o n s :
A d d i t i o n : I f a ; b 2 F
p
, t h e n a + b = r , w h e r e r i s t h e r e m a i n d e r w h e n a + b i s d i v i d e d b y p
a n d 0 r p ? 1 . T h i s i s k n o w n a s a d d i t i o n m o d u l o p
M u l t i p l i c a t i o n : I f a ; b 2 F
p
, t h e n a b = s , w h e r e s i s t h e r e m a i n d e r w h e n a b i s d i v i d e d
b y p a n d 0 s p ? 1 . T h i s i s k n o w n a s m u l t i p l i c a t i o n m o d u l o p
I n v e r s i o n : I f a i s a n o n - z e r o e l e m e n t i n F
p
, t h e i n v e r s e o f a m o d u l o p , d e n o t e d a
? 1
, i s t h e
u n i q u e i n t e g e r c 2 F
p
f o r w h i c h a c = 1
E x a m p l e 1 ( T h e n i t e e l d F
2 3
) T h e e l e m e n t s o f F
2 3
a r e f 0 ; 1 ; 2 ; : : : ; 2 2 g . E x a m p l e s o f t h e a r i t h -
m e t i c o p e r a t i o n s i n F
2 3
a r e :
1 2 + 2 0 = 9 .
8 9 = 3 .
8
? 1
= 3
3 . 2 T h e F i n i t e F i e l d F
2
m
T h e e l d F
2
m
, c a l l e d a c h a r a c t e r i s t i c t w o n i t e e l d o r a b i n a r y n i t e e l d , c a n b e v i e w e d a s a
v e c t o r s p a c e o f d i m e n s i o n m o v e r t h e e l d F
2
w h i c h c o n s i s t s o f t h e t w o e l e m e n t s 0 a n d 1 . T h a t i s ,
t h e r e e x i s t m e l e m e n t s
0
;
1
; : : : ;
m ? 1
i n F
2
m
s u c h t h a t e a c h e l e m e n t 2 F
2
m
c a n b e u n i q u e l y
w r i t t e n i n t h e f o r m :
= a
0
0
+ a
1
1
+ + a
m ? 1
m ? 1
; w h e r e a
i
2 f 0 ; 1 g
S u c h a s e t f
0
;
1
; : : : ;
m ? 1
g i s c a l l e d a b a s i s o f F
2
m
o v e r F
2
. G i v e n s u c h a b a s i s , a e l d e l e m e n t
c a n b e r e p r e s e n t e d a s t h e b i t s t r i n g ( a
0
a
1
: : : a
m ? 1
) . A d d i t i o n o f e l d e l e m e n t s i s p e r f o r m e d b y
b i t w i s e X O R - i n g t h e v e c t o r r e p r e s e n t a t i o n s . T h e m u l t i p l i c a t i o n r u l e d e p e n d s o n t h e b a s i s s e l e c t e d .
T h e r e a r e m a n y d i e r e n t b a s e s o f F
2
m
o v e r F
2
. S o m e b a s e s l e a d t o m o r e e c i e n t s o f t w a r e o r
h a r d w a r e i m p l e m e n t a t i o n s o f t h e a r i t h m e t i c i n F
2
m
t h a n o t h e r b a s e s . A N S I X 9 . 6 2 p e r m i t s t w o
k i n d s o f b a s e s : p o l y n o m i a l b a s e s ( d i s c u s s e d i n x 3 . 2 . 1 ) a n d n o r m a l b a s e s ( d i s c u s s e d i n x 3 . 2 . 2 ) .
3 . 2 . 1 P o l y n o m i a l B a s i s R e p r e s e n t a t i o n s
L e t f ( x ) = x
m
+ f
m ? 1
x
m ? 1
+ + f
2
x
2
+ f
1
x + f
0
( w h e r e f
i
2 f 0 ; 1 g f o r i = 0 ; 1 ; : : : ; m ? 1 ) b e a n
i r r e d u c i b l e p o l y n o m i a l o f d e g r e e m o v e r F
2
. T h a t i s , f ( x ) c a n n o t b e f a c t o r e d a s a p r o d u c t o f t w o
p o l y n o m i a l s o v e r F
2
, e a c h o f d e g r e e l e s s t h a n m . E a c h s u c h p o l y n o m i a l f ( x ) d e n e s a p o l y n o m i a l
b a s i s r e p r e s e n t a t i o n o f F
2
m
, w h i c h i s d e s c r i b e d n e x t . f ( x ) i s c a l l e d t h e r e d u c t i o n p o l y n o m i a l
-
7/30/2019 Elliptic Curve Digital Signature Algorithm
10/55
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A ) 8
F i e l d E l e m e n t s . T h e n i t e e l d F
2
m
i s c o m p r i s e d o f a l l p o l y n o m i a l s o v e r F
2
o f d e g r e e l e s s t h a n
m :
F
2
m
= f a
m ? 1
x
m ? 1
+ a
m ? 2
x
m ? 2
+ + a
1
x + a
0
: a
i
2 f 0 ; 1 g g
T h e e l d e l e m e n t a
m ? 1
x
m ? 1
+ a
m ? 2
x
m ? 2
+ + a
1
x + a
0
i s u s u a l l y d e n o t e d b y t h e b i t s t r i n g
( a
m ? 1
a
m ? 2
: : : a
1
a
0
) o f l e n g t h m , s o t h a t
F
2
m
= f ( a
m ? 1
a
m ? 2
: : : a
1
a
0
) : a
i
2 f 0 ; 1 g g
T h u s t h e e l e m e n t s o f F
2
m
c a n b e r e p r e s e n t e d b y t h e s e t o f a l l b i n a r y s t r i n g s o f l e n g t h m . T h e
m u l t i p l i c a t i v e i d e n t i t y e l e m e n t ( 1 ) i s r e p r e s e n t e d b y t h e b i t s t r i n g ( 0 0 0 1 ) , w h i l e t h e a d d i t i v e
i d e n t i t y e l e m e n t ( 0 ) i s r e p r e s e n t e d b y t h e b i t s t r i n g o f a l l 0 ' s .
F i e l d O p e r a t i o n s . T h e f o l l o w i n g a r i t h m e t i c o p e r a t i o n s a r e d e n e d o n t h e e l e m e n t s o f F
2
m
w h e n
u s i n g a p o l y n o m i a l b a s i s r e p r e s e n t a t i o n w i t h r e d u c t i o n p o l y n o m i a l f ( x ) :
A d d i t i o n : I f a = ( a
m ? 1
a
m ? 2
: : : a
1
a
0
) a n d b = ( b
m ? 1
b
m ? 2
: : : b
1
b
0
) a r e e l e m e n t s o f F
2
m
,
t h e n a + b = c = ( c
m ? 1
c
m ? 2
: : : c
1
c
0
) , w h e r e c
i
= ( a
i
+ b
i
) m o d 2 . T h a t i s , e l d a d d i t i o n i s
p e r f o r m e d b i t w i s e .
M u l t i p l i c a t i o n : I f a = ( a
m ? 1
a
m ? 2
: : : a
1
a
0
) a n d b = ( b
m ? 1
b
m ? 2
: : : b
1
b
0
) a r e e l e m e n t s o f
F
2
m
, t h e n a b = r = ( r
m ? 1
r
m ? 2
: : : r
1
r
0
) , w h e r e t h e p o l y n o m i a l r
m ? 1
x
m ? 1
+ r
m ? 2
x
m ? 2
+
+ r
1
x + r
0
i s t h e r e m a i n d e r w h e n t h e p o l y n o m i a l
( a
m ? 1
x
m ? 1
+ a
m ? 2
x
m ? 2
+ + a
1
x + a
0
) ( b
m ? 1
x
m ? 1
+ b
m ? 2
x
m ? 2
+ + b
1
x + b
0
)
i s d i v i d e d b y f ( x ) o v e r F
2
I n v e r s i o n : I f a i s a n o n - z e r o e l e m e n t i n F
2
m
, t h e i n v e r s e o f a , d e n o t e d a
? 1
, i s t h e u n i q u e
e l e m e n t c 2 F
2
m
f o r w h i c h a c = 1
E x a m p l e 2 ( A p o l y n o m i a l b a s i s r e p r e s e n t a t i o n o f t h e n i t e e l d F
2
4
) L e t f ( x ) = x
4
+ x + 1 b e t h e
r e d u c t i o n p o l y n o m i a l . T h e n t h e 1 6 e l e m e n t s o f F
2
4
a r e :
0 ( 0 0 0 0 ) 1 ( 0 0 0 1 ) x ( 0 0 1 0 ) x + 1 ( 0 0 1 1 )
x
2
( 0 1 0 0 ) x
2
+ 1 ( 0 1 0 1 ) x
2
+ x ( 0 1 1 0 ) x
2
+ x + 1 ( 0 1 1 1 )
x
3
( 1 0 0 0 ) x
3
+ 1 ( 1 0 0 1 ) x
3
+ x ( 1 0 1 0 ) x
3
+ x + 1 ( 1 0 1 1 )
x
3
+ x
2
( 1 1 0 0 ) x
3
+ x
2
+ 1 ( 1 1 0 1 ) x
3
+ x
2
+ x ( 1 1 1 0 ) x
3
+ x
2
+ x + 1 ( 1 1 1 1 )
E x a m p l e s o f t h e a r i t h m e t i c o p e r a t i o n s i n F
2
4 a r e :
( 1 1 0 1 ) + ( 1 0 0 1 ) = ( 0 1 0 0 ) .
( 1 1 0 1 ) ( 1 0 0 1 ) = ( 1 1 1 1 ) s i n c e ( x
3
+ x
2
+ 1 ) ( x
3
+ 1 ) = x
6
+ x
5
+ x
2
+ 1 a n d ( x
6
+ x
5
+ x
2
+
1 ) m o d ( x
4
+ x + 1 ) = x
3
+ x
2
+ x + 1
( 1 1 0 1 )
? 1
= ( 0 1 0 0 ) .
T h e e l e m e n t = x = ( 0 0 1 0 ) i s a g e n e r a t o r o f F
2
4
s i n c e i t s o r d e r i s 1 5 a s t h e f o l l o w i n g c a l c u l a t i o n s
s h o w :
-
7/30/2019 Elliptic Curve Digital Signature Algorithm
11/55
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A ) 9
1
= ( 0 0 1 0 )
2
= ( 0 1 0 0 )
3
= ( 1 0 0 0 )
4
= ( 0 0 1 1 )
5
= ( 0 1 1 0 )
6
= ( 1 1 0 0 )
7
= ( 1 0 1 1 )
8
= ( 0 1 0 1 )
9
= ( 1 0 1 0 )
1 0
= ( 0 1 1 1 )
1 1
= ( 1 1 1 0 )
1 2
= ( 1 1 1 1 )
1 3
= ( 1 1 0 1 )
1 4
= ( 1 0 0 1 )
1 5
= ( 0 0 0 1 ) .
S e l e c t i n g a R e d u c t i o n P o l y n o m i a l A t r i n o m i a l o v e r F
2
i s a p o l y n o m i a l o f t h e f o r m x
m
+ x
k
+
1 , w h e r e 1 k m ? 1 A p e n t a n o m i a l o v e r F
2
i s a p o l y n o m i a l o f t h e f o r m x
m
+ x
k
3
+ x
k
2
+ x
k
1
+ 1 ,
w h e r e 1 k
1
< k
2
< k
3
m ? 1 . A N S I X 9 . 6 2 s p e c i e s t h e f o l l o w i n g r u l e s f o r s e l e c t i n g t h e r e d u c t i o n
p o l y n o m i a l f o r r e p r e s e n t i n g t h e e l e m e n t s o f F
2
m
1 . I f t h e r e e x i s t s a n i r r e d u c i b l e t r i n o m i a l o f d e g r e e m o v e r F
2
, t h e n t h e r e d u c t i o n p o l y n o m i a l
f ( x ) m u s t b e a n i r r e d u c i b l e t r i n o m i a l o f d e g r e e m o v e r F
2
. T o m a x i m i z e t h e c h a n c e s f o r
i n t e r o p e r a b i l i t y , A N S I X 9 . 6 2 r e c o m m e n d s t h a t t h e t r i n o m i a l u s e d s h o u l d b e x
m
+ x
k
+ 1 f o r
t h e s m a l l e s t p o s s i b l e k
2 . I f t h e r e d o e s n o t e x i s t a n i r r e d u c i b l e t r i n o m i a l o f d e g r e e m o v e r F
2
, t h e n t h e r e d u c t i o n
p o l y n o m i a l f ( x ) m u s t b e a n i r r e d u c i b l e p e n t a n o m i a l o f d e g r e e m o v e r F
2
. T o m a x i m i z e t h e
c h a n c e s f o r i n t e r o p e r a b i l i t y , A N S I X 9 . 6 2 r e c o m m e n d s t h a t t h e p e n t a n o m i a l u s e d s h o u l d b e
x
m
+ x
k
3
+ x
k
2
+ x
k
1
+ 1 c h o s e n a c c o r d i n g t o t h e f o l l o w i n g c r i t e r i a :
1
( i ) k
3
i s a s s m a l l a s p o s s i b l e ;
( i i ) f o r t h i s p a r t i c u l a r v a l u e o f k
3
, k
2
i s a s m a l l a s p o s s i b l e ; a n d ( i i i ) f o r t h e s e p a r t i c u l a r v a l u e s
o f k
3
a n d k
2
, k
1
i s a s s m a l l a s p o s s i b l e .
3 . 2 . 2 N o r m a l B a s i s R e p r e s e n t a t i o n s
N o r m a l B a s e s A n o r m a l b a s i s o f F
2
m
o v e r F
2
i s a b a s i s o f t h e f o r m f ;
2
;
2
2
; : : : ;
2
m 1
g , w h e r e
2 F
2
m
. S u c h a b a s i s a l w a y s e x i s t s . A n y e l e m e n t a 2 F
2
m
c a n b e w r i t t e n a s a =
P
m ? 1
i = 0
a
i
2
i
,
w h e r e a
i
2 f 0 ; 1 g . N o r m a l b a s i s r e p r e s e n t a t i o n s h a v e t h e c o m p u t a t i o n a l a d v a n t a g e t h a t s q u a r i n g a n
e l e m e n t c a n b e d o n e v e r y e c i e n t l y ( s e e F i e l d O p e r a t i o n s b e l o w ) . M u l t i p l y i n g d i s t i n c t e l e m e n t s ,
o n t h e o t h e r h a n d , c a n b e c u m b e r s o m e i n g e n e r a l . F o r t h i s r e a s o n , A N S I X 9 . 6 2 s p e c i e s t h a t
G a u s s i a n n o r m a l b a s e s b e u s e d , f o r w h i c h m u l t i p l i c a t i o n i s b o t h s i m p l e r a n d m o r e e c i e n t .
G a u s s i a n N o r m a l B a s e s . T h e t y p e o f a G N B i s a p o s i t i v e i n t e g e r m e a s u r i n g t h e c o m p l e x i t y o f
t h e m u l t i p l i c a t i o n o p e r a t i o n w i t h r e s p e c t t o t h a t b a s i s . G e n e r a l l y s p e a k i n g t h e s m a l l e r t h e t y p e ,
t h e m o r e e c i e n t t h e m u l t i p l i c a t i o n . F o r a g i v e n m a n d T , t h e e l d F
2
m
c a n h a v e a t m o s t o n e
G N B o f t y p e T . T h u s i t i s p r o p e r t o s p e a k o f t h e t y p e T G N B o f F
2
m
. S e e M u l l i n e t a l . 5 9 ] a n d
A s h , B l a k e a n d V a n s t o n e 5 ] f o r f u r t h e r i n f o r m a t i o n o n G N B s .
E x i s t e n c e o f G a u s s i a n N o r m a l B a s e s . A G a u s s i a n n o r m a l b a s i s ( G N B ) e x i s t s w h e n e v e r m
i s n o t d i v i s i b l e b y 8 . L e t m b e a p o s i t i v e i n t e g e r n o t d i v i s i b l e b y 8 , a n d l e t T b e a p o s i t i v e i n t e g e r .
T h e n a t y p e T G N B f o r F
2
m
e x i s t s i f a n d o n l y i f p = T m + 1 i s p r i m e a n d g c d ( T m = k ; m ) = 1 ,
w h e r e k i s t h e m u l t i p l i c a t i v e o r d e r o f 2 m o d u l o p
1
A c t u a l l y , A N S I X 9 . 6 2 r e c o m m e n d s t h e f o l l o w i n g c r i t e r i a f o r s e l e c t i n g t h e p e n t a n o m i a l : ( i ) k
1
i s a s s m a l l a s
p o s s i b l e ; ( i i ) f o r t h i s p a r t i c u l a r v a l u e o f k
1
k
2
i s a s m a l l a s p o s s i b l e ; a n d ( i i i ) f o r t h e s e p a r t i c u l a r v a l u e s o f k
1
a n d k
2
k
3
i s a s s m a l l a s p o s s i b l e . H o w e v e r , t h e A N S I X 9 F 1 c o m m i t t e e a g r e e d i n A p r i l 1 9 9 9 t o c h a n g e t h i s r e c o m m e n d a t i o n
i n a f o r t h c o m i n g r e v i s i o n o f A N S I X 9 . 6 2 t o t h e o n e g i v e n a b o v e i n o r d e r t o b e c o n s i s t e n t w i t h t h e I E E E P 1 3 6 3 a n d
F I P S 1 8 6 - 2 r e c o m m e n d a t i o n s .
-
7/30/2019 Elliptic Curve Digital Signature Algorithm
12/55
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A ) 1 0
F i e l d E l e m e n t s I f f ;
2
;
2
2
; : : : ;
2
m 1
g i s a n o r m a l b a s i s o f F
2
m
o v e r F
2
, t h e n t h e e l d e l e m e n t
a =
P
m ? 1
i = 0
a
i
2
i
i s r e p r e s e n t e d b y t h e b i n a r y s t r i n g ( a
0
a
1
: : : a
m ? 1
) o f l e n g t h m , s o t h a t
F
2
m
= f ( a
0
a
1
: : : a
m ? 1
) : a
i
2 f 0 ; 1 g g
T h e m u l t i p l i c a t i v e i d e n t i t y e l e m e n t ( 1 ) i s r e p r e s e n t e d b y t h e b i t s t r i n g o f a l l 1 ' s , w h i l e t h e a d d i t i v e
i d e n t i t y e l e m e n t ( 0 ) i s r e p r e s e n t e d b y t h e b i t s t r i n g o f a l l 0 ' s .
F i e l d O p e r a t i o n s . T h e f o l l o w i n g a r i t h m e t i c o p e r a t i o n s a r e d e n e d o n t h e e l e m e n t s o f F
2
m
w h e n
u s i n g a G N B o f t y p e T :
A d d i t i o n : I f a = ( a
0
a
1
: : : a
m ? 2
a
m ? 1
) a n d b = ( b
0
b
1
: : : b
m ? 2
b
m ? 1
) a r e e l e m e n t s o f F
2
m
,
t h e n a + b = c = ( c
0
c
1
: : : c
m ? 2
c
m ? 1
) , w h e r e c
i
= ( a
i
+ b
i
) m o d 2 . T h a t i s , e l d a d d i t i o n i s
p e r f o r m e d b i t w i s e .
S q u a r i n g : L e t a = ( a
0
a
1
: : : a
m ? 2
a
m ? 1
) 2 F
2
m
. S i n c e s q u a r i n g i s a l i n e a r o p e r a t i o n i n F
2
m
,
a
2
=
m ? 1
X
i = 0
a
i
2
i
!
2
=
m ? 1
X
i = 0
a
i
2
i + 1
=
m ? 1
X
i = 0
a
i ? 1
2
i
= ( a
m ? 1
a
0
a
1
: : : a
m ? 2
) ;
w i t h i n d i c e s r e d u c e d m o d u l o m . H e n c e s q u a r i n g a e l d e l e m e n t c a n b e a c c o m p l i s h e d b y a
s i m p l e r o t a t i o n o f t h e v e c t o r r e p r e s e n t a t i o n .
M u l t i p l i c a t i o n : L e t p = T m + 1 a n d l e t u 2 F
p
b e a n e l e m e n t o f o r d e r T . D e n e t h e
s e q u e n c e F ( 1 ) ; F ( 2 ) ; : : : ; F ( p ? 1 ) b y
F ( 2
i
u
j
m o d p ) = i f o r 0 i m ? 1 , 0 j T ? 1
I f a = ( a
0
a
1
: : : a
m ? 2
a
m ? 1
) a n d b = ( b
0
b
1
: : : b
m ? 2
b
m ? 1
) a r e e l e m e n t s o f F
2
m
, t h e n a b = c =
( c
0
c
1
: : : c
m ? 2
c
m ? 1
) , w h e r e
c
l
=
8
>
:
P
p ? 2
k = 1
a
F ( k + 1 ) + l
b
F ( p ? k ) + l
i f T i s e v e n ;
P
m = 2
k = 1
( a
k + l ? 1
b
m = 2 + k + l ? 1
+ a
m = 2 + k + l ? 1
b
k + l ? 1
)
+
P
p ? 2
k = 1
a
F ( k + 1 ) + l
b
F ( p ? k ) + l
i f T i s o d d ;
f o r e a c h l , 0 l m ? 1 , w h e r e i n d i c e s a r e r e d u c e d m o d u l o m
I n v e r s i o n : I f a i s a n o n - z e r o e l e m e n t i n F
2
m
, t h e i n v e r s e o f a i n F
2
m
, d e n o t e d a
? 1
, i s t h e
u n i q u e e l e m e n t c 2 F
2
m
f o r w h i c h a c = 1
E x a m p l e 3 ( A G a u s s i a n n o r m a l b a s i s r e p r e s e n t a t i o n o f t h e n i t e e l d F
2
4 ) F o r t h e t y p e T = 3
G N B f o r F
2
4 , l e t u = 9 2 F
1 3
b e a n e l e m e n t o f o r d e r 3 . T h e s e q u e n c e o f F ( i ) ' s i s :
F ( 1 ) = 0 F ( 2 ) = 1 F ( 3 ) = 0 F ( 4 ) = 2 F ( 5 ) = 1 F ( 6 ) = 1
F ( 7 ) = 3 F ( 8 ) = 3 F ( 9 ) = 0 F ( 1 0 ) = 2 F ( 1 1 ) = 3 F ( 1 2 ) = 2 .
-
7/30/2019 Elliptic Curve Digital Signature Algorithm
13/55
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A ) 1 1
T h e f o r m u l a s f o r t h e p r o d u c t t e r m s c
l
a r e :
c
0
= a
0
( b
1
+ b
2
+ b
3
) + a
1
( b
0
+ b
2
) + a
2
( b
0
+ b
1
) + a
3
( b
0
+ b
3
)
c
1
= a
1
( b
2
+ b
3
+ b
0
) + a
2
( b
1
+ b
3
) + a
3
( b
1
+ b
2
) + a
0
( b
1
+ b
0
)
c
2
= a
2
( b
3
+ b
0
+ b
1
) + a
3
( b
2
+ b
0
) + a
0
( b
2
+ b
3
) + a
1
( b
2
+ b
1
)
c
3
= a
3
( b
0
+ b
1
+ b
2
) + a
0
( b
3
+ b
1
) + a
1
( b
3
+ b
0
) + a
2
( b
3
+ b
2
)
F o r e x a m p l e , i f a = ( 1 0 0 0 ) a n d b = ( 1 1 0 1 ) , t h e n c = a b = ( 0 0 1 0 ) .
S e l e c t i n g a G a u s s i a n N o r m a l B a s i s . A N S I X 9 . 6 2 s p e c i e s t h e f o l l o w i n g r u l e s f o r s e l e c t i n g a
G N B f o r r e p r e s e n t i n g t h e e l e m e n t s o f F
2
m
( w h e n m i s n o t d i v i s i b l e b y 8 ) .
1 . I f t h e r e e x i s t s a t y p e 2 G N B o f F
2
m
, t h e n t h i s b a s i s m u s t b e u s e d .
2 . I f t h e r e d o e s n o t e x i s t a t y p e 2 G N B o f F
2
m
, b u t t h e r e d o e s e x i s t a t y p e 1 G N B , t h e n t h e
t y p e 1 G N B m u s t b e u s e d .
3 . I f n e i t h e r a t y p e 1 n o r a t y p e 2 G N B o f F
2
m
e x i s t s , t h e n t h e G N B o f s m a l l e s t t y p e m u s t b e
u s e d .
T h e s e l e c t i o n o f t y p e 2 G N B s o v e r t y p e 1 G N B s w a s s o m e w h a t a r b i t r a r y | b o t h t y p e s o f G N B s
a d m i t e c i e n t i m p l e m e n t a t i o n o f e l d a r i t h m e t i c . T h i s i s n o t a p r a c t i c a l c o n c e r n s i n c e n i t e e l d s
w h i c h h a v e b o t h t y p e 1 a n d t y p e 2 G N B s a r e r e l a t i v e l y s c a r c e | t h e o n l y s u c h e l d s F
2
m
w i t h m
b e t w e e n 1 6 0 a n d 6 0 0 a r e F
2
2 1 0
a n d F
2
3 7 8
. N e i t h e r o f t h e s e t w o e l d s a r e a m o n g t h o s e r e c o m m e n d e d
b y N I S T ( s e e x 1 0 . 2 ) .
4 E l l i p t i c C u r v e s O v e r F i n i t e F i e l d s
W e g i v e a q u i c k i n t r o d u c t i o n t o t h e t h e o r y o f e l l i p t i c c u r v e s . C h a p t e r 6 o f K o b l i t z ' s b o o k 4 3 ]
p r o v i d e s a n i n t r o d u c t i o n t o e l l i p t i c c u r v e s a n d e l l i p t i c c u r v e s y s t e m s . F o r a m o r e d e t a i l e d a c c o u n t ,
c o n s u l t M e n e z e s ' b o o k 5 4 ] .
4 . 1 E l l i p t i c C u r v e s O v e r F
p
L e t p > 3 b e a n o d d p r i m e . A n e l l i p t i c c u r v e E o v e r F
p
i s d e n e d b y a n e q u a t i o n o f t h e f o r m
y
2
= x
3
+ a x + b ; ( 3 )
w h e r e a ; b 2 F
p
, a n d 4 a
3
+ 2 7 b
2
6 0 ( m o d p ) . T h e s e t E ( F
p
) c o n s i s t s o f a l l p o i n t s ( x ; y ) , x 2 F
p
,
y 2 F
p
, w h i c h s a t i s f y t h e d e n i n g e q u a t i o n ( 3 ) , t o g e t h e r w i t h a s p e c i a l p o i n t O c a l l e d t h e p o i n t a t
i n n i t y
E x a m p l e 4 ( e l l i p t i c c u r v e o v e r F
2 3
) L e t p = 2 3 a n d c o n s i d e r t h e e l l i p t i c c u r v e E : y
2
= x
3
+ x + 4
d e n e d o v e r F
2 3
. ( I n t h e n o t a t i o n o f e q u a t i o n ( 3 ) , w e h a v e a = 1 a n d b = 4 . ) N o t e t h a t 4 a
3
+ 2 7 b
2
=
4 + 4 3 2 = 4 3 6 2 2 ( m o d 2 3 ) , s o E i s i n d e e d a n e l l i p t i c c u r v e . T h e p o i n t s i n E ( F
2 3
) a r e O a n d t h e
f o l l o w i n g :
-
7/30/2019 Elliptic Curve Digital Signature Algorithm
14/55
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A ) 1 2
( 0 ; 2 ) ( 0 ; 2 1 ) ( 1 ; 1 1 ) ( 1 ; 1 2 ) ( 4 ; 7 ) ( 4 ; 1 6 ) ( 7 ; 3 ) ( 7 ; 2 0 ) ( 8 ; 8 ) ( 8 ; 1 5 )
( 9 ; 1 1 ) ( 9 ; 1 2 ) ( 1 0 ; 5 ) ( 1 0 ; 1 8 ) ( 1 1 ; 9 ) ( 1 1 ; 1 4 ) ( 1 3 ; 1 1 ) ( 1 3 ; 1 2 ) ( 1 4 ; 5 ) ( 1 4 ; 1 8 )
( 1 5 ; 6 ) ( 1 5 ; 1 7 ) ( 1 7 ; 9 ) ( 1 7 ; 1 4 ) ( 1 8 ; 9 ) ( 1 8 ; 1 4 ) ( 2 2 ; 5 ) ( 2 2 ; 1 9 ) .
A d d i t i o n F o r m u l a . T h e r e i s a r u l e , c a l l e d t h e c h o r d - a n d - t a n g e n t r u l e , f o r a d d i n g t w o p o i n t s o n
a n e l l i p t i c c u r v e E ( F
p
) t o g i v e a t h i r d e l l i p t i c c u r v e p o i n t . T o g e t h e r w i t h t h i s a d d i t i o n o p e r a t i o n ,
t h e s e t o f p o i n t s E ( F
p
) f o r m s a g r o u p w i t h O s e r v i n g a s i t s i d e n t i t y . I t i s t h i s g r o u p t h a t i s u s e d
i n t h e c o n s t r u c t i o n o f e l l i p t i c c u r v e c r y p t o s y s t e m s .
T h e a d d i t i o n r u l e i s b e s t e x p l a i n e d g e o m e t r i c a l l y . L e t P = ( x
1
; y
1
) a n d Q = ( x
2
; y
2
) b e t w o
d i s t i n c t p o i n t s o n a n e l l i p t i c c u r v e E . T h e n t h e s u m o f P a n d Q , d e n o t e d R = ( x
3
; y
3
) , i s d e n e d
a s f o l l o w s . F i r s t d r a w t h e l i n e t h r o u g h P a n d Q ; t h i s l i n e i n t e r s e c t s t h e e l l i p t i c c u r v e i n a t h i r d
p o i n t . T h e n R i s t h e r e e c t i o n o f t h i s p o i n t i n t h e x - a x i s . T h i s i s d e p i c t e d i n F i g u r e 1 . T h e e l l i p t i c
c u r v e i n t h e g u r e c o n s i s t s o f t w o p a r t s , t h e e l l i p s e - l i k e g u r e a n d t h e i n n i t e c u r v e .
R = ( x
3
y
3
)
x
y
P = ( x
1
y
1
)
Q = ( x
2
y
2
)
F i g u r e 1 : G e o m e t r i c d e s c r i p t i o n o f t h e a d d i t i o n o f t w o d i s t i n c t e l l i p t i c c u r v e p o i n t s : P + Q = R
I f P = ( x
1
; y
1
) , t h e n t h e d o u b l e o f P , d e n o t e d R = ( x
3
; y
3
) , i s d e n e d a s f o l l o w s . F i r s t d r a w
t h e t a n g e n t l i n e t o t h e e l l i p t i c c u r v e a t P . T h i s l i n e i n t e r s e c t s t h e e l l i p t i c c u r v e i n a s e c o n d p o i n t .
T h e n R i s t h e r e e c t i o n o f t h i s p o i n t i n t h e x - a x i s . T h i s i s d e p i c t e d i n F i g u r e 2 .
T h e f o l l o w i n g a l g e b r a i c f o r m u l a e f o r t h e s u m o f t w o p o i n t s a n d t h e d o u b l e o f a p o i n t c a n n o w
b e d e r i v e d f r o m t h e g e o m e t r i c d e s c r i p t i o n .
1 P + O = O + P = P f o r a l l P 2 E ( F
p
)
2 . I f P = ( x ; y ) 2 E ( F
p
) , t h e n ( x ; y ) + ( x ; ? y ) = O . ( T h e p o i n t ( x ; ? y ) i s d e n o t e d b y ? P , a n d
i s c a l l e d t h e n e g a t i v e o f P ; o b s e r v e t h a t ? P i s i n d e e d a p o i n t o n t h e c u r v e . )
3 . ( P o i n t a d d i t i o n ) L e t P = ( x
1
; y
1
) 2 E ( F
p
) a n d Q = ( x
2
; y
2
) 2 E ( F
p
) , w h e r e P 6= Q . T h e n
P + Q = ( x
3
; y
3
) , w h e r e
x
3
=
y
2
? y
1
x
2
? x
1
2
? x
1
? x
2
-
7/30/2019 Elliptic Curve Digital Signature Algorithm
15/55
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A ) 1 3
x
y
R = ( x
3
y
3
)
P = ( x
1
y
1
)
F i g u r e 2 : G e o m e t r i c d e s c r i p t i o n o f t h e d o u b l i n g o f a n e l l i p t i c c u r v e p o i n t : P + P = R
a n d
y
3
=
y
2
? y
1
x
2
? x
1
( x
1
? x
3
) ? y
1
4 . ( P o i n t d o u b l i n g ) L e t P = ( x
1
; y
1
) 2 E ( F
p
) , w h e r e P 6= ? P . T h e n 2 P = ( x
3
; y
3
) , w h e r e
x
3
=
3 x
2
1
+ a
2 y
1
2
? 2 x
1
a n d
y
3
=
3 x
2
1
+ a
2 y
1
( x
1
? x
3
) ? y
1
O b s e r v e t h a t t h e a d d i t i o n o f t w o e l l i p t i c c u r v e p o i n t s i n E ( F
p
) r e q u i r e s a f e w a r i t h m e t i c o p e r -
a t i o n s ( a d d i t i o n , s u b t r a c t i o n , m u l t i p l i c a t i o n , a n d i n v e r s i o n ) i n t h e u n d e r l y i n g e l d F
p
E x a m p l e 5 ( e l l i p t i c c u r v e a d d i t i o n ) C o n s i d e r t h e e l l i p t i c c u r v e d e n e d i n E x a m p l e 4 .
1 . L e t P = ( 4 ; 7 ) a n d Q = ( 1 3 ; 1 1 ) . T h e n P + Q = ( x
3
; y
3
) i s c o m p u t e d a s f o l l o w s :
x
3
=
1 1 ? 7
1 3 ? 4
2
? 4 ? 1 3 = 3
2
? 4 ? 1 3 = ? 8 1 5 ( m o d 2 3 ) ;
a n d
y
3
= 3 ( 4 ? 1 5 ) ? 7 = ? 4 0 6 ( m o d 2 3 )
H e n c e P + Q = ( 1 5 ; 6 )
-
7/30/2019 Elliptic Curve Digital Signature Algorithm
16/55
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A ) 1 4
2 . L e t P = ( 4 ; 7 ) . T h e n 2 P = P + P = ( x
3
; y
3
) i s c o m p u t e d a s f o l l o w s :
x
3
=
3 ( 4
2
) + 1
1 4
2
? 8 = 1 5
2
? 8 = 2 1 7 1 0 ( m o d 2 3 ) ;
a n d
y
3
= 1 5 ( 4 ? 1 0 ) ? 7 = ? 9 7 1 8 ( m o d 2 3 )
H e n c e 2 P = ( 1 0 ; 1 8 ) .
4 . 2 E l l i p t i c C u r v e s O v e r F
2
m
A n e l l i p t i c c u r v e E o v e r F
2
m
i s d e n e d b y a n e q u a t i o n o f t h e f o r m
y
2
+ x y = x
3
+ a x
2
+ b ; ( 4 )
w h e r e a ; b 2 F
2
m
, a n d b 6= 0 . T h e s e t E ( F
2
m
) c o n s i s t s o f a l l p o i n t s ( x ; y ) , x 2 F
2
m
, y 2 F
2
m
, w h i c h
s a t i s f y t h e d e n i n g e q u a t i o n ( 4 ) , t o g e t h e r w i t h a s p e c i a l p o i n t O c a l l e d t h e p o i n t a t i n n i t y
E x a m p l e 6 ( e l l i p t i c c u r v e o v e r F
2
4
) C o n s i d e r F
2
4
a s r e p r e s e n t e d b y t h e i r r e d u c i b l e t r i n o m i a l
f ( x ) = x
4
+ x + 1 ( s e e E x a m p l e 2 o f S e c t i o n 3 ) . C o n s i d e r t h e e l l i p t i c c u r v e E : y
2
+ x y = x
3
+
4
x
2
+ 1
o v e r F
2
4 . ( I n t h e n o t a t i o n o f e q u a t i o n ( 4 ) , w e h a v e a =
4
a n d b = 1 . ) N o t e t h a t b 6= 0 , s o E i s
i n d e e d a n e l l i p t i c c u r v e . T h e p o i n t s i n E ( F
2
4 ) a r e O a n d t h e f o l l o w i n g :
( 0 ; 1 ) ( 1 ;
6
) ( 1 ;
1 3
) (
3
;
8
) (
3
;
1 3
) (
5
;
3
) (
5
;
1 1
) (
6
;
8
)
(
6
;
1 4
) (
9
;
1 0
) (
9
;
1 3
) (
1 0
; ) (
1 0
;
8
) (
1 2
; 0 ) (
1 2
;
1 2
)
A d d i t i o n F o r m u l a . A s w i t h e l l i p t i c c u r v e s o v e r F
p
, t h e r e i s a c h o r d - a n d - t a n g e n t r u l e f o r a d d i n g
p o i n t s o n a n e l l i p t i c c u r v e E ( F
2
m
) t o g i v e a t h i r d e l l i p t i c c u r v e p o i n t . T o g e t h e r w i t h t h i s a d d i t i o n
o p e r a t i o n , t h e s e t o f p o i n t s E ( F
2
m
) f o r m s a g r o u p w i t h O s e r v i n g a s i t s i d e n t i t y .
T h e a l g e b r a i c f o r m u l a f o r t h e s u m o f t w o p o i n t s a n d t h e d o u b l e o f a p o i n t a r e t h e f o l l o w i n g .
1 P + O = O + P = P f o r a l l P 2 E ( F
2
m
)
2 . I f P = ( x ; y ) 2 E ( F
2
m
) , t h e n ( x ; y ) + ( x ; x + y ) = O . ( T h e p o i n t ( x ; x + y ) i s d e n o t e d b y ? P ,
a n d i s c a l l e d t h e n e g a t i v e o f P ; o b s e r v e t h a t ? P i s i n d e e d a p o i n t o n t h e c u r v e . )
3 . ( P o i n t a d d i t i o n ) L e t P = ( x
1
; y
1
) 2 E ( F
2
m
) a n d Q = ( x
2
; y
2
) 2 E ( F
2
m
) , w h e r e P 6= Q
T h e n P + Q = ( x
3
; y
3
) , w h e r e
x
3
=
y
1
+ y
2
x
1
+ x
2
2
+
y
1
+ y
2
x
1
+ x
2
+ x
1
+ x
2
+ a
a n d
y
3
=
y
1
+ y
2
x
1
+ x
2
( x
1
+ x
3
) + x
3
+ y
1
-
7/30/2019 Elliptic Curve Digital Signature Algorithm
17/55
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A ) 1 5
4 . ( P o i n t d o u b l i n g ) L e t P = ( x
1
; y
1
) 2 E ( F
2
m
) , w h e r e P 6= ? P . T h e n 2 P = ( x
3
; y
3
) , w h e r e
x
3
= x
2
1
+
b
x
2
1
a n d
y
3
= x
2
1
+
x
1
+
y
1
x
1
x
3
+ x
3
E x a m p l e 7 ( e l l i p t i c c u r v e a d d i t i o n ) C o n s i d e r t h e e l l i p t i c c u r v e d e n e d i n E x a m p l e 6 .
1 . L e t P = (
6
;
8
) a n d Q = (
3
;
1 3
) . T h e n P + Q = ( x
3
; y
3
) i s c o m p u t e d a s f o l l o w s :
x
3
=
8
+
1 3
6
+
3
2
+
8
+
1 3
6
+
3
+
6
+
3
+
4
=
3
2
2
+
3
2
+
6
+
3
+
4
= 1
a n d
y
3
=
8
+
1 3
6
+
3
(
6
+ 1 ) + 1 +
8
=
3
2
(
1 3
) +
2
=
1 3
H e n c e P + Q = ( 1 ;
1 3
)
2 . L e t P = (
6
;
8
) . T h e n 2 P = P + P = ( x
3
; y
3
) i s c o m p u t e d a s f o l l o w s :
x
3
= (
6
)
2
+
1
(
6
)
2
=
1 2
+
3
=
1 0
a n d
y
3
= (
6
)
2
+
6
+
8
6
1 0
+
1 0
=
1 2
+
1 3
+
1 0
=
8
H e n c e 2 P = (
1 0
;
8
)
4 . 3 B a s i c F a c t s
G r o u p O r d e r . L e t E b e a n e l l i p t i c c u r v e o v e r a n i t e e l d F
q
. H a s s e ' s t h e o r e m s t a t e s t h a t t h e
n u m b e r o f p o i n t s o n a n e l l i p t i c c u r v e ( i n c l u d i n g t h e p o i n t a t i n n i t y ) i s # E ( F
q
) = q + 1 ? t w h e r e
t 2
p
q ; # E ( F
q
) i s c a l l e d t h e o r d e r o f E a n d t i s c a l l e d t h e t r a c e o f E . I n o t h e r w o r d s , t h e o r d e r
o f a n e l l i p t i c c u r v e E ( F
q
) i s r o u g h l y e q u a l t o t h e s i z e q o f t h e u n d e r l y i n g e l d .
G r o u p S t r u c t u r e E ( F
q
) i s a n a b e l i a n g r o u p o f r a n k 1 o r 2 . T h a t i s , E ( F
q
) i s i s o m o r p h i c
t o Z
n
1
Z
n
2
, w h e r e n
2
d i v i d e s n
1
, f o r u n i q u e p o s i t i v e i n t e g e r s n
1
a n d n
2
. H e r e , Z
n
d e n o t e s
t h e c y c l i c g r o u p o f o r d e r n . M o r e o v e r , n
2
d i v i d e s q ? 1 . I f n
2
= 1 , t h e n E ( F
q
) i s s a i d t o b e
c y c l i c . I n t h i s c a s e E ( F
q
) i s i s o m o r p h i c t o Z
n
1
, a n d t h e r e e x i s t s a p o i n t P 2 E ( F
q
) s u c h t h a t
E ( F
q
) = f k P : 0 k n
1
? 1 g ; s u c h a p o i n t i s c a l l e d a g e n e r a t o r o f E ( F
q
)
E x a m p l e 8 ( c y c l i c e l l i p t i c c u r v e ) C o n s i d e r t h e e l l i p t i c c u r v e E ( F
2 3
) d e n e d i n E x a m p l e 4 . S i n c e
# E ( F
2 3
) = 2 9 , w h i c h i s p r i m e , E ( F
2 3
) i s c y c l i c a n d a n y p o i n t o t h e r t h a n O i s a g e n e r a t o r o f E ( F
2 3
)
F o r e x a m p l e , P = ( 0 ; 2 ) i s a g e n e r a t o r a s t h e f o l l o w i n g s h o w s :
-
7/30/2019 Elliptic Curve Digital Signature Algorithm
18/55
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A ) 1 6
1 P = ( 0 ; 2 ) 2 P = ( 1 3 ; 1 2 ) 3 P = ( 1 1 ; 9 ) 4 P = ( 1 ; 1 2 ) 5 P = ( 7 ; 2 0 )
6 P = ( 9 ; 1 1 ) 7 P = ( 1 5 ; 6 ) 8 P = ( 1 4 ; 5 ) 9 P = ( 4 ; 7 ) 1 0 P = ( 2 2 ; 5 )
1 1 P = ( 1 0 ; 5 ) 1 2 P = ( 1 7 ; 9 ) 1 3 P = ( 8 ; 1 5 ) 1 4 P = ( 1 8 ; 9 ) 1 5 P = ( 1 8 ; 1 4 )
1 6 P = ( 8 ; 8 ) 1 7 P = ( 1 7 ; 1 4 ) 1 8 P = ( 1 0 ; 1 8 ) 1 9 P = ( 2 2 ; 1 8 ) 2 0 P = ( 4 ; 1 6 )
2 1 P = ( 1 4 ; 1 8 ) 2 2 P = ( 1 5 ; 1 7 ) 2 3 P = ( 9 ; 1 2 ) 2 4 P = ( 7 ; 3 ) 2 5 P = ( 1 ; 1 1 )
2 6 P = ( 1 1 ; 1 4 ) 2 7 P = ( 1 3 ; 1 1 ) 2 8 P = ( 0 ; 2 1 ) 2 9 P = O
5 E C D S A D o m a i n P a r a m e t e r s
T h e d o m a i n p a r a m e t e r s f o r E C D S A c o n s i s t o f a s u i t a b l y c h o s e n e l l i p t i c c u r v e E d e n e d o v e r a
n i t e e l d F
q
o f c h a r a c t e r i s t i c p , a n d a b a s e p o i n t G 2 E ( F
q
) . D o m a i n p a r a m e t e r s m a y e i t h e r b e
s h a r e d b y a g r o u p o f e n t i t i e s , o r s p e c i c t o a s i n g l e u s e r .
x 5 . 1 d e s c r i b e s t h e r e q u i r e m e n t s f o r w h a t c o n s t i t u t e s \ s u i t a b l e " d o m a i n p a r a m e t e r s . I n x 5 . 2 , a
p r o c e d u r e i s s p e c i e d f o r g e n e r a t i n g e l l i p t i c c u r v e s v e r i a b l y a t r a n d o m . x 5 . 3 o u t l i n e s a m e t h o d
f o r g e n e r a t i n g d o m a i n p a r a m e t e r s , w h i l e x 5 . 4 p r e s e n t s a p r o c e d u r e f o r v e r i f y i n g t h a t a g i v e n s e t o f
d o m a i n p a r a m e t e r s m e e t s a l l r e q u i r e m e n t s .
5 . 1 D o m a i n P a r a m e t e r s
I n o r d e r t o f a c i l i t a t e i n t e r o p e r a b i l i t y , s o m e r e s t r i c t i o n s a r e p l a c e d o n t h e u n d e r l y i n g e l d s i z e q a n d
t h e r e p r e s e n t a t i o n u s e d f o r t h e e l e m e n t s o f F
q
. M o r e o v e r , t o a v o i d s o m e s p e c i c k n o w n a t t a c k s ,
r e s t r i c t i o n s a r e p l a c e d o n t h e e l l i p t i c c u r v e a n d t h e o r d e r o f t h e b a s e p o i n t .
F i e l d R e q u i r e m e n t s . T h e o r d e r o f t h e u n d e r l y i n g n i t e e l d i s e i t h e r q = p , a n o d d p r i m e , o r
q = 2
m
, a p o w e r o f 2 . I n t h e c a s e q = p , t h e u n d e r l y i n g n i t e e l d i s F
p
, t h e i n t e g e r s m o d u l o p I n
t h e c a s e q = 2
m
, t h e u n d e r l y i n g n i t e e l d i s F
2
m
w h o s e e l e m e n t s a r e r e p r e s e n t e d w i t h r e s p e c t t o
a p o l y n o m i a l o r a n o r m a l b a s i s a s d e s c r i b e d i n x 3
E l l i p t i c C u r v e R e q u i r e m e n t s . I n o r d e r t o a v o i d P o l l a r d ' s r h o 7 3 ] a n d t h e P o h l i g - H e l l m a n 7 1 ]
a t t a c k s o n t h e e l l i p t i c c u r v e d i s c r e t e l o g a r i t h m p r o b l e m ( s e e x 8 . 1 ) , i t i s n e c e s s a r y t h a t t h e n u m b e r
o f F
q
- r a t i o n a l p o i n t s o n E b e d i v i s i b l e b y a s u c i e n t l y l a r g e p r i m e n . A N S I X 9 . 6 2 m a n d a t e s t h a t
n > 2
1 6 0
. H a v i n g x e d a n u n d e r l y i n g e l d F
q
, n s h o u l d b e s e l e c t e d t o b e a s l a r g e a s p o s s i b l e , i . e . ,
o n e s h o u l d h a v e n q , s o # E ( F
q
) i s a l m o s t p r i m e . I n t h e r e m a i n d e r o f t h i s p a p e r , w e s h a l l a s s u m e
t h a t n > 2
1 6 0
a n d t h a t n > 4
p
q . T h e c o - f a c t o r i s d e n e d t o b e h = # E ( F
q
) = n
S o m e f u r t h e r p r e c a u t i o n s s h o u l d b e e x e r c i s e d w h e n s e l e c t i n g t h e e l l i p t i c c u r v e . T o a v o i d t h e
r e d u c t i o n a l g o r i t h m s o f M e n e z e s , O k a m o t o a n d V a n s t o n e 5 5 ] a n d F r e y a n d R u c k 2 1 ] , t h e c u r v e
s h o u l d b e n o n - s u p e r s i n g u l a r ( i . e . , p s h o u l d n o t d i v i d e ( q + 1 ? # E ( F
q
) ) ) . M o r e g e n e r a l l y , o n e
s h o u l d v e r i f y t h a t n d o e s n o t d i v i d e q
k
? 1 f o r a l l 1 k C , w h e r e C i s l a r g e e n o u g h s o t h a t
i t i s c o m p u t a t i o n a l l y i n f e a s i b l e t o n d d i s c r e t e l o g a r i t h m s i n F
q
C
( C = 2 0 s u c e s i n p r a c t i c e 3 ] ) .
F i n a l l y , t o a v o i d t h e a t t a c k o f S e m a e v 8 2 ] , S m a r t 8 6 ] , a n d S a t o h a n d A r a k i 7 7 ] o n F
q
- a n o m a l o u s
c u r v e s , t h e c u r v e s h o u l d n o t b e F
q
- a n o m a l o u s ( i . e . , # E ( F
q
) 6= q )
A p r u d e n t w a y t o g u a r d a g a i n s t t h e s e a t t a c k s , a n d s i m i l a r a t t a c k s a g a i n s t s p e c i a l c l a s s e s o f
c u r v e s t h a t m a y b e d i s c o v e r e d i n t h e f u t u r e , i s t o s e l e c t t h e e l l i p t i c c u r v e E a t r a n d o m s u b j e c t t o
t h e c o n d i t i o n t h a t # E ( F
q
) i s d i v i s i b l e b y a l a r g e p r i m e | t h e p r o b a b i l i t y t h a t a r a n d o m c u r v e
-
7/30/2019 Elliptic Curve Digital Signature Algorithm
19/55
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A ) 1 7
s u c c u m b s t o t h e s e s p e c i a l - p u r p o s e a t t a c k s i s n e g l i g i b l e . A c u r v e c a n b e s e l e c t e d v e r i a b l y a t r a n d o m
b y c h o o s i n g t h e c o e c i e n t s o f t h e d e n i n g e l l i p t i c c u r v e e q u a t i o n a s t h e o u t p u t s o f a o n e - w a y
f u n c t i o n s u c h a s S H A - 1 a c c o r d i n g t o s o m e p r e - s p e c i e d p r o c e d u r e . A p r o c e d u r e f o r a c c o m p l i s h i n g
t h i s , s i m i l a r i n s p i r i t t o t h e m e t h o d g i v e n i n F I P S 1 8 6 6 0 ] f o r s e l e c t i n g D S A p r i m e s v e r i a b l y a t
r a n d o m , i s d e s c r i b e d i n x 5 . 2 .
S u m m a r y . T o s u m m a r i z e , d o m a i n p a r a m e t e r s a r e c o m p r i s e d o f :
1 . a e l d s i z e q , w h e r e e i t h e r q = p , a n o d d p r i m e , o r q = 2
m
;
2 . a n i n d i c a t i o n F R ( e l d r e p r e s e n t a t i o n ) o f t h e r e p r e s e n t a t i o n u s e d f o r t h e e l e m e n t s o f F
q
;
3 . ( o p t i o n a l ) a b i t s t r i n g s e e d E o f l e n g t h a t l e a s t 1 6 0 b i t s , i f t h e e l l i p t i c c u r v e w a s g e n e r a t e d i n
a c c o r d a n c e w i t h t h e m e t h o d d e s c r i b e d i n x 5 . 2 ;
4 . t w o e l d e l e m e n t s a a n d b i n F
q
w h i c h d e n e t h e e q u a t i o n o f t h e e l l i p t i c c u r v e E o v e r F
q
( i . e . ,
y
2
= x
3
+ a x + b i n t h e c a s e p > 3 , a n d y
2
+ x y = x
3
+ a x
2
+ b i n t h e c a s e p = 2 ) ;
5 . t w o e l d e l e m e n t s x
G
a n d y
G
i n F
q
w h i c h d e n e a n i t e p o i n t G = ( x
G
; y
G
) o f p r i m e o r d e r i n
E ( F
q
) ;
6 . t h e o r d e r n o f t h e p o i n t G , w i t h n > 2
1 6 0
a n d n > 4
p
q ; a n d
7 . t h e c o f a c t o r h = # E ( F
q
) = n
5 . 2 G e n e r a t i n g a n E l l i p t i c C u r v e V e r i a b l y a t R a n d o m
T h i s s u b s e c t i o n d e s c r i b e s t h e m e t h o d t h a t i s u s e d f o r g e n e r a t i n g a n e l l i p t i c c u r v e v e r i a b l y a t
r a n d o m . T h e d e n i n g p a r a m e t e r s o f t h e e l l i p t i c c u r v e a r e d e n e d t o b e o u t p u t s o f t h e o n e - w a y
h a s h f u n c t i o n S H A - 1 ( a s s p e c i e d i n F I P S 1 8 0 - 1 6 3 ] ) . T h e i n p u t s e e d t o S H A - 1 t h e n s e r v e s a s
p r o o f ( u n d e r t h e a s s u m p t i o n t h a t S H A - 1 c a n n o t b e i n v e r t e d ) t h a t t h e e l l i p t i c c u r v e w a s i n d e e d
g e n e r a t e d a t r a n d o m . T h i s p r o v i d e s s o m e a s s u r a n c e t o t h e u s e r o f t h e e l l i p t i c c u r v e t h a t t h e e n t i t y
w h o g e n e r a t e d t h e e l l i p t i c c u r v e d i d n o t i n t e n t i o n a l l y c o n s t r u c t a \ w e a k " c u r v e w h i c h i t c o u l d
s u b s e q u e n t l y e x p l o i t t o r e c o v e r t h e u s e r ' s p r i v a t e k e y s . U s e o f t h i s g e n e r a t i o n m e t h o d c a n a l s o h e l p
m i t i g a t e c o n c e r n s r e g a r d i n g t h e p o s s i b l e f u t u r e d i s c o v e r y o f n e w a n d r a r e c l a s s e s o f w e a k e l l i p t i c
c u r v e s , a s s u c h r a r e c u r v e s w o u l d e s s e n t i a l l y n e v e r b e g e n e r a t e d .
5 . 2 . 1 T h e C a s e q = p
T h e f o l l o w i n g n o t a t i o n i s u s e d : t = d l o g
2
p e , s = b ( t ? 1 ) = 1 6 0 c a n d v = t ? 1 6 0 s
A l g o r i t h m 1 : G e n e r a t i n g a R a n d o m E l l i p t i c C u r v e O v e r F
p
I n p u t : A e l d s i z e p , w h e r e p i s a n o d d p r i m e .
O u t p u t : A b i t s t r i n g s e e d E o f l e n g t h a t l e a s t 1 6 0 b i t s a n d e l d e l e m e n t s a ; b 2 F
p
w h i c h d e n e
a n e l l i p t i c c u r v e E o v e r F
p
1 . C h o o s e a n a r b i t r a r y b i t s t r i n g s e e d E o f l e n g t h g 1 6 0 b i t s .
2 . C o m p u t e H = S H A - 1 ( s e e d E ) , a n d l e t c
0
d e n o t e t h e b i t s t r i n g o f l e n g t h v b i t s o b t a i n e d b y
t a k i n g t h e v r i g h t m o s t b i t s o f H
-
7/30/2019 Elliptic Curve Digital Signature Algorithm
20/55
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A ) 1 8
3 . L e t W
0
d e n o t e t h e b i t s t r i n g o f l e n g t h v b i t s o b t a i n e d b y s e t t i n g t h e l e f t m o s t b i t o f c
0
t o 0 .
( T h i s e n s u r e s t h a t r < p )
4 . L e t z b e t h e i n t e g e r w h o s e b i n a r y e x p a n s i o n i s g i v e n b y t h e g - b i t s t r i n g s e e d E
5 . F o r i f r o m 1 t o s d o :
4 . 1 . L e t s
i
b e t h e g - b i t s t r i n g w h i c h i s t h e b i n a r y e x p a n s i o n o f t h e i n t e g e r ( z + i ) m o d 2
g
4 . 2 . C o m p u t e W
i
= S H A - 1 ( s
i
)
6 . L e t W b e t h e b i t s t r i n g o b t a i n e d b y t h e c o n c a t e n a t i o n o f W
0
; W
1
; : : : ; W
s
a s f o l l o w s : W =
W
0
k W
1
k k W
s
7 . L e t r b e t h e i n t e g e r w h o s e b i n a r y e x p a n s i o n i s g i v e n b y W
8 . I f r = 0 o r i f 4 r + 2 7 0 ( m o d p ) t h e n g o t o s t e p 1 .
9 . C h o o s e a r b i t r a r y i n t e g e r s a ; b 2 F
p
, n o t b o t h 0 , s u c h t h a t r b
2
a
3
m o d p . ( F o r e x a m p l e ,
o n e m a y t a k e a = r a n d b = r )
1 0 . T h e e l l i p t i c c u r v e c h o s e n o v e r F
p
i s E : y
2
= x
3
+ a x + b
1 1 . O u t p u t ( s e e d E , a , b )
I s o m o r p h i s m C l a s s e s o f E l l i p t i c C u r v e s O v e r F
p
. T w o e l l i p t i c c u r v e s E
1
: y
2
= x
3
+ a
1
x + b
1
a n d E
2
: y
2
= x
3
+ a
2
x + b
2
d e n e d o v e r F
p
a r e i s o m o r p h i c o v e r F
p
i f a n d o n l y i f t h e r e e x i s t s u 2 F
p
,
u 6= 0 , s u c h t h a t a
1
= u
4
a
2
a n d b
1
= u
6
b
2
. ( I s o m o r p h i c e l l i p t i c c u r v e s a r e e s s e n t i a l l y t h e s a m e . I n
p a r t i c u l a r , i f E
1
i s i s o m o r p h i c t o E
2
, t h e n t h e g r o u p s E
1
( F
p
) a n d E
2
( F
p
) a r e i s o m o r p h i c a s a b e l i a n
g r o u p s . ) O b s e r v e t h a t i f E
1
a n d E
2
a r e i s o m o r p h i c a n d b
1
6= 0 ( s o b
2
6= 0 ) , t h e n
a
3
1
b
2
1
=
a
3
2
b
2
2
. T h e
s i n g u l a r e l l i p t i c c u r v e s , i . e . , t h e c u r v e s E : y
2
= x
3
+ a x + b f o r w h i c h 4 a
3
+ 2 7 b
2
0 ( m o d p ) ,
a r e p r e c i s e l y t h o s e w h i c h e i t h e r h a v e a = 0 a n d b = 0 , o r
a
3
b
2
= ?
2 7
4
I f r 2 F
p
, r 6= 0 , r 6= ?
2 7
4
,
t h e n t h e r e a r e p r e c i s e l y 2 i s o m o r p h i s m c l a s s e s o f c u r v e s E : y
2
= x
3
+ a x + b w i t h
a
3
b
2
r ( m o d p )
H e n c e , t h e r e a r e e s s e n t i a l l y o n l y 2 c h o i c e s f o r ( a ; b ) i n s t e p 9 o f A l g o r i t h m 1 . T h e c o n d i t i o n s r 6= 0
a n d r 6= ?
2 7
4
i m p o s e d i n s t e p 8 e n s u r e t h e e x c l u s i o n o f s i n g u l a r e l l i p t i c c u r v e s . F i n a l l y , w e m e n t i o n
t h a t t h i s m e t h o d o f g e n e r a t i n g c u r v e s w i l l n e v e r p r o d u c e t h e e l l i p t i c c u r v e s w i t h a = 0 , b 6= 0 ,
n o r t h e e l l i p t i c c u r v e s w i t h a 6= 0 , b = 0 . T h i s i s n o t a c o n c e r n b e c a u s e s u c h c u r v e s c o n s t i t u t e
a n e g l i g i b l e f r a c t i o n o f a l l e l l i p t i c c u r v e s , a n d t h e r e f o r e a r e u n l i k e l y t o e v e r b e g e n e r a t e d b y a n y
m e t h o d w h i c h s e l e c t s a n e l l i p t i c c u r v e u n i f o r m l y a t r a n d o m .
T h e T w i s t o f a n E l l i p t i c C u r v e O v e r F
p
. T h e n o n - i s o m o r p h i c e l l i p t i c c u r v e s E
1
: y
2
=
x
3
+ a x + b a n d E
2
: y
2
= x
3
+ a c
2
x
2
+ b c
3
, w h e r e c 2 F
p
i s a q u a d r a t i c n o n - r e s i d u e m o d u l o p , a r e
s a i d t o b e t w i s t s o f e a c h o t h e r . N o t e t h a t b o t h t h e s e c u r v e s h a v e t h e s a m e r v a l u e . T h e i r o r d e r s
a r e r e l a t e d b y t h e e q u a t i o n # E
1
( F
p
) + # E
2
( F
p
) = 2 p + 2 . T h u s , i f o n e i s a b l e t o c o m p u t e # E
1
( F
p
) ,
t h e n o n e c a n e a s i l y d e d u c e # E
2
( F
p
)
A l g o r i t h m 2 : V e r i f y i n g t h a t a n E l l i p t i c C u r v e w a s R a n d o m l y G e n e r a t e d O v e r F
p
I n p u t : A e l d s i z e p ( a p r i m e ) , a b i t s t r i n g s e e d E o f l e n g t h g 1 6 0 b i t s , a n d e l d e l e m e n t s
a ; b 2 F
p
w h i c h d e n e a n e l l i p t i c c u r v e E : y
2
= x
3
+ a x + b o v e r F
p
O u t p u t : A c c e p t a n c e o r r e j e c t i o n t h a t E w a s r a n d o m l y g e n e r a t e d u s i n g A l g o r i t h m 1 .
-
7/30/2019 Elliptic Curve Digital Signature Algorithm
21/55
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A ) 1 9
1 . C o m p u t e H = S H A - 1 ( s e e d E ) , a n d l e t c
0
d e n o t e t h e b i t s t r i n g o f l e n g t h v b i t s o b t a i n e d b y
t a k i n g t h e v r i g h t m o s t b i t s o f H
2 . L e t W
0
d e n o t e t h e b i t s t r i n g o f l e n g t h v b i t s o b t a i n e d b y s e t t i n g t h e l e f t m o s t b i t o f c
0
t o 0 .
3 . L e t z b e t h e i n t e g e r w h o s e b i n a r y e x p a n s i o n i s g i v e n b y t h e g - b i t s t r i n g s e e d E
4 . F o r i f r o m 1 t o s d o :
4 . 1 . L e t s
i
b e t h e g - b i t s t r i n g w h i c h i s t h e b i n a r y e x p a n s i o n o f t h e i n t e g e r ( z + i ) m o d 2
g
4 . 2 . C o m p u t e W
i
= S H A - 1 ( s
i
)
5 . L e t W b e t h e b i t s t r i n g o b t a i n e d b y t h e c o n c a t e n a t i o n o f W
0
; W
1
; : : : ; W
s
a s f o l l o w s : W
0
=
W
0
k W
1
k k W
s
6 . L e t r
0
b e t h e i n t e g e r w h o s e b i n a r y e x p a n s i o n i s g i v e n b y W
0
7 . I f r
0
b
2
a
3
( m o d p ) t h e n a c c e p t ; o t h e r w i s e r e j e c t .
5 . 2 . 2 T h e C a s e q = 2
m
T h e f o l l o w i n g n o t a t i o n i s u s e d : s = b ( m ? 1 ) = 1 6 0 c a n d v = m ? 1 6 0 s
A l g o r i t h m 3 : G e n e r a t i n g a R a n d o m E l l i p t i c C u r v e O v e r F
2
m
I n p u t : A e l d s i z e q = 2
m
O u t p u t : A b i t s t r i n g s e e d E o f l e n g t h a t l e a s t 1 6 0 b i t s a n d e l d e l e m e n t s a ; b 2 F
2
m
w h i c h d e n e
a n e l l i p t i c c u r v e E o v e r F
2
m
1 . C h o o s e a n a r b i t r a r y b i t s t r i n g s e e d E o f l e n g t h g 1 6 0 b i t s .
2 . C o m p u t e H = S H A - 1 ( s e e d E ) , a n d l e t b
0
d e n o t e t h e b i t s t r i n g o f l e n g t h v b i t s o b t a i n e d b y
t a k i n g t h e v r i g h t m o s t b i t s o f H
3 . L e t z b e t h e i n t e g e r w h o s e b i n a r y e x p a n s i o n i s g i v e n b y t h e g - b i t s t r i n g s e e d E
4 . F o r i f r o m 1 t o s d o :
4 . 1 . L e t s
i
b e t h e g - b i t s t r i n g w h i c h i s t h e b i n a r y e x p a n s i o n o f t h e i n t e g e r ( z + i ) m o d 2
g
4 . 2 . C o m p u t e b
i
= S H A - 1 ( s
i
)
5 . L e t b b e t h e e l d e l e m e n t o b t a i n e d b y t h e c o n c a t e n a t i o n o f b
0
; b
1
; : : : ; b
s
a s f o l l o w s : b =
b
0
k b
1
k k b
s
6 . I f b = 0 t h e n g o t o s t e p 1 .
7 . L e t a b e a n a r b i t r a r y e l e m e n t o f F
2
m
8 . T h e e l l i p t i c c u r v e c h o s e n o v e r F
2
m
i s E : y
2
+ x y = x
3
+ a x
2
+ b
9 . O u t p u t ( s e e d E , a , b )
I s o m o r p h i s m C l a s s e s o f E l l i p t i c C u r v e s O v e r F
2
m
. T w o e l l i p t i c c u r v e s E
1
: y
2
+ x y =
x
3
+ a
1
x
2
+ b
1
a n d E
2
: y
2
+ x y = x
3
+ a
2
x
2
+ b
2
d e n e d o v e r F
2
m
a r e i s o m o r p h i c o v e r F
2
m
i f
a n d o n l y i f b
1
= b
2
a n d T r ( a
1
) = T r ( a
2
) , w h e r e T r i s t h e t r a c e f u n c t i o n T r : F
2
m
? ! F
2
d e n e d
-
7/30/2019 Elliptic Curve Digital Signature Algorithm
22/55
T h e E l l i p t i c C u r v e D i g i t a l S i g n a t u r e A l g o r i t h m ( E C D S A ) 2 0
b y T r ( ) = +
2
+
2
2
+ +
2
m 1
. ( I s o m o r p h i c e l l i p t i c c u r v e s a r e e s s e n t i a l l y t h e s a m e . I n
p a r t i c u l a r , i f E
1
i s i s o m o r p h i c t o E
2
, t h e n t h e g r o u p s E
1
( F
2
m
) a n d E
2
( F
2
m
) a r e i s o m o r p h i c a s
a b e l i a n g r o u p s . ) I t f o l l o w s t h a t a s e t o f r e p r e s e n t a t i v e s o f t h e i s o m o r p h i s m c l a s s e s o f e l l i p t i c c u r v e s
o v e r F
2
m
i s f y
2
+ x y = x
3
+ a x
2
+ b b 2 F
2
m
; b 6= 0 ; a 2 f 0 ; g g , w h e r e 2 F
2
m
i s a x e d e l e m e n t
w i t h T r ( ) = 1 ( i f m i s o d d , w e c a n t a k e = 1 ) . H e