Wisecr and additional documentation for Wisecr: Securely and Simultaneously Updating Many RF Powered Computational RFID Devices
Wisecr is a successor project to SecuCode, that allows securely broadcasting firmware images to many tags and attesting their status.
As a starting point for understanding the code, see:
./src/SecuCodeApp/SecuCodeApp/UpdateRunner.cs
for the Server tool./src/wisp5-base/CCS/wisp-base/internals/authenticate.c
for the tag
The easiest way to flash the bootloader is using TI's Code Composer Studio (tested using CCS 9.0.1):
- Import project into CCS
- Select the
wisp5-bootloader
- Update the fixed key and use the Server Tool in fixed key mode.
- Run the bootloader.
If the process was successful, the tag will be running in firmware accept mode, and should be visible to inventory commands.
NOTE: Be careful with optimization settings, the TI compiler likes to aggressively unroll loops which can cause code size bloat. If more space for the bootloader is required, consider adjusting __Boot_Start
in the linker config file (lnk_msp430fr5969_wisp5_Boot.cmd
) and all other associated values. Note that __Boot_Start
must be 1KB aligned for the MPU memory segmentation to behave correctly.
The server tool is built using Visual Studio 2019 either using the MSBuild
commandline tool, or using the Visual Studio IDE. The project makes use of both C#/.NET components and C/C++ components. The project has been tested to successfully compile on v16.6.0 with the .NET desktop development
and Desktop development with C++
components installed.
To compile on the command-line:
- Either start a
Developer Command Prompt for VS 2019
instance, or run thevsvarsall.bat
command to import the appropriate environment variables. - Navigate to the
./src/SecuCodeApp
- Restore packages using
msbuild.exe -t:Restore
- Build the project
msbuild.exe -p:Configuration=Release
To compile using the Visual Studio IDE:
- Open the
./src/SecuCodeApp/SecuCode.sln
file - Select a concrete architecture (e.g.
x64
orx86
) for the solution target - Build the project
The resultant binary should be available in the ./src/SecuCodeApp/SecuCodeApp/bin/x64
(or similar depending on target architecture).
A precompiled copy of the Server Tool executable is available: ./src/SecuCodeApp/ServerToolExe/WispOtaHost.exe
The Wisecr Server Tool requires that an Impinj R420 reader is available to the host machine.
- Configure tags with their ID and key by editing the
tag_list.toml
file . - Connect to the reader by entering its address (e.g.
169.254.18.*
for link-local connections) and clicking the 'Connect' button. - Load a valid ELF file by clicking the 'Load Program' button.
- Configure which tags will participate in the broadcast process, either automatically (by clicking the 'Detect Valid Tags' button), or by enabling / disability individual tags by right-clicking them in the tag list.
- Start broadcasting the firmware to the tags by clicking the 'Run' button.
- Validate that firmware was successfully loaded by clicking the 'Inventory' button.
Firmware is created in the same way as SecuCode, see the information in the SecuCode repository for more details.
The source code for a number of example firmware that can be transmitted is available in the src/secucode-demo
folder.
This repository is provided as part of the following paper:
Y. Su, M. Chesser, Y. Gao, A. P. Sample. and D. C. Ranasinghe, "Wisecr: Secure simultaneous code dissemination to many batteryless computational RFID devices", in IEEE Transactions on Dependable and Secure Computing.
Cite using:
@article{su2022wisecr,
title={Wisecr: Secure simultaneous code dissemination to many batteryless computational RFID devices},
author={Su, Yang and Chesser, Michael and Gao, Yansong and Sample, Alanson P. and Ranasinghe, Damith C.},
journal={IEEE Transactions on Dependable and Secure Computing},
year={2022}
}
The Wisecr project primarily distributed under the terms of the MIT, with portions of the code covered by various BSD-like licenses.