Chapter 7. Public Key Execution Unit
7-11
PRELIMINARY—SUBJECT TO CHANGE WITHOUT NOTICE
ECC Routines
7.3.2 ECC F
p
Point Add
This function is extensively utilized by the point multiply routine. However, its value as a
stand-alone routine to the host processor is extremely limited. As a result, the information
provided on the routine is primarily for testing and debug purposes.
Figure 7-5. ECC F
p
Point Add Register Usage
Table 7-6. ECC F
p
Point Add
F
p
Point Add
Computation
R = P + Q, where R
≡
(X
3
,Y
3
,Z
3
), P
≡
(X
1
,Y
1
, Z
1
), and Q
≡
(X
2
,Y
2
, Z
2
)
Entry name
FpaddPtoQ
Entry address
0x002(FpaddPtoQ)
Pre-conditions
A0 = X’
1
(projective coordinate in Montgomery residue system)
A1 = Y’
1
(projective coordinate in Montgomery residue system)
A2 = Z’
1
(projective coordinate in Montgomery residue system)
A3 = a’ (elliptic curve parameter in Montgomery residue system)
B0 = b’ (elliptic curve parameter in Montgomery residue system)
B1 = X’
2
(projective coordinate in Montgomery residue system)
B2 = Y’
2
(projective coordinate in Montgomery residue system)
B3 = Z’
2
(projective coordinate in Montgomery residue system)
N0 = prime p (modulus) of the ECC system
Post-conditions
A0 = X’
1
A1 = Y’
1
A2 = Z’
1
A3 = a’
B0 = b’
B1 = X’
3
B2 = Y’
3
B3 = Z’
3
Unless explicitly noted, all other registers are not guaranteed to be any particular value.
Special
conditions
All variables followed with the tick mark (‘) indicate it is in the Montgomery residue system.
N1
N2
N3
A0
A1
A2
A3
B0
B1
B2
B3
Initial Condition
Final Condition
a’
Z’
1
?
?
?
N0
b’
b’
modulus N
modulus N
Y’
1
X’
1
a’
X’
1
Y’
1
X’
3
Y’
3
Z’
3
X’
2
Z’
1
Y’
2
Z’
2
XYZ
F2M
EXP(k)
‘0’ - F
p
enabled
same
Modsize
EXP(k)_SIZE
set
same
ECC
same
‘1’ - ECC enabled
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
.
..
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
.
..