7-26
MPC180E Security Processor User’s Manual
PRELIMINARY—SUBJECT TO CHANGE WITHOUT NOTICE
RSA Routines
Figure 7-17. Integer Modular Exponentiation Register Usage
Table 7-18. Integer Modular Exponentiation
Integer Modular Exponentiation
Computation
S = (A’ * R
-1
)
EXP
mod N
Entry name
expA
Entry address
0x007(expA)
Pre-conditions
A0-3 = A’ (the value A in the Montgomery residue system)
N0-3 = modulus
Run-time
conditions
EXP(k) = msb exponent word (provided in 8-bit words throughout the exponentiation);
first word provides following routine invocation per ERDY assertion.
Post-conditions
B0-3 = S
Unless explicitly noted, all other registers are not guaranteed to be any particular value.
Special
conditions
A, N, and B have the lsb digits in A0, N0, and B0, respectively. As required, data will occupy the
more significant memory blocks.
N1
N2
N3
A0
A1
A2
A3
B0
B1
B2
B3
Initial Condition
Final Condition
etc.
etc.
N (bits 1023:512)
etc.
N0
S (bits 511:0)
modulus N (bits 511:0)
modulus N (bits 511:0)
A’ (bits 1023:512)
A’ (bits 511:0)
etc.
A’ (bits 511:0)
A’ (bits 1023:512)
S (bits 1023:512)
etc.
etc.
N (bits 1023:512)
etc.
XYZ
F2M
?
exponent (run-time)
EXP(k)
Modsize
EXP(k)_SIZE
‘0’ - integer-mod-n enabled
same
set
set
same
same
ECC
same
‘0’ - ECC disabled
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
.
..