Freescale Semiconductor
Technical Information Center, CH370
1300 N. Alma School Road
Chandler, Arizona 85224
(800) 521-6274
480-768-2130
support@freescale.com
Japan:
Freescale Semiconductor Japan Ltd.
Headquarters
ARCO Tower 15F
1-8-1, Shimo-Meguro, Meguro-ku
Tokyo 153-0064, Japan
0120 191014
+81 3 5437 9125
support.japan@freescale.com
Asia/Pacific:
Freescale Semiconductor Hong Kong Ltd.
Technical Information Center
2 Dai King Street
Tai Po Industrial Estate,
Tai Po, N.T., Hong Kong
+800 2666 8080
support.asia@freescale.com
For Literature Requests Only:
Freescale Semiconductor
Literature Distribution Center
P.O. Box 5405
Denver, Colorado 80217
(800) 441-2447
303-675-2140
Fax: 303-675-2150
LDCForFreescaleSemiconductor
@hibbertgroup.com
Information in this document is provided solely to enable system and software
implementers to use Freescale Semiconductor products. There are no express or
implied copyright licenses granted hereunder to design or fabricate any integrated
circuits or integrated circuits based on the information in this document.
Freescale Semiconductor reserves the right to make changes without further notice to
any products herein. Freescale Semiconductor makes no warranty, representation or
guarantee regarding the suitability of its products for any particular purpose, nor does
Freescale Semiconductor assume any liability arising out of the application or use of
any product or circuit, and specifically disclaims any and all liability, including without
limitation consequential or incidental damages. “Typical” parameters which may be
provided in Freescale Semiconductor data sheets and/or specifications can and do
vary in different applications and actual performance may vary over time. All operating
parameters, including “Typicals” must be validated for each customer application by
customer’s technical experts. Freescale Semiconductor does not convey any license
under its patent rights nor the rights of others. Freescale Semiconductor products are
not designed, intended, or authorized for use as components in systems intended for
surgical implant into the body, or other applications intended to support or sustain life,
or for any other application in whi ch the failure of the Freescale Semiconductor produc t
could create a situation where personal injury or death may occur. Should Buyer
purchase or use Freescale Semiconductor products for any such unintended or
unauthorized application, Buyer shall indemnify and hold Freescale Semiconductor
and its officers, employees, subsidiaries, affiliates, and distributors har mless against all
claims, costs, damages, and expenses, and reasonable attor ney fees arising out of,
directly or indirectly, any claim of personal injury or death associated with such
unintended or unauthorized use, even if such claim alleges that Freescale
Semiconductor was negligent regarding the d esign or manufacture of the part.
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other
product or service names are the property of their respective owners.
This chapter provides an overview of the MPC184 Security Processor, including a brief
development history, target applications, key features, typical system architecture, device
architectural overview, and a performance summary.
1.1Development History
The MPC184 belongs to the Smart Networks platform’s S1 family of security processors
developed for the commercial networking market. This product fami ly is derived from security
technologies Motorola has developed over the last 30 years, primarily for government
applications. The fifth-generation execution units (EU) have been proven in Motorola
semi-custom ICs and in other members of the S1 family, including the MPC180, MPC190, and
MPC185.
1.2Typical Applications
The MPC184 is suited for applications such as the following:
•SOHO VPN routers
•Customer Premise Equipment
•eCommerce servers
•Wireless Access Points
•Dedicated Encryption Modules
1.3Features
The MPC184 is a flexible and powerful addition to any networking or computing system using the
PowerQUICC™ line of integrated communications processors, or any system supporting 32-bit
PCI. The MPC184 is designed to off load computationally intensive security functions, such as
key generation and exchange, authentication, and bulk encryption from the host processor .
The MPC184 is optimized to process all the algorithms associated with IPSec, IKE, WTLS/WAP,
SSL/TLS, DOCSIS BPI+, 802.16, and 802.11(WEP). In addition, the security co-processors are
the only devices on the market capable of executing Elliptic Curve Cryptography which is
especially important for secure wireless communications.
•Public Key Execution Unit (PKEU) that supports the following:
— RSA and Diffie-Hellman
– Programmable field size up to 2048-bits
— Elliptic curve cryptography
m and F(p) modes
–F
2
– Programmable field size up to 511-bits
•Data Encryption Standard Execution Unit (DEU)
— DES, 3DES
— Two key (K1, K2, K1) or Three Key (K1, K2, K3)
— ECB and CBC modes for both DES and 3DES
•Advanced Encryption Standard Unit (AESU)
— Implements the Rinjdael symmetric key cipher
— Key lengths of 128, 192, and 256 bits.Two key
— ECB, CBC, and Counter modes
•ARC Four Execution Unit (AFEU)
— Implements a stream cipher compatible with the RC4 algorithm
— 40- to 128-bit programmable key
•Message Digest Execution Unit (MDEU)
— SHA with 160-bit or 256-bit message digest
— MD5 with 128-bit message digest
— HMAC with either algorithm
•Random number generator (RNG)
•8xx compliant external bus interface, with master/slave logic.
— 32-bit address/32 -bit data
— up to 66MHz operation
•Optional PCI 2.2 compliant external bus interface, with master/slave logic.
— 32-bit address/data
— up to 66MHz operation
•4 Crypto-channels, each supporting multi-command descriptor chains
— Static and/or dynamic assignment of crypto-execution units via an integrated controller
— Buffer size of 512 Bytes for each execution unit, with flow control for large data sizes
•8KB of internal scratchpad memory for key, IV and context storage
The MPC184 is designed to integrate easily into any system using the 8xx or PCI bus protocol.
The MPC184 is ideal in any system using a PowerQUICC communications processor (as shown
in Figure 1) or any system using PCI. The ability of the MPC184 to be a master on the 8xx bus
allows the co-processor to offload the data mov ement bottleneck normally as sociated with slave
devices.
The host processor accesses the MPC184 through its device drivers using system memory for data
storage. The MPC184 resides in the memory map of the processor, therefore when an application
requires cryptographic functions, it simply creates descriptors for the MPC184 which define the
cryptographic function to be performed and the location of the data. The MPC184’s mastering
capability permits the host processor to set up a crypto-channel with a few short register writes,
leaving the MPC184 to perform reads and writes on system memory to complete the required task.
EEPROM
Main
Memory
MPC184
8xx Bus
MPC860
I/O or Network
Interface
Figure 1-1. MPC184 Connected to PowerQuicc 8xx Bus
Figure 1-2. MPC184 Connected to host CPU via PCI bus
1.5Architectural Overview
A block diagram of the MPC184 internal architecture is shown in Figure 1-1. The mode selectable
8xx/PCI bus interface module is designed to transfer 32-bit words between the external bus and
any register inside the MPC184. An operation begins with a write of a pointer to a crypto-channel
fetch register which points to a data packet descriptor. The channel then requests the descriptor and
decodes the operation to be performed. The channel then makes requests of the controller to assign
crypto execution units and fetch the keys, IV’s and data needed to perform the give n operation.
The controller satisfies the requests by assigning execution units to the channel and by making
requests to the master interface per the progr ammable priority scheme. As data is processed, it is
written to the individual execution units output buffer and then back to system memory via the bus
interface module.
As an IPSec accelerator, the MPC184’s controller has been designed for easy use and integration
with existing systems and software. All cryptographic functions are accessible through data packet
descriptors, some of which have been defined as multifunction to facilitate IPSec applications. A
data packet descriptor is diagrammed in Table 1-1.
Table 1-1. Example Data Packet Descriptor
Field NameValue/TypeDescription
DPD_DES_CTX_CRYPTTBDRepresentative header for DES using Context to Encrypt
LEN_CTXIN
PTR_CTXIN
LEN_KEY
PTR_KEY
LEN_DATAIN
PTR_DATAIN
LEN_DATAOUT
PTR_DATAOUT
LEN_CTXOUT
PTR_CTXOUT
Nul length
Nul pointer
Nul length
Nul pointer
Length
Pointer
Length
Pointer
Length
Pointer
Length
Pointer
Length
Pointer
Length
Pointer
Length
Pointer
Number of bytes to be written
Pointer to Context (IV) to be written into DES engine
Number of bytes in key
Pointer to block cipher key
Number of bytes of data to be ciphered
Pointer to data to perform cipher upon
Number of bytes of data after ciphering
Pointer to location where cipher output is to be written
Length of output Context (IV)
Pointer to location where altered Context is to be written
Zeroes for fixed length descriptor filter
Zeroes for fixed length descriptor filter
Zeroes for fixed length descriptor filter
Zeroes for fixed length descriptor filter
PTR_NEXTPointerPointer to next data packet descriptor
Each data packet descriptor contains the following:
•Header—The header describes the required services and encodes information that indicates
which EUs to use and which modes to set.
•Seven data length/data pointer pairs—The data length indicates the number of contiguous
bytes of data to be transferred. The data pointer indicates the starting address of the data,
key, or context in system memory .
•Next descriptor pointer
A data packet descriptor ends with a pointer to the next data packet descriptor. Therefore, once a
descriptor is processed and if the value of this pointer is non-zero, it is used to request a burst read
of the next descriptor.
Processing of the next descriptor (and whether or not a done signal is generated) is determined by
the programming of crypto-channel’s configuration register. Two modes of operation are
supported:
•Signal done at end of descriptor
•Signal done at end of descriptor chain
The crypto-channel can signal done via an interrupt or by a write-back of the descriptor header
after processing a data packet descriptor. The value written back is identical to that of the header,
with the exception that a DONE field is set.
Occasionally, a descriptor field may not be applicable to the requested service. For example, if
using DES in ECB mode, the contents of the IV field do not affect the result of the DES
computation. Therefore, when processing data packet descriptors, the crypto-channel skips any
pointer that has an associated length of zero.
1.6.1External Bus Interface
The External Bus Interface (EBI) manages communication between the MPC184’s internal
execution units and the external bus. The interface is mode selectable between the PCI 2.2 bus
protocol, and the 8xx bus protocols, used by the PowerQuicc family of integrated communications
processors. The MPC184 is unique in its ability to act as a bus master on the 8xx bus. All on-chip
resources are memory mapped, and the target accesses and initiator writes from the MPC184 must
be addressed on word boundaries. The MPC184 will perform initiator reads on byte boundaries
and will adjust the data to place on word boundaries as appropriate. The bus mastering interface
allows the MPC184 t o off-load both crypto processing and data movement from the processor,
freeing the CPU for other networking system functions, allowing the chip set to achieve best in
class performance levels.
The MPC184 controller man ages on-chip resources, including ind ividual exe cution units (EUs),
FIFOs, the EBI, and the internal buses that connect all the various modules. The controller receives
service requests from the EBI and variou s crypto-channels, and schedules the required activities.
The controller can configure each of the on-chip resources in three modes:
•Host-controlled mode—The host is directly responsible for all data movement into and out
of the resource.
•Static mode—The user can reserve a specific execution unit to a specific crypto-channel.
•Dynamic mode—A crypto channel can request a particular service from any available
execution unit.
1.6.3Host-Managed Register Access
All EUs can be used entirely through register read/write a ccess. It is strongly recommend ed that
read/write access only be performed on a EU that is statically assigned to an idle crypto-channel.
Such an assignment is the only method for the host to inform the controller that a particular EU is
in use.
1.6.4Static EU Access
The Controller can be configured to reserve one or more EUs to a particular crypto-channel. Doing
so permits locking the EU to a particular context. When in this mode, the crypto-channel c an be
used by multiple descriptors representing the same context without unloading and reloading the
context at the end of each descriptor. This mode presents considerable performance improvement
over dynamic access, but only when the MPC184 is supporting a single context (or a single session
is being streamed.)
1.6.5Dynamic EU Access
Processing begins when a data packet descriptor pointer is written to the next descriptor pointer
register of one of the crypto-channels. Prior to fetching the data referred to by the descriptor and
based on the services requested by the descriptor header in the descriptor buffer, the controller
dynamically reserves usage of an EU to the crypto-channel. If all appropriate EUs are already
dynamically reserved by other crypto-channels, the crypto-channel stalls and waits to fetch data
until the appropriate EU is available.
If multiple crypto-channels simultaneously request the same EU, the EU is assigned on a
round-robin basis. Once the required EU has been reserved, the crypto-channel fetches and loads
the appropriate data packets, operates the EU, unloads data to system memory , and releases the EU
for use by another crypto-channel. If a crypto-channel attempts to reserve a statically-assigned EU
(and no appropriate EUs are available for dynamic assignment), an interrupt is generated and
status indicates illegal access. When dynamic assignment is used, each encryption/decryption
packet must contain context that is particular to the context being supported.
1.6.6Crypto-Channels
The MPC184 includes four crypto-channels that manage data and EU function. Each
crypto-channel consists of the following:
•Control registers containing information about the transaction in process
•A status register containing an indication of the last unfulfilled bus request
•A pointer register indicating the location of a new descriptor to fetch
•Buffer memory used to store the active data packet descriptor (See Section 1.6, “Data
Packet Descriptors.”)
Crypto-channels analyze the data packet descriptor header and request from the controller the first
required cryptographic service. The controller implements a programmable prioritization scheme
that allows the user to dictate the order in which the four crypto-channels are serviced. After the
controller grants access to the required EU, the crypto-channel and the controller perform the
following steps:
1. Set the appropriate Mode bits available in the EU for the required service.
2. Fetch context and other parameters as indicated in the data packet descriptor buffer and
use these to program the EU.
3. Fetch data as indicated and place in either the EU’s input FIFO or the EU itself (as
appropriate).
4. Wait for EU to complete processing.
5. Upon completion, unload results and context and write them to external memory as
indicated by the data packet descriptor buffer.
6. If multiple services requested, go back to step 2.
7. Reset the appropriate EU if it is dynamically assigned. Note that if statically assigned, a
EU is reset only upon direct command written to the MPC184.
8. Perform descriptor completion notification as appropriate. This notification comes in one
of two forms—interrupt or header writeback modification—and can occur either at the
end of every descriptor or at the end of a descriptor chain.
1.7Execution Units (EUs)
“Execution unit” is the generic term for a functional block that performs the mathematical
permutations required by protocols used in cryptographic processing. The EUs are compatible
with IPSec, WAP/WTLS, IKE, SSL/TLS and 802.11i processing, and can work together to
perform high level cryptographic tasks.The MPC184’s execution units are as follows:
•PKEU for computing asymmetric key mathematics, including Modular Exponentiation
(and other Modular Arithmetic functions) or ECC Point Arithmetic
•DEU for performing block symmetric cryptography using DES and 3DES
•AFEU for performing RC-4 compatible stream symmetric cryptography
•AESU for performing the Advanced Encryption Standard algorithm
•MDEU for hashing data
•RNG for random number generation
1.7.1Public Key Execution Unit (PKEU)
The PKEU is capable of performing many advanced mathematical functions to support both RSA
and ECC public key cryptographic algorithms. ECC is supported in both F(2)m
(polynomial-basis) and F(p) modes. This EU supports all levels of functions to assist the host
microprocessor to perform its desired cryptographic function. For exa mple, at the highest level,
the accelerator performs modular exponentiations to support RSA and perfo rms point mu ltiplies
to support ECC. At the lower levels, the PKEU can perform simple operations such as modular
multiplies.
1.7.1.1Elliptic Curve Operations
The PKEU has its own data and control units, including a general-purpose register file in the
programmable-size arithmetic unit. The field or modulus size can be programmed to any value
between 160 bits and 512 bits in programmable increments of 8, with each programmable value i
supporting all actual field sizes from i*8 -7 to i*8. The result is hardware supporting a wide range
of cryptographic security. Larger field / modulus sizes result in greater security but lower
performance; processing time is determined by field or modulus size. For example, a field size of
160 is roughly equivalent to the security provided by 1024 bit RSA. A field size set to 208 roughly
equates to 2048 bits of RSA security.
The PKEU contains routines implementing the atomic functions for elliptic curve
processing—point arithmetic and finite field arithmetic. The point operations (multiplication,
addition and doubling) involve one or more finite field operations which are addition,
multiplication, inverse, and squaring. Point add and double each use of all four finite field
operations. Similarly, point multiplication uses all EC point operations as well as the finite field
operations. All these functions are supported both in modular arithmetic as well as polynomial
basis finite fields.
The PKEU is also capable of performing ordinary integer modulo arithmetic. This arithmetic is an
integral part of the RSA public key algorithm; however, it can also play a role in the generation of
ECC digital signatures and Diffie-Hellman key exchanges.
Modular arithmetic functions supported by the MPC184’s PKEU include the following:
•R 2 mod N
•A’ E mod N
-1
•(A x B) R
•(A x B) R
•(A+B) mod N
•(A-B) mod N
mod N
-2
mod N
Where the following variable de finitions: A’ = AR mod N, N is the modulus vector, A and B are
s
input vectors, E is the exponent vector, R is 2
, where s is the bit length of the N vector rounded
up to the nearest multiple of 32.
The PKEU can perform m odular arithmetic on operands up to 2048 bits in length. The m odulus
must be larger than or equal to 129 bits. The PKEU uses the Montgomery modular multiplication
algorithm to perform core functions. The addition and subtraction functions exist to help support
known methods of the Chinese Remainder Theorem (CRT) for efficient exponentiation.
1.7.2Data Encryption Standard Execution Unit (DEU)
The DES execution unit (DEU) performs bulk data encryption/decryption, in compliance with the
Data Encryption Standard algorithm (ANSI x3.92). The DEU can also compute 3DES and
extension of the DES al gorithm in which each 64-bit input block is processed three ti mes. The
MPC184 supports 2 key (K1=K3) or 3 key 3DES.
The DEU operates by permuting 64-bit data blocks with a shared 56-bit key and an initialization
vector (IV). The MPC184 supports two modes of IV operation: ECB (Electronic Code Book) and
CBC (Cipher Block Chaining).
1.7.3Arc Four Execution Unit (AFEU)
The AFEU accelerates a bulk encryption algorithm compatible with the RC4 stream cipher from
RSA Security, Inc. The algorithm is byte-oriented, meaning a byte of plain text is encrypted with
a key to produce a byte of ciphertext. The key is variable length and the AFEU supports key
lengths from 40 to 128 bits (in byte increments), providing a wide range of security strengths. RC4
is a symmetric algorithm, meaning each of the two communicating parties share the same key.
1.7.4Advanced Encryption Standard Execution Unit (AESU)
The AESU is used to accelerate bulk data encryption/decryption in compliance with the Advanced
Encryption Standard algorithm Rinjdael. The AESU executes on 128 bit blocks with a choice of
key sizes: 128, 192, or 256 bits.
AES is a symmetric key algori thm, the sender and receiver use the same key for both encryption
and decryption. The session key and IV(CBC mode) are supplied to the AESU module prior to
encryption. The processor supplies data to the module that is processed as 128 bit input. The
AESU operates in ECB, CBC, and counter modes.
1.7.5Message Digest Execution Unit (MDEU) Module
The MDEU computes a single message digest (or hash or integrity check) value of all the data
presented on the input bus, using either the MD5, SHA-1 or SHA-256 algorithms for bulk data
hashing. With any hash algorithm, the larger message is mapped onto a smaller output space,
therefore collisions are potential, albeit not probable. The 160-bit hash value is a sufficiently large
space such that collisions are extremely rare. The security of the hash function is based on the
difficulty of locating collisions. That is, it is com putation infeasible to construct two distinct but
similar messages that produce the same hash output.
•The MD5 generates a 128-bit hash, and the algorithm is specified in RFC 1321.
•SHA-1 is a 160-bit hash function, specified by the ANSI X9.30-2 and FIPS 180-1
standards.
•SHA-256 is a 256-bit hash function that provides 256 bits of security against collision
attacks.
•The MDEU also supports HMAC computations, as specified in RFC 2104.
1.7.6Random Number Generator (RNG)
The RNG is a digital integrated circuit capable of generating 32-bit random numbers. It is designed
to comply with FIPS 140-1 standards for randomness and non-determinism.
Because many cryptographic algorithms use random numbers as a source for generating a secret
value (a nonce), it is desirable to have a private RNG for use by the MPC184. The anonymity of
each random number must be maintained, as well as the unpredictability of the next random
number. The FIPS-140 compliant private RNG allows the system to develop random challenges
or random secret keys. The secret key can thus remain hidden from even the high-level application
code, providing an added measure of physical security.
The MPC184 contains 8KB of internal general purpose RAM that can be used to store keys, IV’s
and data. The internal scratchpad allows the user to store frequently used context on chip which
increases system performance by minimizing setup time. This feature is especially important when
dealing with small packets and in systems where bus bandwidth is limited.
1.8Performance Estimates
Bulk encryption/authentication performance estimates shown in Table 1-2. include
data/key/context reads (from memory to MPC184), security processing (internal to MPC184), and
writes of completed data/context to memory by MPC184, using typical bus overhead.
Table 1-2. Estimated Bulk Data Encryption Performance (Mbps)
DES
CBC
64 byte4336383243383429
128 byte7555605175665950
256 byte1197683701181008774
512 byte173951048817113511497
1024 byte223109118100221163136115
1536 byte247114124105252176144123
3DES
CBC
AES 128AES 256ARC4MD5SHA-1
3DES/
HMAC-
SHA-1(Rx)
The MPC184 supports single pass processing of encryption/message authentication. All
performance measurements assume descriptor generation and bus availability (66Mhz, 32bit PCI
bus with typical SDRAM read/write latency) are not constraints.
1.9User’s Manual Revision History
A list of the major differences between revisions of the MPC184 Security Co-Processor User’s
Manual—PCI Interface, is provided in Appendix C, “User’s Manual Revision History.”
This chapter describes the signals used by the MPC184 in PCI mode, as well as the device pinout.
The MPC184 is designed to offer customers an easy migration path from the MPC190, the 32/64b
PCI Security Processor, in situations where the MPC190 is being used in 32-bit mode.
2.1Signal Descriptions
Table 2-1 shows the signal descr iptions for the MPC184 in 32 bit PCI mode. The shaded regions
show the pins that MUST be No Connected in 32b PCI mode or must be taken into special
consideration for easy migration from the MPC190. Please also reference Chapter 2, 4 and 7 of the
PCI Local Bus Specification Revision 2.2 for other PCI system considerations.
This chapter contains the MPC184 address map. All registers are 32-bit aligned, and are addressed
on 32-bit boundaries.
The MPC184’s internal memory resources are within a contiguous block of mem ory. The size of
the internal space is 128
PCI protocol.
3.1Address Map
Table 3-1 shows the base address map, and Table 3-2 the precise address map, including all
registers in the Execution Units. The 17-bit MPC184 address bus value is shown. Note that these
tables show module addresses; the 3 least significant address bits that are used to select bytes
within 32-bit-words are not shown.
Kbytes. In PCI mode, the Base Address Register is set according to the
Table 3-1. Module Base Address Map
MPC184 Address
(hex) (AD 16::0)
00000-00 FFFConfigurat ionMPC184 Configuration SetupConfiguration
01000-01FFFControllerArbiter/Controller Control Register SpaceResource Control
02000-02FFFChannel 1Crypto-Channel unit 1Data Control
03000-03FFFChannel 2Crypto-Channel unit 2Data Control
04000-04FFFChannel 3Crypto-Channel unit 3Data Control
05000-05FFFChannel 4Crypto-Channel unit 4Data Control
08000-08 FFFAFEUARCFour Execution UnitCryptoAccelerator
0A000-0AFFFDEUDES Execution Unit CryptoAccelerator
0C000 -0 C FFFMDEUMessa ge Digest Execution UnitCryptoAccelerator
0E000-0EFFFRNGRandom Number GeneratorCryptoAccelerator
The MPC184 is a PCI 2.2-compliant device. All PCI configuration space register names are
defined in the PCI Local Bus Specification, Revision 2.2, December 18, 1998. Per the PCI Local
Bus Specification, 32-bits is referred to as a DWORD.
4.1PCI Configuration Space
The MPC184 uses a Type 00h configuration space header with one base address register.
Name
(Reset)
3124 2316 158 70
Device ID (0x6405)Vendor ID (0x1057)0x000
Status (0x02A0)Command (0x0000)0x004
Class Code (0x1000_00)Revision ID (0x00)0x008
BIST (0x00)Header Type (0x00)Latency Timer (0x00)Cache Line Size
(0x00)
BAR 0 (0x0000_0008)0x010
BAR 1 (0x0000_0000)0x014
BAR 2 (0x0000_0000)0x018
BAR 3 (0x0000_0008)0x01C
BAR 4 (0x0000_0000)0x020
BAR 5 (0x0000_0000)0x024
Cardbus CIS Pointer (0x0000_0000)0x028
Subsystem ID (0x0000)Subsystem Vendor ID (0x0000)0x02C
Expansion ROM Base Address (0x0000_0000)0x030
Reserved (0x0000_00)Capabilities Pointer
(0x00)
Offset
0x00C
0x034
Reserved (0x0000_0000)0x038
Max_LAT (0x00)Min_GNT (0x00)Interrupt Pin (0x01)Interrupt Line (0x00) 0x03C
Figure 4-1. PCI Type 00h Configuration Space Header
The first DWORD in the configuration space header contains the read only PCI vendor ID register .
This two-byte register contains the value 0x1057.
150
SignalDevice ID
Reset0x1057
R/WRead Only
Figure 4-2. PCI Vendor ID Register
4.1.2PCI Device ID Register (offset 0x0002)
The first DWORD in the configuration space header also contains the read only PC I device ID
register. This two-byte register contains the value 0x6405.
3116
SignalDevice ID
Reset0x6405
R/WRead Only
Figure 4-3. PCI Device ID Register
4.1.3PCI Command Register (offset 0x0004)
The second DWORD in the configuration space header contains the R/W PCI command register.
This two-byte register resets to the value 0x0000. The recommended setting for this register is
0x0146.
Table 4-2. PCI Status Register Signals (continued)
BitsR/WNameReset ValueDescription
27R/WTS0Signaled target abort. MPC184, as the currently addressed target, has
terminated a transaction with a target abort.
26:25RDT01Device select timing. As a target, the MPC184 is medium address decoder.
24R/WDP0Master data parity error. While operating as a master, the MPC184 detected
a data parity error.
23RF 1Fast back-to-back capable. MPC184 is a fast back-to-back capable target.
22RReserved0Reserved, hardwired to zero
21R66M166MHz capable. The MPC184 is 66MHz capable.
20RC0Capabilities list. No extended capabilities supported
19:16RReserved0000Reserved, hardwired to zero
4.1.5Revision ID Register (offset 0x0008)
The third DWORD in the configuration space header contains the read only revision ID register.
This one-byte register resets to the value 0x00, indicating this is the first revision of the MPC184.
4.1.6Class Code Register (offset 0x0009)
The third DWORD in the configuration space header also contains the read-only class code
register. This three-byte register resets to the value 0x1000_00, indicating that the MPC184
belongs to the PCI device category known as “Encryption/Decryption Controller/Network and
Computing Encrypt/Decrypt.”
31870
FieldClass Code RegisterRevision ID
Reset0x1000_000x00
RecommendedNA
R/WRead Only
Figure 4-6. Revision ID/Class Code Register
4.1.7Cache Line Size Register (offset 0x000C)
The fourth DWORD in the configuration space header contains the R/W cache line size register.
This one-byte register resets to the value 0x00, indicating that memory write and invalidate
commands are not supported.
The fourth DWORD in the configuration space header also contains the R/W latency timer
register. This one-byte register resets to the value 0x00; however, it is recommended that this
register be set to 0x10. This indicates that the MPC184 will achieve best performance when
granted mastership of the PCI bus for at least 32 PCI clocks. The MPC184 will typically make
several short reads or writes during context switching, followed by long reads and writes for data
movement.
4.1.9Header-Type Register (offset 0x000E)
The fourth DWORD in the configuration space header also contains the R/W header type register.
This one-byte register resets to the value 0x00, indicating that the MPC184 uses a type 0 PCI
Configuration Header.
4.1.10 BIST Register (offset 0x000F)
The fourth DWORD in the configuration space header also contains the R/W BIST register. This
one-byte register resets to the value 0x00, indicating that the MPC184 does not implement BIST.
The fifth DWORD in the configuration space header contains the R/W base address register zero.
This four-byte register resets to the value 0x0000_0008. The base address registers define the
memory address range that the MPC184 will decode and respond to with the assertion of
DEVSEL. Base Address Registers 0 - 3 are implemented. Base addresses 1 to 3 shou ld be equal
to Base Address 0 plus 0x08000, 0x10000, and 0x18000 respectively . Also Base Address 0 and 3
are pre-fetchable, Base Address 1 and 2 are not pre-fetchable.
3taccessb1Prefetchable attribute bit. Indicates that the MPC184 is pre-fetchable.
2:1R/W crangeb00Decoder width field. Locates MPC184 address map anywhere in lower 4GB of
memory addresses
0R/Wtspaceb0Indicates that the MPC184 decodes its address in memory spaces
Note: Bit 3, “taccess,” is hardwired to 1, indicating that this portion of the MPC184 address map is pre-fetchable.
4.1.12 Base Address Register 1 (offset 0x0014)
Base address register 1 is implemented, and defines a segment of the MPC184 address map that is
not pre-fetchable. This Base address should be equal to Base Address 0 plus 0x08000. Reads of
this register return 0x0000_0000 at reset.
4.1.13 Base Address Register 2 (offset 0x0018)
Base address register 2 is implemented, and defines a segment of the MPC184 address map that is
not pre-fetchable. This Base address should be equal to Base address 0 plus 0x10000. Reads of
this register return 0x0000_0000 at reset.
4.1.14 Base Address Register 3 (offset 0x001C)
Base address register 3 is implemented. Reads of this register return 0x0000_0008, indicating that
this portion of the MPC184 address map is well behaved, pre-fetchable memory. This Base
address should be equal to Base address 0 plus 0x18000. Reads of this register return
0x0000_0008 at reset.
4.1.15 Base Address Register 4 (offset 0x0020)
Base address register 4 is not implemented. Reads of this register return 0x0000_0000.
The eleventh DWORD in the configuration space header contains the R/W CardBus CIS pointer
register. This four-byte register resets to the value 0x0000_0000, indica ting that CardBus CIS
pointer is not implemented.
310
FieldCardBus CIS Pointer
Reset0x0000_0000
RecommendedNA
R/WR/W
Figure 4-10. CardBus CIS Pointer Register
4.1.18 Subsystem Vendor ID Register (offset 0x002C)
The twelfth DWORD in the configuration space header contains t he read only subsystem vendor
ID register. This two-byte register contains the value 0x0000.
4.1.19 Subsystem ID Register (offset 0x002E)
The twelfth DWORD in the configuration space header also contains the read only subsystem ID
register. This two-byte register contains the value 0x0000.
4.1.20 Expansion ROM Base Address Register (offset 0x0030)
The thirteenth DWORD in the configuration space header contains the R/W expansion ROM base
address register. This four-byte register resets to the value 0x0000_0000, indicating that expansion
ROM base address is not implemented.
310
FieldExpansion ROM Base Address
Reset0x0000_0000
RecommendedNA
R/WR/W
Figure 4-12. Expansion ROM Base Address Register
4.1.21 Capabilities Pointer (offset 0x0034)
The fourteenth DWORD in the configuration space header contains the R/W capabilities pointer
register. This one-byte register resets to the value 0x00, indicating the MPC184 has no extended
PCI capabilities. The remainder of this DWORD is reserved.
31870
Field—Capabilities Pointer
Reset0x0000_000x00
RecommendedNA
R/WR/W
Figure 4-13. Capabilities Pointer
4.1.22 Interrupt Line Register (offset 0x003C)
The sixteenth DWORD in the configuration space header contains the read only interrupt line
register. This one-byte register rese ts to the value 0x00, indicating that interrupt routing has not
yet been assigned to the function.
4.1.23 Interrupt Pin Register (offset 0x003D)
The sixteenth DWORD in the configuration space header also contains the read only interrupt pin
register . This one-byte register resets to the value 0x01, which selects INTA#.
4.1.24 Min_GNT Register (offset 0x003D)
The sixteenth DWORD in t he configuration space header also contains the read only M in_GNT
register . This one-byte register resets to the value 0x00.
“Execution unit” is the generic term for a functional block that performs the mathematical
permutations required by protocols used in cryptographic processing. The EUs are compatible
with IPsec, WAP/WTLS, IKE, SSL/TLS and DOCSIS BPI++ processing, and can work together
to perform high level cryptographic tasks.
The following Execution Units are used on the MPC184:
•Public Key Execution Unit (PKEU) supporting:
— RSA and Diffie-Hellman
— Elliptic curve operations in either F
•Data Encryption Standard Execution Unit (DEU) supporting:
—DES
—3DES
— Two key (K1, K2, K1) or Three Key (K1, K2, K3)
— ECB and CBC modes for both DES and 3DES
•Advanced Encryption Standard Execution Unit (AESU) supporting:
— 128, 192, or 256 bit keys
— ECB, CBC, and Counter modes for all key lengths
•ARC Four Execution Unit (AFEU)
— Implements a stream cipher compatible with the RC-4 algorithm
— 8- to 128-bit programmable key
•Message Digest Execution Unit (MDEU) supporting:
— SHA-1, a 160 bit hash function, specified by the ANSI X9.30-2 and FIPS 180-1
standards.
— The MD5 generates a 128 bit hash, and the algorithm is specified in RFC 1321.
m or F
2
p
— SHA-256, a 256-bit hash function that provides 256 bits of security against collision
attacks.
— The MDEU also supports HMAC computations, as specified in RFC 2104.
Working together, the EUs can perform high-level cryptographic tasks, such as IPSec
encapsulating security protocol (ESP) and digital signature. The remainder of this Chapter
provides details about the Execution Units themselves.
5.1Public Key Execution Units (PKEU)
This section contains details about the Public Key Execution Unit (PKEU), including detailed
register map, modes of operation, status and control registers, and the parameter RAMs.
5.1.1PKEU Register Map
The PKEU contains the following registers and parameter memories, which are explained in detail
in the following sections.
•PKEU Mode Register
•Key Size Register
•Data Size Register
•Reset Control Register
•Status Register
•Interrupt Status Register
•Interrupt Control Register
•“Go” Register
•Parameter Memory A
•Parameter Memory B
•Parameter Memory E
•Parameter Memory N
5.1.2PKEU Mode Register
This register specifies the internal PKEU routine to be executed. For the root arithmetic routines,
PKEU has the capability to perform arithmetic operations on subsegments of the entire memory.
This is particularly useful for operations such as ECDH (elliptic curve Diffie-Hellman) key
agreement computation. By using regAsel and regBsel, for example, parameter memory A
subsegment 2 can be multiplied into parameter memory B subsegment 1. Figure 5-1 and
Modular Subtraction010
Modular Multiplication with single Reduction011
Modular Mult iplication with double Reducti on100
Polynomial A ddition101
Polyno mial Multiplication with si n gle Reduction110
Polynomial Multiplica tion with double Reduction111
1
regAsel and regBsel here refer to the specific segment of Parameter Memory A and B.
00 = A0
01 = A1
10 = A2
11 = A3
00 = B0
01 = B1
10 = B2
11 = B3
5.1.3PKEU Key Size Register
The Key Size Register reflects the number of significant bytes to be used from PKEU Parameter
Memory E in performing modular exponentiation or elliptic curve point multiplication. The
minimum value for this register, when performing either modular exponentiation or elliptic curve
point multiplication, is 1 byte. The maximum legal value is 256 bytes. To avoid a key size error,
31:9 must be set to zero, and the value of 8:0 must not be greater than 256.
The PKEU Data Size Register specifies, in bits, the size of the significant portion of the modulus
or irreducible polynomial. Any value written to this register that is a multiple of 32 bits (i.e. 128
bits, 160 bits,...), will be represented internally as the same value (128 bits, 160 bits,...). Any value
written that is not a multiple of 32 bits (i.e. 132bits, 161bits,...), will be represented in ternally as
the next larger 32 bit multiple (160 bits, 196 bits,...). This internal rounding up to the next 32-bit
multiple is described for inform ation only. The min imum size valid for all routines to operate
properly is 97 bits (internally 128 bits). The maximum size to operate properly is 2048 bits. A
value in bits larger than 2048 will result in a Data Size error.
3112110
FieldReservedData Size
Reset0
R/WR/W
AddrPKEU 0x10010
310
FieldReserved
Reset0
R/WR/W
AddrPKEU 0x10014
Figure 5-4. PKEU Data Size Register
5.1.5PKEU Reset Control Register
This register, Figure 5-5, contains three reset options specific to the PKEU.
Table 5-2 describes the PKEU Reset Control Register’s signals.
Table 5-2. PKEU Reset Control Register Signals
BitsNameDescription
31:3-Reserved
2Reset Interrupt Writing this bit active high causes PKEU interrupts signalling DONE and ERROR to be
reset. It further resets the state of the PKEU Interrupt Status Register.
0 Don’t reset
1 Reset interrupt logic
1Module_Init Module initialization is nearly the same as Software Reset, except that the Interrupt Control
register remains unchanged. This module initialization includes execution of an
initialization routine, completion of which is indicated by the RESET_DONE bit in the PKEU
Status Register (Section 5.1.6, “PKEU Status Register,” on page 5-6).
0 Don’t reset
1 Reset most of PKEU
0SW_RESETSoftware Reset is functionally equivalent to hardware reset (the RESET# pin), but only for
the PKEU. All registers and internal state are returned to their defined reset state. Upon
negation of SW_RESET, the PKEU will enter a routine to perform proper initialization of the
parameter memories. The RESET_DONE bit in the PKEU Status Register will indicate
when this initialization routine is complete (Section 5.1.6, “PKEU Status Register,” on
page 5-6).
0 Don’t reset
1 Full PKEU reset
5.1.6PKEU Status Register
This status register contains 5 bits which reflect the state of PKEU internal signals.
Shown in Figure 5-6, the PKEU Status Register is read-only. Writing to this location will result in
address error being reflected in the PKEU Interrupt Status Register.
Table 5-3 describes the PKEU Status Register’s signals.
BitsNameDescription
31:7----Reserved
Table 5-3. PKEU Status Register Signals
Note: Some bits in the upper portion of this register are used as state tables for internal
PKEU routines. In order to avoid confusion should the user read this register during normal
operation, the user is advised that these bits exist, but their specific definition is reserved.
6ZZero. This bit reflects the state of the PKEU Zero Detect bit when last sampled. Only
particular instructions within routines cause Zero to be modified, so this bit should be used
with great care.
5HaltHalt. Indicates that the PKEU has halted due to an error.
0 PKEU not halted
1 PKEU halted
Note: Because the error causing the PKEU to stop operating may be masked to the
Interrupt Status Register, the Status Register is used to provide a second source of
information regarding errors preventing normal operation.
4:3----Reserved
2Interrupt_Error This status bit reflects the state of the ERROR interrupt signal, as sampled by the
Controller Interrupt Status Register (Section 8.1.4, “Interrupt Status Registers (ISR)”).
0 PKEU is not signaling error
1 PKEU is signaling error
1Interrupt_Done This status bit reflects the state of the DONE interrupt signal, as sampled by the Controller
Interrupt Status Register (Section 8.1.4, “Interrupt Status Registers (ISR)”).
0 PKEU is not signaling done
1 PKEU is signaling done
0Reset_DoneThis status bit, when high, indicates that PKEU has completed its reset sequence, as
reflected in the signal sampled by the appropriate crypto-channel.
0 Reset in progress
1 Reset done
The interrupt status register tracks the state of possible errors, if those errors are not masked, via
the PKEU interrupt control register. The definition of each bit in the PKEU Interrupt Status
Register is shown in Figure 5-7.
311413121110987650
FieldReservedInvIE--CEKSE DSEMEAEReserved
Reset
R/WR
AddrPKEU 0x10030
310
FieldReserved
Reset
R/WR
AddrPKEU 0x10034
0X0000_0000
0X0000_0000
Figure 5-7. PKEU Interrupt Status Register
Table 5-4 describes PKEU Interrupt Status Register signals.
Table 5-4. PKEU Interrupt Status Register Signals
BitsNameDescription
31:14—Reserved
13Inversion ErrorIndicates that the inversion routine has a zero operand.
0 No inversion error detected
1 Inversion error detected
12Internal ErrorAn internal processing error was detected while the PKEU was opera ting.
0 No error detected
1 Internal error
Note: This bit will be asserted any time an enabled error condition occurs and can only
be cleared by setting the corresponding bit in the Interrupt Control Register or by
resetting the PKEU.
11—Reserved
10Context Error A PKEU Key registe r , t he key si ze re giste r , the da ta si ze r egis te r , o r mod e regi st er w as m odifi ed
while the PKEU w as operating.
0 No error detected
1 Context error
9Key Size ErrorValue outside the bounds of 1 - 256 bytes was wri tten to the PKEU key si ze register
0 No error detected
1 Key size error detected
8Data Size Error Val ue outside the bounds 97- 2048 bit s w as w ritten to the PKEU data size register
Table 5-4. PKEU Interrupt Status Register Signals (continued)
BitsNameDescription
7Mode ErrorAn illegal va lue was detecte d in the m ode regis ter . Not e: wri ting to r eserv ed bits i n mode r egister
is likely so u rce of error.
0 No error detected
1 Mode error
6Address Err or Illegal read or write address was detected within the PKEU address space.
0 No error detected
1 Address error
5:0—Reserved
5.1.8PKEU Interrupt Control Register
The PKEU Interrupt Control Register controls the result of detected errors. For a given error (as
defined in Section 5.1.7, “PKEU Interrupt Status Register”), if the corresponding bit in this
register is set, then the error is disabled; no error interrupt occurs and the interrupt status register
is not updated to reflect the error . If the corresponding bit is not set, then upon detection of an error,
the PKEU Interrupt Status Register is updated to reflect the error, causing assertion of the error
interrupt signal, and causing the module to halt processing.
311413121110987650
FieldReservedInvIE--CEKSE DSEMEAEReserved
Reset
R/WR/W
AddrPKEU 0x10038
310
FieldReserved
Reset
R/WR/W
AddrPKEU 0x1003C
0X0000_0000
0X0000_0000
Figure 5-8. PKEU Interrupt Control Register
Table 5-5 describes PKEU Interrupt Control Register signals.
Table 5-5. PKEU Interrupt Control Register Signals
0 Data Size Error enabled
1 Data Size Error disabled
7Mode ErrorMode Error
0 Mode Error enabled
1 Mode Error disabled
6Address Error Address Error
0 Address error enabled
1 Address error disabled
5:0—Reserved
5.1.9PKEU EU_GO Register
The EU_GO Register in the PKEU is used to indicate the start of a new computation. Writing to
this register causes the PKEU to execute the function requested by the mode register, per the
contents of the parameter memories listed below. Note that this register has no data size, and
during the write operation, the host data bus is not read. Hence, any data value is accepted.
Normally , a write operation with a zero data value is performed. Moreover, no read operation from
this register is meaningful, but no error is generated, and a zero value is always returned. The
PKEU EU_GO Register is only used when the MPC184 is operated as a target. The descriptors
and crypto-channel activate the PKEU (via an internally generated write to the EU_GO Register)
when the MPC184 acts as an initiator.
The PKEU uses four 2048-bit memories to receive and store operands for the arithmetic operations
the PKEU will be asked to perform. In addition, results are stored in one particula r parameter
memory.
All these memories store data in the same format: least significant data byte in the least
significantly addressed byte, both data significance and addressing significance increasing
identically and simultaneously.
5.1.10.1 PKEU Parameter Memory A
This 2048 bit memory is used typically as an input parameter memory space. For modular
arithmetic routines, this memory operates as one of the operands of the desired function. For
elliptic curve routines, this memory is segmented into four 512 bit memories, and is used to specify
particular curve parameters and input values.
5.1.10.2 PKEU Parameter Memory B
This 2048 bit memory is used typically as an input parameter memory space, as well as the result
memory space. For modular arithmetic routines, this memory operates as one of the o perands of
the desired function, as well as the result memory space. For elliptic curve routines, this memory
is segmented in to four 512 bit memories, and is used to specify particular curve parameters and
input values, as well as to store result values.
5.1.10.3 PKEU Parameter Memory E
This 2048 bit memory is non-segmentable, and stores the exponent for modular exponentiation,
or the multiplier k for elliptic curve point multiplication. This memory space is write only; a read
of this memory space will cause address error to be reflected in the PKEU Interrupt Status
Register.
5.1.10.4 PKEU Parameter Memory N
This 2048 bit memory is non-segmentable, and stores the modulus for modular arithmetic and F
elliptic curve routines. For F2m elliptic curve routines, this memory stores the irreducible
polynomial.
5.2Data Encryption Standard Execution Units (DEU)
p
This section contains details about the Data Encryption Standard Execution Units (DEU),
including detailed register map, modes of operation, status and control registers, and FIFOs.
The registers used in the DEU are documented primarily for debug and target mode operations. If
the MPC184 requires the use of the DEU when acting as an initiator, accessing these registers
directly is unnecessary. The device drivers and the on-chip controller will abstract regis ter level
access from the user. The DEU contains the following registers:
•DEU Mode Register
•Key Size Register
•Data Size Register
•Reset Control Register
•Status Register
•Interrupt Status Register
•Interrupt Control Register
•“Go” Register
•IV Register
•Key Registers
•FIFO
5.2.2DEU Mode Register
The DEU Mode Register contains 3 bits which are used to program the DEU. It also reflects the
value of burst size, which is loaded by the crypto-channel during normal operation with the
MPC184 as an initiator . Burst size is not relevant to target mode operations, where an external host
pushes and pulls data from the execution units.
The mode register is cleared when the DEU is reset or re-initialized. Setting a reserved mode bit
will generate a data error. If the mode register is modified during processing, a context error will
be generated.
10-8Burst SizeThe MPC184 implements flow control to allow larger than FIFO sized blocks of data to be
processed with a single key/IV. The DEU signals to the crypto-channel that a “Burst Size”
amount of data is available to be pushed to or pulled from the FIFO.
Note: The inclusion of this field in the DEU Mode Register is to avoid confusing a user who
may read this register in debug mode. Burst Size should not be written directly to the DEU.
7:3—Reserved
2CBC/ECB If set, DEU operates in cipher-block-chaining mode. If not set, DEU operates in electronic
codebook mode.
0 ECB mode
1 CBC mode
1Triple/Single
DES
0encrypt/decrypt If set, DEU operates the encryption algorithm; if not set, DEU operates the decryption
If set, DEU operates the Triple DES algorithm; if not set, DEU operates the single DES
algorithm.
0 Single DES
1 Triple DES
This value indicates the number of bytes of key m emory that should be used in encrypting or
decrypting. If the DEU Mode Register is set for single DES, any value other than 8 by tes will
automatically generate a key size error in the DEU Interrupt Status Register . If the mode bit is set
for triple DES, any value other than 16 bytes (112 bits for 2-key triple DES (K1=K3) or 24 bytes
This register, shown in Figure 5-12, is used to verify that the data to be processed by the DEU is divisible
by the DES algorithm block size of 64-bits. The D EU does not automatically pad messages out to 64-bit
blocks, therefore any message processed by the DEU must be divisible by 64-bits or a data size error will
occur.
In normal operation, the full message length (data size) to be encrypted or decrypted by the DEU
is copied from the descriptor to the DEU Data Size Register , however only bits 5:0 are checked to
determine if there is a data size error. If 5:0 are all zeroes, the message is evenly divisible into
64-bit blocks. In target mode, the user must write the data size to the data size register. If the data
size written is not divisible by 64-bits (5:0 non-zero), a data size error will occur.
1Module_Init Module initialization is nearly the same as Software Reset, except that the Interrupt Control
register remains unchanged. This module initialization includes execution of an
initialization routine, completion of which is indicated by the RESET_DONE bit in the DEU
Status Register
0 Don’t reset
1 Reset most of DEU
0SW_RESETSoftware Reset is functionally equivalent to hardware reset (the RESET# pin), but only for
DEU. All registers and internal state are returned to their defined reset state. Upon
negation of SW_RESET, the DEU will enter a routine to perform proper initialization of the
parameter memories. The RESET_DONE bit in the DEU Status Register will indicate when
this initialization routine is complete
0 Don’t reset
1 Full DEU reset
5.2.6DEU Status Register
This status register, displayed in Figure 5-14, contains 6 bits which reflect the state of DEU
internal signals.
The DEU Status Register is read-only. Writing to this location will result in address error being
reflected in the DEU interrupt status register.
316543210
FieldReservedHaltIFW OFRIEIDRD
Reset
R/WR
AddrDEU 0x0A028
310
FieldReserved
Reset
R/WR
AddrDEU 0x0A02C
0000000
0
Figure 5-14. DEU Status Register
Table 5-3 describes the DEU Status Register’ s signals.
5HaltHalt- Indicates that the DEU has halted due to an error.
0 DEU not halted
1 DEU halted
Note: Because the error causing the DEU to stop operating may be masked to the Interrupt
Status Register, the Status Register is used to provide a second source of information
regarding errors preventing normal operation.
4IFWInput FIFO Writable- The Controller uses this signal to determine if the DEU can accept the
next BURST SIZE block of data.
0 DEU Input FIFO not ready
1 DEU Input FIFO ready
Note: The MPC184 implements flow control to allow larger than FIFO sized blocks of data
to be processed with a single key/IV. The DEU signals to the crypto-channel that a “Burst
Size” amount of space is available in the FIFO. The documentation of this bit in the DEU
Status Register is to avoid confusing a user who may read this register in debug mode.
3OFROutput FIFO Readable- The Controller uses this signal to determine if the DEU can source
the next BURST SIZE block of data.
0 DEU Output FIFO not ready
1 DEU Output FIFO ready
Note: The MPC184 implements flow control to allow larger than FIFO sized blocks of data
to be processed with a single key/IV. The DEU signals to the crypto-channel that a “Burst
Size” amount of data is available in the FIFO. The documentation of this bit in the DEU Status
Register is to avoid confusing a user who may read this register in debug mode.
2Interrupt_Error This status bit reflects the state of the ERROR interrupt signal, as sampled by the Controller
Interrupt Status Register (Section 8.1.4, “Interrupt Status Registers (ISR)”).
0 DEU is not signaling error
1 DEU is signaling error
1Interrupt_Done This status bit reflects the state of the DONE interrupt signal, as sampled by the Controller
Interrupt Status Register (Section 8.1.4, “Interrupt Status Registers (ISR)”).
0 DEU is not signaling done
1 DEU is signaling done
0Reset_DoneThis status bit, when high, indicates that DEU has completed its reset sequence, as reflected
in the signal sampled by the appropriate crypto-channel.
0 Reset in progress
1 Reset done
5.2.7DEU Interrupt Status Register
The DEU Interrupt Status Register, shown in Figure 5-15, tracks the state of possible errors, if
those errors are not masked, via the DEU interrupt control register. The definition of each bit in
the interrupt status register is:
FieldReservedKPE IE ERE CE KSE DSE ME AE OFE IFE--IFO OFU--
Reset0
R/WR
AddrDEU 0x0A030
310
FieldReserved
Reset0
R/WR
AddrDEU 0x0A034
Figure 5-15. DEU Interrupt Status Register
Table 5-10 describes DEU Interrupt Register signals.
Table 5-10. DEU Interrupt Status Register Signals
BitsSignalDescription
31:14—Reserved
13Key Parity Error Defined pari ty bit s in the key s wri tte n to the key regi st ers di d no t refl ec t od d pari ty c orr ectl y. (Note
that key register 2 and key register 3 are checked for parity only if the appropriate DEU mode
register bit indicates triple DES. A lso, key register 3 is checked only if key size reg = 24. Key
register 2 is checked only if key size reg = 16 or 2 4.)
0 No error detected
1 Key parity error
12Internal ErrorAn internal pr ocessing err or was detecte d wh ile performi ng encryptio n.
0 No error detected
1 Internal error
Note: This bit will be asserted any time an enabled error condition occurs and can only be
cleared by setting the corresponding bit in the Interrupt Control Register or by resetting the
DEU.
11Early Read Error The DEU IV register was read while the DEU was perf orming encryption.
0 No error detected
1 Early read error
10Context Error A DEU Key register, the key size reg ister , the data size register, the mode regi ster, or IV register
was modified while DEU was pe rforming encryption.
0 No error detected
1 Context error
9Key Size ErrorAn inappropriate value (8 being appropriate for single DES, and 16 and 24 being
appropriate for triple DES) was written to the DEU key size register
0 No error detected
1Key size error
8Data Size Error Data Size Error (DSE): A value was written to the DEU Data Size Register that is not a
multiple of 64 bits.
0 No error detected
1 Data size error
Table 5-10. DEU Interrupt Status Register Signals (continued)
BitsSignalDescription
7Mode ErrorAn illegal value was detected in the mode register. Note: writing to reserved bits in mode register is
likely source of error.
0 No error detected
1 Mode error
6Address ErrorAn illegal read or write address was det ected within the DEU address space.
0 No error detected
1 Address error
5Output FIFO
Error
4Input FIFO Error The DEU input FIFO was detected non-empty upon generation of DONE interrupt .
3—Reserved
2Input FIFO
Overflow
1Output FIFO
Underflow
The DEU output FIFO was detected non-empty upo n w rite of DEU data si ze register.
0 No error detected
1 Output FIFO non-empty error
0 No error detected
1 Input FIFO non-empty error
The DEU input FIFO has been pushed whi le full.
0 No error detected
1 Input FIFO has overflowed
Note: When operating as a master, the MPC184 implements flow-control, and FIFO size
is not a limit to data input. When operated as a target, the MPC184 cannot accept FIFO
inputs larger than 512B without overflowing.
The DEU output FIFO has been read while empty.
0 No error detected
1 Output FIFO has underflow error
5.2.8DEU Interrupt Control Register
The interrupt control register controls the result of detected errors. For a given error (as defined in
Section 5.2.7, “DEU Interrupt Status Register”), if the corresponding bit in this register is set, then
the error is ignored; no error interrupt occurs and the interrupt status register is not updated to
reflect the error. If the corresponding bit is not set, then upon detection of an error, the interrupt
status register is updated to reflect the error, causing assertion of the error interrupt signal, and
causing the module to halt processing.
3—Reserved
2Input FIFO OverflowThe DEU Input F IFO has been pushed while full.
0 Input FIFO overflow error enabled
1 Input FIFO overflow error disabled
Note: When operating as a master, the MPC184 implements flow-control, and
FIFO size is not a limit to data input. When operated as a target, the MPC184
cannot accept FIFO inputs larger than 512B without overflowing.
1Output FIFO UnderflowThe DEU Output FIFO has been read while empty.
The EU_GO register in the DEU is used to indicate a DES operation may be completed. After the
final message block is written to the input FIFO, the EU-GO register must be written. The value
in the data size register will be used to determine how many bits of the final message block (always
64) will be processed. Note that this register has no data size, and during the write operation, the
host data bus is not read. Hence, any data value is accepted. Normally, a write operation with a
zero data value is performed. Moreover, no read operation from this register is meaningful, but no
error is generated, and a zero value is always returned. Writing to this register is merely a trigger
causing the DEU to process the final block of a message, allowing it to signal DONE.
The DEU EU_GO Register is only used when the MPC184 is operated as a target. The descriptors
and crypto-channel activate the DEU (via an internally generated write to the EU_G o register)
when the MPC184 acts as an initiator.
For CBC mode, the initialization vector is written to and read from the DEU IV Register. The value
of this register changes as a result of the encryption process and reflects the context of DEU.
Reading this memory location while the module is processing data generates an error interrupt.
5.2.11 DEU Key Registers
The DEU uses three write-only key registers to perform encryption and decryption. In Single DES
mode, only key register 1 may be written. The value written to key register 1 is simulta neously
written to key register 3, auto-enabling the DEU for 112-bit Triple DES if the key size register
indicates 2 key 3DES is to be performed (key size = 16 bytes). To operate in 168-bit Triple DES,
key register 1 must be written first, followed by the write of key register 2, the key register 3.
Reading any of these memory locations will generate an address error interrupt.
5.2.12 DEU FIFOs
DEU uses an input FIFO/output F IFO pair to hold data before and after the encryption process.
These FIFOs are multiply addressable, but those multiple addresses point only to the appropriate
end of the appropriate FIFO. A write to anywhere in the DEU FIFO address space ca uses the
32-bit-word to be pushed onto the DEU input FIFO, and a read from anywhere in the DEU FIFO
Address space causes a 32-bit-word to be popped off of the DEU output FIFO. Overflows and
underflows caused by reading or writing the DEU FIFOs are reflected in the DEU interrupt status
register.
5.3ARC Four Execution Unit (AFEU)
This section contains details about the ARC Four Execution Unit (AFEU), including detailed
register map, modes of operation, status and control registers, S-box memory, and FIFOs.
5.3.1AFEU Register Map
The registers used in the AFEU are documented primarily for debug and target mode operations.
If the MPC184 requires the use of the AFEU when acting as an initiator, accessing these registers
directly is unnecessary. The device drivers and the on-chip controller will abstract regis ter level
access from the user. The AFEU contains the following registers:
Shown in Figure 5-18, the AFEU Mode Register contains three bits which are used to program the
AFEU. It also reflects the value of burst size, which is loaded by the crypto-channel during normal
operation with the MPC184 as an initiator. Burst size is not relevant to target mode operations,
where an external host pushes and pulls data from the execution units.
The mode register is cleared when the AFEU is reset or re-initialized. Setting a reserved mode bit
will generate a data error. If the mode register is modified during processing, a context error will
be generated.
5.3.2.1Host-provided Context via Prevent Permute
In the default mode of operation, the host provides the key and key size to the AFEU. The initial
memory values in the S-Box are permuted with the key to create new S-Box values, which are used
to encrypt the plaintext.
If the ‘Prevent Permute’ mode bit is set, the AFEU will not require a key . Rather, the host will write
the context to the AFEU and message processing will occur using the provided context. This mode
is used to resume processing of a message using the already permuted S-Box. The context may be
written through the FIFO if the ‘context source’ mode bit is set.
5.3.2.2Dump Context
This mode may be independently specified in addition to host-provided context mode. In this
mode, once message processing is complete and the output data is read, the AFEU will make the
current context data available for reads via the output FIFO.
After the initial key permute to generate a context for an AFEU
encrypted session, all subsequent mess ages will re-use that context,
such that it is loaded, modified during the encryption, and unloaded,
similar to the use of a CBC initialization vector in DES operations. A
new context is generated (via key permute) according to a rekeying
interval specified by the security protocol. Context should never be
loaded to encrypt a message if a key is loaded and permuted at the
same time.
311110873210
Reset
R/WR/W
AddrAFEU 0x08000
310
FieldReserved
Reset
R/WR/W
AddrAFEU 0x08004
000000
0
Figure 5-18. AFEU Mode Register
Table 5-12 describes AFEU Mode Register signals.
Table 5-12. AFEU Mode Register Signals
BitsSignalDescription
31:11—Reserved
10-8Burst SizeThe MPC184 implements flow control to allow larger than FIFO sized blocks of data to
be processed with a single key/context. The AFEU signals to the crypto-channel that a
“Burst Size” amount of data is available to be pushed to or pulled from the FIFO.
Note: The inclusion of this field in the AFEU Mode Register is to avoid confusing a user
who may read this register in debug mode. Burst Size should not be written directly to
the AFEU.
7:3—Reserved
2Context SourceIf Set, this causes the context to be moved from the input FIFO into the S-box prior to
starting encryption/decryption. Otherwise, context should be directly written to the
context registers. Context Source is only checked if the Prevent Permute bit is set.
0 Context not from FIFO
1 Context from input FIFO
1Dump ContextIf Set, this causes the context to be moved from the S-box to the output FIFO following
assertion AFEU’s done interrupt.
0 Do not dump context
1 After cipher, dump context
0Prevent Permute Normally, AFEU receives a key and uses that information to randomize the S-box. If
reusing a context from a previous descriptor or if in static assignment mode, this bit
should be set to prevent AFEU from reperforming this permutation step.
0 Perform S-Box permutation
1 Do not permute
5.3.3AFEU Key Size Register
As displayed in Figure 5-19, this value (1-16) indica tes the number of bytes of key memory that
should be used in performing S-box permutation. Any key data beyond the number of bytes in the
key size register will be ignored. This register is cleared when the AFEU is reset or re-initialized.
If the key size is <1 or > 16 is specified, an key size error will be generated. If the Key Size Register
is modified during processing, a context error will be generated.
31540
FieldReservedKey Size
Reset
R/WR/W
AddrAFEU 0x08008
310
FieldReserved
Reset
R/WR/W
AddrAFEU 0x0800C
0x0000_0000
0x0000_0000
Figure 5-19. AFEU Key Size Register
NOTE
The device driver will create properly formatted descriptors for
situations requiring an key permute prior to ciphering. When
operating the MPC184 as a target (typically debug mode), the user
must set the AFEU Mode Register to perform ‘permute with key’,
then write the key data to AFEU Key Registers, then write the key size
to the key size register. The AFEU will start permuting the memory
with the contents of the key registers immediately after the key size is
written.
The AFEU Context/Data Size Register, shown in Figure 5-20, stores the number of bits in the final
message block. This register is cleared when the AFEU is reset or re-initialized. The last message
block can be between 8 to 64 bits. If a data size that is not a multiple of 8 bits is written, a data size
error will be generated.
The context/data size register is also used to specify the context size. The context size is fixed at
2072 bits (259 bytes). When loading context through the FIFO, all context data must be written
prior to writing the context data size. The message data size must be written separately.
NOTE
In target mode, when reloading an existing context, the user must
write the context to the input FIFO, then write the context size (always
2072 bits, 15:0= 0x0818). The write of the context size indicates to the
MPC184 that all context has been loaded. The user then writes the
message data size to the context/data size register . After this write, the
user may begin writing message data to the FIFO.
Writing to this register signals the AFEU to st art processing data from the input FIFO as soon as
it is available. If the value of data size is modified during processing, a context error will be
generated.
3112110
FieldReservedData Size
Reset0
R/WR/W
AddrAFEU 0x08010
310
FieldReserved
Reset0
R/WR/W
AddrAFEU 0x08014
Figure 5-20. AFEU Data Size Register
5.3.5AFEU Reset Control Register
This register, as shown in Figure 5-21, allows 3 levels reset that effect the AFEU only, as defined
by 3 self-clearing bits. It should be note d that the AFE U executes an i nternal reset sequence for
hardware reset, SW_RESET, or Module Init, which performs proper initialization of the S-Box.
To determine when this is complete, observe the RESET_DONE bit in the AFEU Status Register.
Table 5-14 describes AFEU Status Register signals.
Table 5-14. AFEU Status Register Signals
BitsSignalDescription
31:6—Reserved
5HaltHalt- Indicates that the AFEU has halted due to an error.
0 AFEU not halted
1AFEU halted
Note: Because the error causing the AFEU to stop operating may be masked to the
Interrupt Status Register, the Status Register is used to provide a second source of
information regarding errors preventing normal operation.
4IFWInput FIFO Writable- The Controller uses this signal to determine if the AFEU can accept
the next BURST SIZE block of data.
0 AFEU Input FIFO not ready
1 AFEU Input FIFO ready
Note: The MPC184 implements flow control to allow larger than FIFO sized blocks of data
to be processed with a single key/IV. The AFEU signals to the crypto-channel that a “Burst
Size” amount of space is available in the FIFO. The documentation of this bit in the AFEU
Status Register is to avoid confusing a user who may read this register in debug mode.
3OFROutput FIFO Readable- The Controller uses this signal to determine if the AFEU can
source the next BURST SIZE block of data.
0 AFEU Output FIFO not ready
1 AFEU Output FIFO ready
Note: The MPC184 implements flow control to allow larger than FIFO sized blocks of data
to be processed with a single key/IV. The AFEU signals to the crypto-channel that a “Burst
Size” amount of data is available in the FIFO. The documentation of this bit in the AFEU
Status Register is to avoid confusing a user who may read this register in debug mode.
2Interrupt_Error This status bit reflects the state of the ERROR interrupt signal, as sampled by the
Controller Interrupt Status Register (Section 8.1.4, “Interrupt Status Registers (ISR)”).
0 AFEU is not signaling error
1 AFEU is signaling error
Table 5-14. AFEU Status Register Signals (continued)
BitsSignalDescription
1Interrupt_Done This status bit reflects the state of the DONE interrupt signal, as sampled by the Controller
Interrupt Status Register (Section 8.1.4, “Interrupt Status Registers (ISR)”).
0 AFEU is not signaling done
1 AFEU is signaling done
0Reset_DoneThis status bit, when high, indicates that AFEU has completed its reset sequence, as
reflected in the signal sampled by the appropriate crypto-channel.
0 Reset in progress
1 Reset done
5.3.7AFEU Interrupt Status Register
The interrupt status register, seen in Figure 5-23, tracks the state of possible errors, if those errors
are not masked, via the AFEU Interrupt Control Register. The definition of each bit in the interrupt
status register is:
31131211109876543210
FieldReservedI EERECEKSE DSE ME AE OFEIFE--IFO OFU ----
Reset0
R/WR
AddrAFEU 0x08030
310
FieldReserved
Reset0
R/WR
AddrAFEU 0x08034
Figure 5-23. AFEU Interrupt Status Register
Table 5-15 describes AFEU Interrupt Status Register signals.
Table 5-15. AFEU Interrupt Status Register
BitsSignalsDescription
31:13—Reserved
12Internal ErrorAn internal processing error was detected wh ile performi ng encryption.
0 No error detected
1 Internal error
11Early Read ErrorEarly Read Error- the AFEU Context Memory or Control was read while the AFEU was
performing encryption.
0 No error detected
1 Early read error
3—Reserved
2Input FIFO Ov erflow The AFEU input FIFO has been pushed while full .
1 Input FIFO has overflowed
0 No error detected
Note: When operating as a master, the MPC184 implements flow-control, and FIFO
size is not a limit to data input. When operated as a target, the MPC184 cannot accept
FIFO inputs larger than 512B without overflowing.
1Output FIFO
Underflow
0—Reserved
The AFEU output FIFO has been read while empty.
0 No error detected
1 Output FIFO has underflow error
5.3.8AFEU Interrupt Control Register
The interrupt control register, shown in Figure 5-24, controls the resul t of detected errors. For a
given error (as defined in Section 5.3.7, “AFEU Interrupt Status Register”), if the corresponding
bit in this register is set, the error is disabled; no error interrupt o ccurs and the interrupt status
register is not updated to reflect the error. If the corresponding bit is not set, then upon detection
of an error, the interrupt status register is updated to reflect the error, causing assertion of the error
interrupt signal, and causing the module to halt processing.
The end of message register in the AFEU, displayed in Figure 5-25, is used to indicate an ARC-4
operation may be completed. After the final messag e block is written to the input FIFO, the end
of message register must be written. The value in the data size register will be used to determine
how many bits of the final me ssage block (8-64, in multiples of 8) will be processed. Writing to
this register causes the AFEU to process the final block of a message, allowing it to signal DONE.
If the ‘dump context’ bit in the AFEU Mode Register is set, the context will be written to the output
FIFO following the last message word. A read of this register will always return a zero value.
The AFEU End Of Message Register is only used when th e MPC184 is operated as a target. The
descriptors and crypto-channel activate the AFEU (via an internally generated write to the end of
message register) when the MPC184 acts as an initiator.
310
FieldAFEU End of Message
Reset
R/WW
AddrAFEU 0x08050
0
Figure 5-25. AFEU End of Message Register
5.3.10 AFEU Context
This section provides additional information about the AFEU context memory and its related
pointer register.
The S-Box memory consists of 64 32-bit words, each readable and writable. The S-Box contents
should not be written with data unless it was prev iously read from th e S-Box. Cont ext data may
only be written if the ‘prevent permutation’ mode bit is set (see Figure 5-18 on page 5-24) and the
context data must be written prior to the message data. If the context registers are written during
message processing or the ‘prevent permutation’ bit is not set, a context err or will be generated.
Reading this memory while the module is not done will generate an error interrupt.
5.3.10.2 AFEU Context Memory Pointer Register
The context memory pointer register holds the internal context pointers that are updated with each
byte of message processed. These pointers correspond to the values of I, J, and Sbox[I+1] in the
ARC-4 algorithm. If this register is written during message processing, a context error will be
generated.
When performing ARC-4 operations, the user has the option of performing a new S-Box
permutation per packet, or unloading the contents of the S-box (context) and reloading this context
prior to processing of the next packet. The S-Box contents (256bytes) plus the 3 bytes of the
context memory pointets are unloaded and reloaded via the AFEU FIFOs.
AFEU Context consists of the contents of the S-Box, as well as three counter values, which
indicate the next values to be used from the S-Box. Context must be loaded in the same order in
which it was unloaded.
5.3.11 AFEU Key Registers
AFEU uses two write-only key registers to guide initial permutation of the AFEU S-Box, in
conjunction with the AFEU key size register. AFEU performs permutation starting with the first
byte of key register 0, and uses as many bytes from the two key registers as necessary to complete
the permutation. Reading either of these memory locations will generate an address error interrupt.
5.3.12 AFEU FIFOs
AFEU uses an input FIFO/output F IFO pair to hold data before and after the encryption process.
These FIFOs are multiply addressable, but those multiple addresses point only to the appropriate
end of the appropriate FIFO. A write to anywhere in the AFEU FIFO address space causes the
32-bit-word to be pushed onto the AFEU input FIFO, and a read from anywhere in the AFEU
FIFO Address space causes a 32-bit-word to be popped off of the AFEU output FIFO. Overflows
and underflows caused by reading or writing the AFEU FIFOs are reflected in the AFEU interrupt
status register.
This section contains details about the Message Digest Execution Units (MDEU), including
detailed register map, modes of operation, status and control registers, and FIFOs.
5.4.1MDEU Register Map
The registers used in the MDEU are documented primarily for debug and target mode operations.
If the MPC184 requires the use of the MDEU when acting as an initiator, accessing these registers
directly is unnecessary. The device drivers and the on-chip controller will abstract regis ter level
access from the user. The MDEU contains the following registers:
•MDEU Mode Register
•Key Size Register
•Data Size Register
•Reset Control Register
•Status Register
•Interrupt Status Register
•Interrupt Control Register
•“Go” Register
•Context Registers
•Key Registers
•MDEU Input FIFO
5.4.2MDEU Mode Register
The MDEU Mode Register, shown in Figure 5-26, contains 8 bits which are used to program the
MDEU. It also reflects the value of burst size, which is loaded by the crypto-channel during
normal operation with the MPC184 as an initiator. Burst size is not relevant to target mode
operations, where an external host pushes and pulls data from the execution units.
The mode register is cleared when the MDEU is reset or re-initialized. Setting a reserved mode bit
will generate a data error. If the mode register is modified during processing, a context error will
be generated.
10:8Burst SizeThe MPC184 implements flow control to allow larger than FIFO sized blocks of data to be
processed with a single key/context. The MDEU signals to the crypto-channel that a “Burst
Size” amount of data is available to be pushed to the FIFO.
Note: The inclusion of this field in the MDEU Mode Register is to avoid confusing a user
who may read this register in debug mode. Burst Size should not be written directly to the
MDEU.
7ContContinue (Cont): Used during HMAC/HASH processing when the data to be hashed is
spread across multiple descriptors.
0 = Don’t Continue- operate the MDEU in auto completion mode.
1 = Preserve context to operate the MDEU in Continuation mode.
6:5—Reserved
4INTInitialization Bit (INT): Cause an algorithm-specific initialization of the digest registers. Most
operations will require this bit to be set. Only static operations that are continuing from a
know intermediate hash value would not initialize the registers.
0 Do not initialize
1 Initialize the selected algorithm’s starting registers
3HMACIdentifies the hash operation to execute:
0 Perform standard hash
1 Perform HMAC operation. This requires a key and key length information.
2PDIf set, configures the MDEU to automatically pad partial message blocks.
0 Do not autopad
1 Perform automatic message padding whenever an incomplete message block is
detected.
1:0ALGMessage Digest algorithm selection
00 = SHA-160 algorithm (full name for SHA-1)
01 = SHA-256 algorithm
10 = MD5 algorithm
11 = Reserved
5.4.2.1Recommended settings for MDEU Mode Register
The most common task likely to be executed via the MDEU is HM AC generation. HMACs are
used to provide message integrity within a number of security protocols, including IPSec, and
SSL/TLS. When the HMAC is being generated by a single dynamic descriptor (the MDEU acting
as sole or secondary EU), the following Mode Register bit settings should be used:
Continue-Off, Initialize -On, HMAC-On, Autopad-On
When the HMAC is being generated for a message that is spread across a chain of static
descriptors, the following Mode Register bit settings should be used:
Additional information on descriptors can be found in Chapter 6.
5.4.3MDEU Key Size Register
Displayed in Figure 5-27, this value indicates the number of bits of key memory that should be
used in HMAC generation. MDEU s upports at most 512 bits of key. MDEU will generate a key
size error if the value written to this register exceeds 512 bits, or if a non-zero value is written when
the MDEU Mode Register indicates no HMAC.
The MDEU Data Size Register, shown in Figure 5-28, stores the size of the last block of data (in
bits) to be processed. The first three bits are used to check for a bit offset in the last byte of the
message. Since the engine does not support bit offsets, any value other than ‘0’ in these positions
will cause a data size error. The next three bits are used to identify the ending byte location in the
last 8-byte dword. This is used to add the data padding when auto padding is selected. This register
is cleared when the MDEU is reset, re-initialized, and at the end of processing the complete
message.
NOTE
Writing to the data size register will allow the MDEU to enter
auto-start mode. Therefore, the required context data should be
written prior to writing the data size.
Table 5-14 describes MDEU Status Register signals.
Table 5-19. MDEU Status Register Signals
BitsSignalDescription
31:6—Reserved
5HaltHalt- Indicates that the MDEU has halted due to an error.
0 MDEU not halted
1 MDEU halted
Note: Because the error causing the MDEU to stop operating may be masked to the
Interrupt Status Register, the Status Register is used to provide a second source of
information regarding errors preventing normal operation.
4IFWInput FIFO Writable- The Controller uses this signal to determine if the MDEU can accept
the next BURST SIZE block of data.
0 MDEU Input FIFO not ready
1 MDEU Input FIFO ready
Note: The MPC184 implements flow control to allow larger than FIFO sized blocks of data
to be processed with a single key/IV. The MDEU signals to the crypto-channel that a “Burst
Size” amount of space is available in the FIFO. The documentation of this bit in the MDEU
Status Register is to avoid confusing a user who may read this register in debug mode.
3—Reserved
2Interrupt_Error This status bit reflects the state of the ERROR interrupt signal, as sampled by the
Controller Interrupt Status Register (Section 8.1.4, “Interrupt Status Registers (ISR)”).
0 MDEU is not signaling error
1 MDEU is signaling error
1Interrupt_Done This status bit reflects the state of the DONE interrupt signal, as sampled by the Controller
Interrupt Status Register (Section 8.1.4, “Interrupt Status Registers (ISR)”).
0 MDEU is not signaling done
1 MDEU is signaling done
0Reset_DoneThis status bit, when high, indicates that MDEU has completed its reset sequence, as
reflected in the signal sampled by the appropriate crypto-channel.
0 Reset in progress
1 Reset done
The interrupt status register tracks the state of possible errors, if those errors are not masked, via
the MDEU Interrupt Control Register. The definition of each bit in the interrupt status register is
shown in Figure 5-31.
3114131211109876543210
FieldReservedIE ERE CE KSE DSE ME AE--IFO---
Reset0
R/WR
AddrMDEU 0x0C030
310
FieldReserved
Reset0
R/WR
AddrMDEU 0x0C034
Figure 5-31. MDEU Interrupt Status Register
Table 5-20 describes MDEU Interrupt Status Register signals.
Table 5-20. MDEU Interrupt Status Register Signals
BitsSignalDescription
31:13—Reserved
12Internal ErrorIndicates the MDEU has been locked up and requires a reset before use.
0 No internal error detected
1 Internal error detected
Note: This bit will be asserted any time an enabled error condition occurs and can only
be cleared by setting the corresponding bit in the Error Interrupt Control Register or by
resetting the MDEU.
11Early Read ErrorThe MDEU context was read before the MDEU completed the hashing operation.
0 No error detected
1 Early read error
10Context ErrorThe MDEU key register, key size register, or data size register was modified while
MDEU was hashing.
0 No error detected
1 Context error
9Key Size ErrorA value greater than 512 bits was written to the MDEU key size register.
0 No error detected
1Key size error
8Data Size ErrorA value not a multiple of 512 bits while the MDEU Mode Register autopad bit is
Table 5-20. MDEU Interrupt Status Register Signals (continued)
BitsSignalDescription
7Mode ErrorAn illegal value was detected in the mode register. Note: writing to reserved bits in mode
register is likely so urce of error.
0 No error detected
1 Mode error
6Address Error An illegal read or write address was detected within the MDEU address space.
0 No error detected
1 Address Error
5:3—Reserved
2Input FIFO Overflow the MDEU Input FIFO has been pushed while full.
0 No overflow detected
1 Input FIFO has overflowed
Note: When operating as a master, the MPC184 implements flow-control, and FIFO
size is not a limit to data input. When operated as a target, the MPC184 cannot accept
FIFO inputs larger than 512B without overflowing.
1:0—Reserved
5.4.8MDEU Interrupt Control Register
Execution Units
The MDEU Interrupt Control Register, shown in Figure 5-32, controls the result of detected errors.
For a given error (as defined in Section 5.4.7, “MDEU Interrupt Status Register”), if the
corresponding bit in this register is set, then the error is disabled; no error interrupt occurs and the
interrupt status register is not updated to reflect the error. If the corresponding bit is not set, then
upon detection of an error, the interrupt status register is updated to reflect the error, causing
assertion of the error interrupt signal, and causing the module to halt processing.
3113121110987653210
FieldReservedIE ERE CE KSE DSE MEAE--IFO---
Reset0
R/WR/W
AddrMDEU 0x0C038
310
FieldReserved
Reset0
R/WR/W
AddrMDEU 0x0C03C
Figure 5-32. MDEU Interrupt Control Register
Table 5-20 describes MDEU Interrupt Status Register signals.
The EU_GO Register in the MDEU, see Figure 5-33, is used to indicate an authentication
operation may be completed. After the final message block is written to the input FIFO, the
EU-GO Register must be written. The value in the data size register will be used to determine how
many bits of the final message block (always 512) will be processed. Note that this register has no
data size, and during the write operation, the host data bus is not read. Hence, any data val ue is
accepted. Normally, a write operation with a zero data value is performed. Moreover, no read
operation from this register is meaningful, but no error is generated, and a zero value is always
returned. Writing to this register is merely a trigger causing the MDEU to process the final block
of a message, allowing it to signal DONE.
The DEU EU_GO Register is only used when the MPC184 is operated as a target. The descriptors
and crypto-channel activate the MDEU (via an internally generated write to the EU_Go register)
when the MPC184 acts as an initiator.
310
FieldMDEU EU_GO
Reset
R/WW
AddrMDEU 0x0C050
0
Figure 5-33. MDEU EU_GO Register
5.4.10 MDEU Context Registers
For MDEU, context consists of the hash plus the message length count as shown inFigure 5-34.
Write access to this register block allows continuation of a previous hash. Reading these registers
provide the resulting message digest or HMAC, along with an aggregate bitcount.
NOTE
SHA-1and SHA-256 are big endian. MD5 is little endian. The MDEU
module internally reverses the endianness of the five registers A, B, C,
D, and E upon writing to or reading from the MDEU context if the
MDEU mode register indicates MD5 is the hash of choice. Most other
endian considerations are performed as 8 byte swaps. In this case,
4-byte endianness swapping is perform ed within the A, B, C, D, and
E fields as individual registers. Reading this memory location while
the module is not done will generate an error interrupt.
The MDEU maintains sixteen 32-bit registers for writing an HMAC key. The IPAD and OPAD
operations are performed automatically on the key data when required. Reading any of these
memory locations will generate an address error interrupt.
NOTE
SHA-1 and SHA-256 are big endian. MD5 is little endian. The MDEU
module internally reverses the endian ness of the key u pon writing to
or reading from the MDEU key registers if the MDEU mode register
indicates MD5 is the hash of choice.