Apps     Components     Interfaces     All Files     Source Tree     source: tos.lib.TinySec.TinySecM.nc

Component: TinySecM

Author: Chris Karlof

Required Interfaces

Provided Interfaces

Variables

Function Index

Function Descriptions

TinySecControl.init

command result_t TinySecControl.init (uint8_t keySize, uint8_t *encryptionKey, 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()