![Freescale Semiconductor i.MX 6DualLite Reference Manual Download Page 324](http://html1.mh-extra.com/html/freescale-semiconductor/i-mx-6duallite/i-mx-6duallite_reference-manual_2330523324.webp)
Configuration of the Secure Memory Driver / Keystore API is dependent on the
following kernel configuration parameters:
CRYPTO_DEV_FSL_CAAM_SM
Turns on the secure memory driver in the kernel build.
CRYPTO_DEV_FSL_CAAM_SM_SLOTSIZE
Configures the size of a secure memory "slot".
Each secure memory unit is block of internal memory, the size of which is
implementation dependent. This block can be subdivided into a number of logical "slots"
of a size which can be selected by this value. The size of these slots needs to be set to a
value that can hold the largest secret size intended, plus the overhead of blob parameters
(blob key and MAC, typically no more than 48 bytes).
The values are selectable as powers of 2, limited to a range of 32 to 512 bytes. The
default value is 7, for a size of 128 bytes.
CRYPTO_DEV_FSL_CAAM_SM_TEST
Enables operation of a captive test / example module that shows how one might use the
API, while verifying it's functionality. The test module works along this flow:
• Creates a number of known clear keys (3 sizes).
• Allocated secure memory slots.
• Inserts those keys into secure memory slots and encapsulates.
• Decapsulates those keys into black keys.
• Enrcrypts DES, AES128, and AES256 plaintext with black keys. Since this uses
symmetric ciphers, same-key encryption/decryption results will be equivalent.
• Decrypts enciphered buffers with equivalent clear keys.
• Compares decrypted results with original ciphertext and compares. If they match, the
test reports OK for each key case tested.
Normal output is reported at the console as follows:
platform caam_sm.0: caam_sm_test: 8-byte key test match OK platform
caam_sm.0: caam_sm_test: 16-byte key test match OK platform caam_sm.0:
caam_sm_test: 32-byte key test match OK
• The secure memory driver is not implemented as a kernel module at this point in
time.
• Implementation is presently limited to kernel-mode operations.
Release a Slot back to the Keystore
i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013
324
Freescale Semiconductor, Inc.