资源简介
mbedtls-2.2.1工具,进行加密,mbed TLS(以前称为PolarSSL)是TLS和SSL协议的实现,并且需要相应的加密算法和支持代码。这是双重许可与Apache许可证 2.0版(与GPLv2许可也可)。网站上指出,mbed TLS的目标是“易于理解,使用,集成和扩展”
代码片段和文件信息
/*
* FIPS-197 compliant AES implementation
*
* Copyright (C) 2006-2015 ARM Limited All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License Version 2.0 (the “License“); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing software
* distributed under the License is distributed on an “AS IS“ BASIS WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of mbed TLS (https://tls.mbed.org)
*/
/*
* The AES block cipher was designed by Vincent Rijmen and Joan Daemen.
*
* http://csrc.nist.gov/encryption/aes/rijndael/Rijndael.pdf
* http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf
*/
#if !defined(MBEDTLS_CONFIG_FILE)
#include “mbedtls/config.h“
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_AES_C)
#include
#include “mbedtls/aes.h“
#if defined(MBEDTLS_PADLOCK_C)
#include “mbedtls/padlock.h“
#endif
#if defined(MBEDTLS_AESNI_C)
#include “mbedtls/aesni.h“
#endif
#if defined(MBEDTLS_SELF_TEST)
#if defined(MBEDTLS_PLATFORM_C)
#include “mbedtls/platform.h“
#else
#include
#define mbedtls_printf printf
#endif /* MBEDTLS_PLATFORM_C */
#endif /* MBEDTLS_SELF_TEST */
#if !defined(MBEDTLS_AES_ALT)
/* Implementation that should never be optimized out by the compiler */
static void mbedtls_zeroize( void *v size_t n ) {
volatile unsigned char *p = v; while( n-- ) *p++ = 0;
}
/*
* 32-bit integer manipulation macros (little endian)
*/
#ifndef GET_UINT32_LE
#define GET_UINT32_LE(nbi) \
{ \
(n) = ( (uint32_t) (b)[(i) ] ) \
| ( (uint32_t) (b)[(i) + 1] << 8 ) \
| ( (uint32_t) (b)[(i) + 2] << 16 ) \
| ( (uint32_t) (b)[(i) + 3] << 24 ); \
}
#endif
#ifndef PUT_UINT32_LE
#define PUT_UINT32_LE(nbi) \
{ \
(b)[(i) ] = (unsigned char) ( ( (n) ) & 0xFF ); \
(b)[(i) + 1] = (unsigned char) ( ( (n) >> 8 ) & 0xFF ); \
(b)[(i) + 2] = (unsigned char) ( ( (n) >> 16 ) & 0xFF ); \
(b)[(i) + 3] = (unsigned char) ( ( (n) >> 24 ) & 0xFF ); \
}
#endif
#if defined(MBEDTLS_PADLOCK_C) && \
( defined(MBEDTLS_HAVE_X86) || defined(MBEDTLS_PADLOCK_ALIGN16) )
static int aes_padlock_ace = -1;
#endif
#if defined(MBEDTLS_AES_ROM_TABLES)
/*
* Forward S-box
*/
static const unsigned char FSb[256] =
{
0x63 0x7C 0x77 0x7B 0xF2 0x6B 0x6F 0xC5
0x30 0x01 0x67 0x2B 0xFE 0xD7 0xAB 0x76
0xCA 0x82 0xC9 0x7D 0xFA 0
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 358 2016-01-05 06:26 mbedtls-2.2.1\.gitignore
文件 889 2016-01-05 06:26 mbedtls-2.2.1\.travis.yml
文件 11358 2016-01-05 06:26 mbedtls-2.2.1\apache-2.0.txt
文件 93811 2016-01-05 06:26 mbedtls-2.2.1\ChangeLog
文件 5537 2016-01-05 06:26 mbedtls-2.2.1\CMakeLists.txt
文件 2804 2016-01-05 06:26 mbedtls-2.2.1\configs\config-ccm-psk-tls1_2.h
文件 2058 2016-01-05 06:26 mbedtls-2.2.1\configs\config-mini-tls1_1.h
文件 1948 2016-01-05 06:26 mbedtls-2.2.1\configs\config-picocoin.h
文件 3533 2016-01-05 06:26 mbedtls-2.2.1\configs\config-suite-b.h
文件 2691 2016-01-05 06:26 mbedtls-2.2.1\configs\config-thread.h
文件 1049 2016-01-05 06:26 mbedtls-2.2.1\configs\README.txt
文件 110 2016-01-05 06:26 mbedtls-2.2.1\DartConfiguration.tcl
文件 3324 2016-01-05 06:26 mbedtls-2.2.1\doxygen\input\doc_encdec.h
文件 1512 2016-01-05 06:26 mbedtls-2.2.1\doxygen\input\doc_hashing.h
文件 3683 2016-01-05 06:26 mbedtls-2.2.1\doxygen\input\doc_mainpage.h
文件 1772 2016-01-05 06:26 mbedtls-2.2.1\doxygen\input\doc_rng.h
文件 2020 2016-01-05 06:26 mbedtls-2.2.1\doxygen\input\doc_ssltls.h
文件 1739 2016-01-05 06:26 mbedtls-2.2.1\doxygen\input\doc_tcpip.h
文件 1762 2016-01-05 06:26 mbedtls-2.2.1\doxygen\input\doc_x509.h
文件 81371 2016-01-05 06:26 mbedtls-2.2.1\doxygen\mbedtls.doxyfile
文件 46 2016-01-05 06:26 mbedtls-2.2.1\include\.gitignore
文件 294 2016-01-05 06:26 mbedtls-2.2.1\include\CMakeLists.txt
文件 10395 2016-01-05 06:26 mbedtls-2.2.1\include\mbedtls\aes.h
文件 3417 2016-01-05 06:26 mbedtls-2.2.1\include\mbedtls\aesni.h
文件 2669 2016-01-05 06:26 mbedtls-2.2.1\include\mbedtls\arc4.h
文件 11762 2016-01-05 06:26 mbedtls-2.2.1\include\mbedtls\asn1.h
文件 9307 2016-01-05 06:26 mbedtls-2.2.1\include\mbedtls\asn1write.h
文件 3134 2016-01-05 06:26 mbedtls-2.2.1\include\mbedtls\ba
文件 24449 2016-01-05 06:26 mbedtls-2.2.1\include\mbedtls\bignum.h
文件 7482 2016-01-05 06:26 mbedtls-2.2.1\include\mbedtls\blowfish.h
............此处省略690个文件信息
评论
共有 条评论