资源简介
ATSHA204的加密芯片驱动库,可以移植到单片机上。支持IIC总线和单总线
代码片段和文件信息
// ATMEL Microcontroller Software Support - Colorado Springs CO -
// ----------------------------------------------------------------------------
// DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL “AS IS“ AND ANY EXPRESS OR
// IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
// MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
// DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT INDIRECT
// INCIDENTAL SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT
// LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE DATA
// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY WHETHER IN CONTRACT STRICT LIABILITY OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// ----------------------------------------------------------------------------
/** \file
* \brief SHA204 Helper Functions
* \author Tuwuh Sarwoprasojo Atmel Bali Team
* \date November 21 2011
*/
#include // needed for memcpy()
#include
#include “sha204_helper.h“
#include “sha204_lib_return_codes.h“ // declarations of function return codes
#include “sha204_comm_marshaling.h“ // definitions and declarations for the Command module
// Atmel‘s SHA256 implementation
// #include “Sha256_atmel.h“
// Modified free/open-source SHA256 implementation (taken from SA102 library)
#include “sha256.h“
/** \brief This is a wrapper function for SHA256 algorithm.
*
* User can modify this function depending on their SHA256 implementation.
*
* \param [inout] param Structure for input/output parameters. Refer to sha204h_calculate_sha256_in_out.
*/
static void sha204h_calculate_sha256(struct sha204h_calculate_sha256_in_out *param)
{
// This is the “free/open-source“ implementation
sha256(param->message param->length param->digest);
// This is Atmel‘s implementation
// create_sha256(param->length param->message param->digest);
}
/** \brief This function calculates a 32-byte nonce based on 20-byte input value (NumIn) and 32-byte random number (RandOut).
*
* This nonce will match with the nonce generated in the Device by Nonce opcode.
* To use this function Application first executes Nonce command in the Device with a chosen NumIn.
* Nonce opcode Mode parameter must be set to use random nonce (mode 0 or 1).
* The Device generates a nonce stores it in its TempKey and outputs random number RandOut to host.
* This RandOut along with NumIn are passed to nonce calculation function. The function calculates the nonce and returns it.
* This function can also be used to fill in the nonce directly to TempKey (pass-through mode). The flags will automatically set according to the mode us
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-01-08 12:40 sha204_helper\
文件 33500 2014-11-27 18:35 sha204_helper\sha204_helper.c
文件 14002 2014-08-29 18:06 sha204_helper\sha204_helper.h
目录 0 2015-01-08 12:40 sha204_helper\sha256\
文件 15848 2010-01-27 17:33 sha204_helper\sha256\sha256.c
文件 2847 2010-01-27 17:33 sha204_helper\sha256\sha256.h
文件 6957 2011-11-18 11:30 sha204_helper\sha256\Sha256_atmel.c
文件 406 2011-11-18 11:32 sha204_helper\sha256\Sha256_atmel.h
目录 0 2015-05-25 15:24 sha204_library\
目录 0 2015-01-08 12:40 sha204_library\arch\
目录 0 2015-01-08 12:40 sha204_library\arch\samd21\
目录 0 2015-01-08 12:40 sha204_library\arch\samd21\i2c\
文件 8799 2014-12-01 11:11 sha204_library\arch\samd21\i2c\i2c_phys.c
文件 4610 2015-01-23 14:17 sha204_library\arch\samd21\i2c\i2c_phys.h
目录 0 2015-01-08 12:40 sha204_library\arch\samd21\timer\
文件 3973 2015-05-25 14:46 sha204_library\arch\samd21\timer\sha204_timer_utilities.c
文件 2148 2014-12-01 10:45 sha204_library\arch\samd21\timer\sha204_timer_utilities.h
文件 105857 2015-05-25 15:24 sha204_library\Doxyfile
文件 11631 2014-12-01 13:22 sha204_library\sha204_comm.c
文件 4202 2015-01-23 14:16 sha204_library\sha204_comm.h
文件 10526 2015-05-25 15:56 sha204_library\sha204_comm_marshaling.c
文件 26824 2015-05-25 15:17 sha204_library\sha204_comm_marshaling.h
文件 6998 2014-11-28 17:27 sha204_library\sha204_config.h
文件 10066 2014-12-01 11:07 sha204_library\sha204_i2c.c
文件 3945 2014-01-16 10:11 sha204_library\sha204_lib_return_codes.h
文件 4268 2014-12-01 11:03 sha204_library\sha204_physical.h
- 上一篇:控制柜电路图
- 下一篇:高校管理信息系统 数据库设计
相关资源
- elf 加密机制
- servlet中md5加密
- linux加密perl 脚本工具
- 基于OpenSSL的安全聊天程序
- bitlocker加密工具
- 深思4加密狗有驱无驱转换工具
- 基于FPGA用verilogHDL设计的DES加密模块
- 文本加密实验项目
- aes加密算法源代码.rar
- 简单的信息隐藏和DES加密
- 西门子S7-300加密功能块解锁工具
- 信息隐藏加密软件
- STM32 IAP程序代码,固件AES256 加密,
- 十六进制解密10进制和16进制之间的加
- DES加密解密以及Eclipse插件
- 文件加密解密系统
- RM xp 加密工程文件解密器
- Jetson-tx2 加密芯片测试案例
- minifilter 文件透明加密源码
- 加密狗检测工具
- SHA1算法的Delphi版,及其测试程序源码
- 全同态加密实现算法
- 最新外壳加密工具-微狗4.0(支持.ne
- 如何基于STM32系列单片机实现加密保护
- linux-在shell脚本中使用加密密码的轻量
- PGP 加密、解密算法的Delphi源代码.ra
- AB包加密解密.unitypackage
- IC\\ID卡破解加密软件
- 最新版Unity代码混淆加密插件 Obfusca
- delphi RSA加密
评论
共有 条评论