Apps     Components     Interfaces     All Files     Source Tree     source: tos.interfaces.TinySecControl.nc

Interface: TinySecControl

Author: Chris Karlof

Components providing this interface:
tos.lib.TinySec.TinySecC
tos.lib.TinySec.TinySecM

Components requiring this interface:
tos.lib.TinySec.SecurityM

Commands

Commands - Details

init

result_t init(uint8_t keySize, uint8_t *encyptionKey, uint8_t *MACKey)

Initializes TinySec. BlockCipherMode and MAC contexts are initialized with respective keys, key size, and block size.

Parameters:

blockSize - block size of the block cipher in bytes

keySize - key size of the block cipher in bytes

encryptionKey - pointer to an array of keySize bytes representing the key used for encryption

MACKey - pointer to an array of keySize bytes representing the key used for calculating MAC's

Returns: Whether TinySec initialization was successful. Reasons for failure include BlockCipherMode or MAC init() failure.