Update CyaSSL to latest version.

This commit is contained in:
Richard Barry 2014-07-18 18:54:25 +00:00
parent 5fcd270398
commit 3d007d0b4b
445 changed files with 162375 additions and 26182 deletions

View file

@ -0,0 +1,28 @@
void _mon_putc(char c);
static void init_serial() {
#ifdef MICROCHIP_PIC32
#if defined (__32MZ2048ECH144__) || (__32MZ2048ECM144__)
/* Set up PB2 divisor for UART2 */
SYSKEY = 0x00000000;
SYSKEY = 0xAA996655;
SYSKEY = 0x556699AA;
PB2DIV = 0x00008808;
SYSKEY = 0x33333333;
/* UART2 Init */
// U2BRG = 0x0C;
U2BRG = 0x047;
ANSELBCLR = 0x4000;
ANSELGCLR = 0x0040;
RPB14R = 0x02;
U2RXR = 0x01;
U2MODE = 0x8000;
U2STA = 0x400;
#elif defined __PIC32MX__
SYSTEMConfigPerformance(80000000);
DBINIT();
#endif
#endif
}

View file

@ -0,0 +1,57 @@
CyaSSL MPLAB X Project Files
This directory contains project files for the Microchip MPLAB X IDE. These
projects have been set up to use the Microchip PIC32 Ethernet Starter Kit
and the Microchip XC32 compiler.
In order to generate the necessary auto-generated MPLAB X files, make sure
to import the cyassl.X project into your MPLAB X workspace before trying to
build either the CTaoCrypt test or benchmark applications. This will
correctly set up the respective project's Makefiles.
Included Project Files
-----------------------
1. CyaSSL library (cyassl.X)
This project builds a static CyaSSL library. Prior to building this
project, uncomment the MICROCHIP_PIC32 define located in:
<cyassl_root>/cyassl/ctaocrypt/settings.h
After this project has been built, the compiled library will be located
at:
<cyassl_root>/mplabx/cyassl.X/dist/default/production/cyassl.X.a
2. CTaoCrypt Test App (ctaocrypt_test.X)
This project tests the CTaoCrypt cryptography modules. It is generally
a good idea to run this first on an embedded system after compiling
CyaSSL in order to verify all underlying crypto is working correctly.
3. CTaoCrypt Benchmark App (ctaocrypt_benchmark.X)
This project builds the CTaoCrypt benchmark application.
For the benchmark timer, adjust CLOCK value under
"#elif defined MICROCHIP_PIC32" in ctaocrypt/benchmark/benchmark.c
PIC32MX/PIC32MZ
---------------
The projects are set for PIC32MX by default. For PIC32MZ, change project
properties->Devices and add "CYASSL_MICROCHIP_PIC32M" to
XC32-gcc->Preprocessing and messages-> Preprocessor macros.
MIPS16 and MIPS32 Support
-------------------------
These projects support both MIPS16 and MIPS32 instruction sets. Switching
between these two instruction sets can be done in each project's properties
settings by checking the "Generate 16-bit code" checkbox.
Support
-------
Please send questions or comments to support@wolfssl.com

View file

@ -0,0 +1,141 @@
/* benchmark_main.c
*
* Copyright (C) 2006-2014 wolfSSL Inc.
*
* This file is part of CyaSSL.
*
* CyaSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* CyaSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <cyassl/ctaocrypt/settings.h>
#if defined(CYASSL_MICROCHIP_PIC32MZ)
#define MICROCHIP_PIC32
#include <xc.h>
#include "MZ-configBits.h"
#include "PIC32MZ-serial.h"
#define SYSTEMConfigPerformance /* void out SYSTEMConfigPerformance(); */
#else
#define PIC32_STARTER_KIT
#include <p32xxxx.h>
#include <plib.h>
#include <sys/appio.h>
#define init_serial() /* void out init_serial() ; */
#endif
void bench_des(void);
void bench_arc4(void);
void bench_hc128(void);
void bench_rabbit(void);
void bench_aes(int);
void bench_aesgcm(void);
void bench_md5(void);
void bench_sha(void);
void bench_sha256(void);
void bench_sha512(void);
void bench_ripemd(void);
void bench_rsa(void);
void bench_rsaKeyGen(void);
void bench_dh(void);
#ifdef HAVE_ECC
void bench_eccKeyGen(void);
void bench_eccKeyAgree(void);
#endif
/*
* Main driver for CTaoCrypt benchmarks.
*/
int main(int argc, char** argv) {
volatile int i ;
int j ;
PRECONbits.PFMWS = 2;
PRECONbits.PREFEN = 0b11;
init_serial() ; /* initialize PIC32MZ serial I/O */
SYSTEMConfigPerformance(80000000);
DBINIT();
for(j=0; j<100; j++) {
for(i=0; i<10000000; i++);
printf("time=%f\n", current_time(0)) ;
}
printf("wolfCrypt Benchmark:\n");
#ifndef NO_AES
bench_aes(0);
bench_aes(1);
#endif
#ifdef HAVE_AESGCM
bench_aesgcm();
#endif
#ifndef NO_RC4
bench_arc4();
#endif
#ifdef HAVE_HC128
bench_hc128();
#endif
#ifndef NO_RABBIT
bench_rabbit();
#endif
#ifndef NO_DES3
bench_des();
#endif
printf("\n");
#ifndef NO_MD5
bench_md5();
#endif
bench_sha();
#ifndef NO_SHA256
bench_sha256();
#endif
#ifdef CYASSL_SHA512
bench_sha512();
#endif
#ifdef CYASSL_RIPEMD
bench_ripemd();
#endif
printf("\n");
#ifndef NO_RSA
bench_rsa();
#endif
#ifndef NO_DH
bench_dh();
#endif
#if defined(CYASSL_KEY_GEN) && !defined(NO_RSA)
bench_rsaKeyGen();
#endif
#ifdef HAVE_ECC
bench_eccKeyGen();
bench_eccKeyAgree();
#endif
printf("End of wolfCrypt Benchmark:\n");
return 0;
}

View file

@ -0,0 +1,108 @@
#
# There exist several targets which are by default empty and which can be
# used for execution of your targets. These targets are usually executed
# before and after some main targets. They are:
#
# .build-pre: called before 'build' target
# .build-post: called after 'build' target
# .clean-pre: called before 'clean' target
# .clean-post: called after 'clean' target
# .clobber-pre: called before 'clobber' target
# .clobber-post: called after 'clobber' target
# .all-pre: called before 'all' target
# .all-post: called after 'all' target
# .help-pre: called before 'help' target
# .help-post: called after 'help' target
#
# Targets beginning with '.' are not intended to be called on their own.
#
# Main targets can be executed directly, and they are:
#
# build build a specific configuration
# clean remove built files from a configuration
# clobber remove all built files
# all build all configurations
# help print help mesage
#
# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
# .help-impl are implemented in nbproject/makefile-impl.mk.
#
# Available make variables:
#
# CND_BASEDIR base directory for relative paths
# CND_DISTDIR default top distribution directory (build artifacts)
# CND_BUILDDIR default top build directory (object files, ...)
# CONF name of current configuration
# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
#
# NOCDDL
# Environment
MKDIR=mkdir
CP=cp
CCADMIN=CCadmin
RANLIB=ranlib
# build
build: .build-post
.build-pre:
# Add your pre 'build' code here...
.build-post: .build-impl
# Add your post 'build' code here...
# clean
clean: .clean-post
.clean-pre:
# Add your pre 'clean' code here...
.clean-post: .clean-impl
# Add your post 'clean' code here...
# clobber
clobber: .clobber-post
.clobber-pre:
# Add your pre 'clobber' code here...
.clobber-post: .clobber-impl
# Add your post 'clobber' code here...
# all
all: .all-post
.all-pre:
# Add your pre 'all' code here...
.all-post: .all-impl
# Add your post 'all' code here...
# help
help: .help-post
.help-pre:
# Add your pre 'help' code here...
.help-post: .help-impl
# Add your post 'help' code here...
# include project implementation makefile
include nbproject/Makefile-impl.mk
# include project make variables
include nbproject/Makefile-variables.mk

View file

@ -0,0 +1,193 @@
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="62">
<logicalFolder name="root" displayName="root" projectFiles="true">
<logicalFolder name="HeaderFiles"
displayName="Header Files"
projectFiles="true">
</logicalFolder>
<logicalFolder name="LinkerScript"
displayName="Linker Files"
projectFiles="true">
</logicalFolder>
<logicalFolder name="SourceFiles"
displayName="Source Files"
projectFiles="true">
<itemPath>../../ctaocrypt/benchmark/benchmark.c</itemPath>
<itemPath>../benchmark_main.c</itemPath>
</logicalFolder>
<logicalFolder name="ExternalFiles"
displayName="Important Files"
projectFiles="false">
<itemPath>Makefile</itemPath>
</logicalFolder>
</logicalFolder>
<sourceRootList>
<Elem>..</Elem>
</sourceRootList>
<projectmakefile>Makefile</projectmakefile>
<confs>
<conf name="default" type="2">
<toolsSet>
<developmentServer>localhost</developmentServer>
<targetDevice>PIC32MX795F512L</targetDevice>
<targetHeader></targetHeader>
<targetPluginBoard></targetPluginBoard>
<platformTool>PKOBSKDEPlatformTool</platformTool>
<languageToolchain>XC32</languageToolchain>
<languageToolchainVersion>1.10</languageToolchainVersion>
<platform>3</platform>
</toolsSet>
<compileType>
<linkerTool>
<linkerLibItems>
<linkerLibProjectItem>
<makeArtifact PL="../cyassl.X"
CT="3"
CN="default"
AC="true"
BL="true"
WD="../cyassl.X"
BC="${MAKE} MAKE_OPTIONS=&quot;&quot; -f Makefile CONF=default"
DBC="${MAKE} MAKE_OPTIONS=&quot;&quot; -f Makefile CONF=default TYPE_IMAGE=DEBUG_RUN"
CC="rm -rf &quot;build/default&quot; &quot;dist/default&quot;"
OP="dist/default/production/cyassl.X.a"
DOP="dist/default/debug/cyassl.X.a"
FL="dist/default/production/cyassl.X.a"
PD="dist/default/production/cyassl.X."
DD="dist/default/debug/cyassl.X.">
</makeArtifact>
</linkerLibProjectItem>
</linkerLibItems>
</linkerTool>
<loading>
<useAlternateLoadableFile>false</useAlternateLoadableFile>
<alternateLoadableFile></alternateLoadableFile>
</loading>
</compileType>
<makeCustomizationType>
<makeCustomizationPreStepEnabled>false</makeCustomizationPreStepEnabled>
<makeCustomizationPreStep></makeCustomizationPreStep>
<makeCustomizationPostStepEnabled>false</makeCustomizationPostStepEnabled>
<makeCustomizationPostStep></makeCustomizationPostStep>
<makeCustomizationPutChecksumInUserID>false</makeCustomizationPutChecksumInUserID>
<makeCustomizationEnableLongLines>false</makeCustomizationEnableLongLines>
<makeCustomizationNormalizeHexFile>false</makeCustomizationNormalizeHexFile>
</makeCustomizationType>
<C32>
<property key="additional-warnings" value="false"/>
<property key="enable-app-io" value="false"/>
<property key="enable-omit-frame-pointer" value="false"/>
<property key="enable-symbols" value="true"/>
<property key="enable-unroll-loops" value="false"/>
<property key="exclude-floating-point" value="false"/>
<property key="extra-include-directories" value="../../"/>
<property key="generate-16-bit-code" value="false"/>
<property key="isolate-each-function" value="false"/>
<property key="make-warnings-into-errors" value="false"/>
<property key="optimization-level" value="-O1"/>
<property key="place-data-into-section" value="false"/>
<property key="post-instruction-scheduling" value="default"/>
<property key="pre-instruction-scheduling" value="default"/>
<property key="preprocessor-macros"
value="NO_MAIN_DRIVER;USE_CERT_BUFFERS_1024;BENCH_EMBEDDED;HAVE_ECC;CYASSL_SHA512"/>
<property key="strict-ansi" value="false"/>
<property key="support-ansi" value="false"/>
<property key="use-cci" value="false"/>
<property key="use-iar" value="false"/>
<property key="use-indirect-calls" value="false"/>
</C32>
<C32-AS>
<property key="assembler-symbols" value=""/>
<property key="enable-symbols" value="true"/>
<property key="exclude-floating-point-library" value="false"/>
<property key="expand-macros" value="false"/>
<property key="extra-include-directories-for-assembler" value=""/>
<property key="extra-include-directories-for-preprocessor" value=""/>
<property key="false-conditionals" value="false"/>
<property key="keep-locals" value="false"/>
<property key="list-assembly" value="false"/>
<property key="list-source" value="false"/>
<property key="list-symbols" value="false"/>
<property key="oXC32asm-list-to-file" value="false"/>
<property key="omit-debug-dirs" value="false"/>
<property key="omit-forms" value="false"/>
<property key="preprocessor-macros" value=""/>
<property key="warning-level" value=""/>
</C32-AS>
<C32-LD>
<property key="additional-options-use-response-files" value="false"/>
<property key="enable-check-sections" value="false"/>
<property key="exclude-floating-point-library" value="false"/>
<property key="exclude-standard-libraries" value="false"/>
<property key="extra-lib-directories" value=""/>
<property key="generate-16-bit-code" value="false"/>
<property key="generate-cross-reference-file" value="false"/>
<property key="heap-size" value="20480"/>
<property key="input-libraries" value=""/>
<property key="linker-symbols" value=""/>
<property key="map-file" value=""/>
<property key="no-startup-files" value="false"/>
<property key="oXC32ld-extra-opts" value=""/>
<property key="optimization-level" value="-O3"/>
<property key="preprocessor-macros" value=""/>
<property key="remove-unused-sections" value="false"/>
<property key="report-memory-usage" value="false"/>
<property key="stack-size" value="20480"/>
<property key="symbol-stripping" value=""/>
<property key="trace-symbols" value=""/>
<property key="warn-section-align" value="false"/>
</C32-LD>
<C32CPP>
<property key="additional-warnings" value="false"/>
<property key="check-new" value="false"/>
<property key="eh-specs" value="true"/>
<property key="enable-app-io" value="false"/>
<property key="enable-omit-frame-pointer" value="false"/>
<property key="enable-symbols" value="true"/>
<property key="enable-unroll-loops" value="false"/>
<property key="exceptions" value="true"/>
<property key="exclude-floating-point" value="false"/>
<property key="extra-include-directories" value=""/>
<property key="generate-16-bit-code" value="false"/>
<property key="isolate-each-function" value="false"/>
<property key="make-warnings-into-errors" value="false"/>
<property key="optimization-level" value=""/>
<property key="place-data-into-section" value="false"/>
<property key="post-instruction-scheduling" value="default"/>
<property key="pre-instruction-scheduling" value="default"/>
<property key="preprocessor-macros" value=""/>
<property key="rtti" value="true"/>
<property key="strict-ansi" value="false"/>
<property key="use-cci" value="false"/>
<property key="use-indirect-calls" value="false"/>
</C32CPP>
<C32Global>
<property key="legacy-libc" value="false"/>
<property key="save-temps" value="false"/>
<property key="wpo-lto" value="false"/>
</C32Global>
<PKOBSKDEPlatformTool>
<property key="AutoSelectMemRanges" value="auto"/>
<property key="SecureSegment.SegmentProgramming" value="FullChipProgramming"/>
<property key="ToolFirmwareFilePath"
value="Press to browse for a specific firmware version"/>
<property key="ToolFirmwareOption.UseLatestFirmware" value="true"/>
<property key="memories.configurationmemory" value="true"/>
<property key="memories.eeprom" value="true"/>
<property key="memories.id" value="true"/>
<property key="memories.programmemory" value="true"/>
<property key="memories.programmemory.end" value="0x1d07ffff"/>
<property key="memories.programmemory.start" value="0x1d000000"/>
<property key="poweroptions.powerenable" value="false"/>
<property key="programoptions.eraseb4program" value="true"/>
<property key="programoptions.preserveeeprom" value="false"/>
<property key="programoptions.preserveprogramrange" value="false"/>
<property key="programoptions.preserveprogramrange.end" value="0x1d0001ff"/>
<property key="programoptions.preserveprogramrange.start" value="0x1d000000"/>
<property key="programoptions.usehighvoltageonmclr" value="false"/>
<property key="programoptions.uselvpprogramming" value="false"/>
<property key="voltagevalue" value="3.25"/>
</PKOBSKDEPlatformTool>
</conf>
</confs>
</configurationDescriptor>

View file

@ -0,0 +1,11 @@
# vim:ft=automake
# All paths should be given relative to the root
#
EXTRA_DIST += \
mplabx/ctaocrypt_benchmark.X/Makefile
EXTRA_DIST += \
mplabx/ctaocrypt_benchmark.X/nbproject/configurations.xml \
mplabx/ctaocrypt_benchmark.X/nbproject/project.xml

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/make-project/1">
<name>ctaocrypt_benchmark</name>
<creation-uuid>22e4138b-5f20-4957-ac0a-c181b94d3342</creation-uuid>
<make-project-type>0</make-project-type>
<c-extensions>c</c-extensions>
<cpp-extensions/>
<header-extensions/>
<sourceEncoding>ISO-8859-1</sourceEncoding>
<asminc-extensions/>
<make-dep-projects>
<make-dep-project>../cyassl.X</make-dep-project>
</make-dep-projects>
</data>
</configuration>
</project>

View file

@ -0,0 +1,108 @@
#
# There exist several targets which are by default empty and which can be
# used for execution of your targets. These targets are usually executed
# before and after some main targets. They are:
#
# .build-pre: called before 'build' target
# .build-post: called after 'build' target
# .clean-pre: called before 'clean' target
# .clean-post: called after 'clean' target
# .clobber-pre: called before 'clobber' target
# .clobber-post: called after 'clobber' target
# .all-pre: called before 'all' target
# .all-post: called after 'all' target
# .help-pre: called before 'help' target
# .help-post: called after 'help' target
#
# Targets beginning with '.' are not intended to be called on their own.
#
# Main targets can be executed directly, and they are:
#
# build build a specific configuration
# clean remove built files from a configuration
# clobber remove all built files
# all build all configurations
# help print help mesage
#
# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
# .help-impl are implemented in nbproject/makefile-impl.mk.
#
# Available make variables:
#
# CND_BASEDIR base directory for relative paths
# CND_DISTDIR default top distribution directory (build artifacts)
# CND_BUILDDIR default top build directory (object files, ...)
# CONF name of current configuration
# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
#
# NOCDDL
# Environment
MKDIR=mkdir
CP=cp
CCADMIN=CCadmin
RANLIB=ranlib
# build
build: .build-post
.build-pre:
# Add your pre 'build' code here...
.build-post: .build-impl
# Add your post 'build' code here...
# clean
clean: .clean-post
.clean-pre:
# Add your pre 'clean' code here...
.clean-post: .clean-impl
# Add your post 'clean' code here...
# clobber
clobber: .clobber-post
.clobber-pre:
# Add your pre 'clobber' code here...
.clobber-post: .clobber-impl
# Add your post 'clobber' code here...
# all
all: .all-post
.all-pre:
# Add your pre 'all' code here...
.all-post: .all-impl
# Add your post 'all' code here...
# help
help: .help-post
.help-pre:
# Add your pre 'help' code here...
.help-post: .help-impl
# Add your post 'help' code here...
# include project implementation makefile
include nbproject/Makefile-impl.mk
# include project make variables
include nbproject/Makefile-variables.mk

View file

@ -0,0 +1,194 @@
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="62">
<logicalFolder name="root" displayName="root" projectFiles="true">
<logicalFolder name="HeaderFiles"
displayName="Header Files"
projectFiles="true">
<itemPath>../../ctaocrypt/test/test.h</itemPath>
</logicalFolder>
<logicalFolder name="LinkerScript"
displayName="Linker Files"
projectFiles="true">
</logicalFolder>
<logicalFolder name="SourceFiles"
displayName="Source Files"
projectFiles="true">
<itemPath>../../ctaocrypt/test/test.c</itemPath>
<itemPath>../test_main.c</itemPath>
</logicalFolder>
<logicalFolder name="ExternalFiles"
displayName="Important Files"
projectFiles="false">
<itemPath>Makefile</itemPath>
</logicalFolder>
</logicalFolder>
<sourceRootList>
<Elem>..</Elem>
</sourceRootList>
<projectmakefile>Makefile</projectmakefile>
<confs>
<conf name="default" type="2">
<toolsSet>
<developmentServer>localhost</developmentServer>
<targetDevice>PIC32MX795F512L</targetDevice>
<targetHeader></targetHeader>
<targetPluginBoard></targetPluginBoard>
<platformTool>PKOBSKDEPlatformTool</platformTool>
<languageToolchain>XC32</languageToolchain>
<languageToolchainVersion>1.10</languageToolchainVersion>
<platform>3</platform>
</toolsSet>
<compileType>
<linkerTool>
<linkerLibItems>
<linkerLibProjectItem>
<makeArtifact PL="../cyassl.X"
CT="3"
CN="default"
AC="true"
BL="true"
WD="../cyassl.X"
BC="${MAKE} MAKE_OPTIONS=&quot;&quot; -f Makefile CONF=default"
DBC="${MAKE} MAKE_OPTIONS=&quot;&quot; -f Makefile CONF=default TYPE_IMAGE=DEBUG_RUN"
CC="rm -rf &quot;build/default&quot; &quot;dist/default&quot;"
OP="dist/default/production/cyassl.X.a"
DOP="dist/default/debug/cyassl.X.a"
FL="dist/default/production/cyassl.X.a"
PD="dist/default/production/cyassl.X."
DD="dist/default/debug/cyassl.X.">
</makeArtifact>
</linkerLibProjectItem>
</linkerLibItems>
</linkerTool>
<loading>
<useAlternateLoadableFile>false</useAlternateLoadableFile>
<alternateLoadableFile></alternateLoadableFile>
</loading>
</compileType>
<makeCustomizationType>
<makeCustomizationPreStepEnabled>false</makeCustomizationPreStepEnabled>
<makeCustomizationPreStep></makeCustomizationPreStep>
<makeCustomizationPostStepEnabled>false</makeCustomizationPostStepEnabled>
<makeCustomizationPostStep></makeCustomizationPostStep>
<makeCustomizationPutChecksumInUserID>false</makeCustomizationPutChecksumInUserID>
<makeCustomizationEnableLongLines>false</makeCustomizationEnableLongLines>
<makeCustomizationNormalizeHexFile>false</makeCustomizationNormalizeHexFile>
</makeCustomizationType>
<C32>
<property key="additional-warnings" value="false"/>
<property key="enable-app-io" value="false"/>
<property key="enable-omit-frame-pointer" value="false"/>
<property key="enable-symbols" value="false"/>
<property key="enable-unroll-loops" value="false"/>
<property key="exclude-floating-point" value="false"/>
<property key="extra-include-directories" value="../../"/>
<property key="generate-16-bit-code" value="false"/>
<property key="isolate-each-function" value="false"/>
<property key="make-warnings-into-errors" value="false"/>
<property key="optimization-level" value="-O3"/>
<property key="place-data-into-section" value="false"/>
<property key="post-instruction-scheduling" value="default"/>
<property key="pre-instruction-scheduling" value="default"/>
<property key="preprocessor-macros"
value="NO_MAIN_DRIVER;USE_CERT_BUFFERS_1024;CYASSL_SHA384;CYASSL_SHA512;HAVE_ECC"/>
<property key="strict-ansi" value="false"/>
<property key="support-ansi" value="false"/>
<property key="use-cci" value="false"/>
<property key="use-iar" value="false"/>
<property key="use-indirect-calls" value="false"/>
</C32>
<C32-AS>
<property key="assembler-symbols" value=""/>
<property key="enable-symbols" value="true"/>
<property key="exclude-floating-point-library" value="false"/>
<property key="expand-macros" value="false"/>
<property key="extra-include-directories-for-assembler" value=""/>
<property key="extra-include-directories-for-preprocessor" value=""/>
<property key="false-conditionals" value="false"/>
<property key="keep-locals" value="false"/>
<property key="list-assembly" value="false"/>
<property key="list-source" value="false"/>
<property key="list-symbols" value="false"/>
<property key="oXC32asm-list-to-file" value="false"/>
<property key="omit-debug-dirs" value="false"/>
<property key="omit-forms" value="false"/>
<property key="preprocessor-macros" value=""/>
<property key="warning-level" value=""/>
</C32-AS>
<C32-LD>
<property key="additional-options-use-response-files" value="false"/>
<property key="enable-check-sections" value="false"/>
<property key="exclude-floating-point-library" value="false"/>
<property key="exclude-standard-libraries" value="false"/>
<property key="extra-lib-directories" value=""/>
<property key="generate-16-bit-code" value="false"/>
<property key="generate-cross-reference-file" value="false"/>
<property key="heap-size" value="20480"/>
<property key="input-libraries" value=""/>
<property key="linker-symbols" value=""/>
<property key="map-file" value=""/>
<property key="no-startup-files" value="false"/>
<property key="oXC32ld-extra-opts" value=""/>
<property key="optimization-level" value="-Os"/>
<property key="preprocessor-macros" value=""/>
<property key="remove-unused-sections" value="true"/>
<property key="report-memory-usage" value="false"/>
<property key="stack-size" value=""/>
<property key="symbol-stripping" value=""/>
<property key="trace-symbols" value=""/>
<property key="warn-section-align" value="false"/>
</C32-LD>
<C32CPP>
<property key="additional-warnings" value="false"/>
<property key="check-new" value="false"/>
<property key="eh-specs" value="true"/>
<property key="enable-app-io" value="false"/>
<property key="enable-omit-frame-pointer" value="false"/>
<property key="enable-symbols" value="true"/>
<property key="enable-unroll-loops" value="false"/>
<property key="exceptions" value="true"/>
<property key="exclude-floating-point" value="false"/>
<property key="extra-include-directories" value=""/>
<property key="generate-16-bit-code" value="false"/>
<property key="isolate-each-function" value="false"/>
<property key="make-warnings-into-errors" value="false"/>
<property key="optimization-level" value=""/>
<property key="place-data-into-section" value="false"/>
<property key="post-instruction-scheduling" value="default"/>
<property key="pre-instruction-scheduling" value="default"/>
<property key="preprocessor-macros" value=""/>
<property key="rtti" value="true"/>
<property key="strict-ansi" value="false"/>
<property key="use-cci" value="false"/>
<property key="use-indirect-calls" value="false"/>
</C32CPP>
<C32Global>
<property key="legacy-libc" value="false"/>
<property key="save-temps" value="false"/>
<property key="wpo-lto" value="false"/>
</C32Global>
<PKOBSKDEPlatformTool>
<property key="AutoSelectMemRanges" value="auto"/>
<property key="SecureSegment.SegmentProgramming" value="FullChipProgramming"/>
<property key="ToolFirmwareFilePath"
value="Press to browse for a specific firmware version"/>
<property key="ToolFirmwareOption.UseLatestFirmware" value="true"/>
<property key="memories.configurationmemory" value="true"/>
<property key="memories.eeprom" value="true"/>
<property key="memories.id" value="true"/>
<property key="memories.programmemory" value="true"/>
<property key="memories.programmemory.end" value="0x1d07ffff"/>
<property key="memories.programmemory.start" value="0x1d000000"/>
<property key="poweroptions.powerenable" value="false"/>
<property key="programoptions.eraseb4program" value="true"/>
<property key="programoptions.preserveeeprom" value="false"/>
<property key="programoptions.preserveprogramrange" value="false"/>
<property key="programoptions.preserveprogramrange.end" value="0x1d0001ff"/>
<property key="programoptions.preserveprogramrange.start" value="0x1d000000"/>
<property key="programoptions.usehighvoltageonmclr" value="false"/>
<property key="programoptions.uselvpprogramming" value="false"/>
<property key="voltagevalue" value="3.25"/>
</PKOBSKDEPlatformTool>
</conf>
</confs>
</configurationDescriptor>

View file

@ -0,0 +1,11 @@
# vim:ft=automake
# All paths should be given relative to the root
#
EXTRA_DIST += \
mplabx/ctaocrypt_test.X/Makefile
EXTRA_DIST += \
mplabx/ctaocrypt_test.X/nbproject/configurations.xml \
mplabx/ctaocrypt_test.X/nbproject/project.xml

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/make-project/1">
<name>ctaocrypt_test</name>
<creation-uuid>b34c4937-7042-4352-88b1-7717bcdf8aeb</creation-uuid>
<make-project-type>0</make-project-type>
<c-extensions>c</c-extensions>
<cpp-extensions/>
<header-extensions>h</header-extensions>
<sourceEncoding>ISO-8859-1</sourceEncoding>
<asminc-extensions/>
<make-dep-projects>
<make-dep-project>../cyassl.X</make-dep-project>
</make-dep-projects>
</data>
</configuration>
</project>

View file

@ -0,0 +1,108 @@
#
# There exist several targets which are by default empty and which can be
# used for execution of your targets. These targets are usually executed
# before and after some main targets. They are:
#
# .build-pre: called before 'build' target
# .build-post: called after 'build' target
# .clean-pre: called before 'clean' target
# .clean-post: called after 'clean' target
# .clobber-pre: called before 'clobber' target
# .clobber-post: called after 'clobber' target
# .all-pre: called before 'all' target
# .all-post: called after 'all' target
# .help-pre: called before 'help' target
# .help-post: called after 'help' target
#
# Targets beginning with '.' are not intended to be called on their own.
#
# Main targets can be executed directly, and they are:
#
# build build a specific configuration
# clean remove built files from a configuration
# clobber remove all built files
# all build all configurations
# help print help mesage
#
# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
# .help-impl are implemented in nbproject/makefile-impl.mk.
#
# Available make variables:
#
# CND_BASEDIR base directory for relative paths
# CND_DISTDIR default top distribution directory (build artifacts)
# CND_BUILDDIR default top build directory (object files, ...)
# CONF name of current configuration
# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
#
# NOCDDL
# Environment
MKDIR=mkdir
CP=cp
CCADMIN=CCadmin
RANLIB=ranlib
# build
build: .build-post
.build-pre:
# Add your pre 'build' code here...
.build-post: .build-impl
# Add your post 'build' code here...
# clean
clean: .clean-post
.clean-pre:
# Add your pre 'clean' code here...
.clean-post: .clean-impl
# Add your post 'clean' code here...
# clobber
clobber: .clobber-post
.clobber-pre:
# Add your pre 'clobber' code here...
.clobber-post: .clobber-impl
# Add your post 'clobber' code here...
# all
all: .all-post
.all-pre:
# Add your pre 'all' code here...
.all-post: .all-impl
# Add your post 'all' code here...
# help
help: .help-post
.help-pre:
# Add your pre 'help' code here...
.help-post: .help-impl
# Add your post 'help' code here...
# include project implementation makefile
include nbproject/Makefile-impl.mk
# include project make variables
include nbproject/Makefile-variables.mk

View file

@ -0,0 +1,208 @@
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="62">
<logicalFolder name="root" displayName="root" projectFiles="true">
<logicalFolder name="HeaderFiles"
displayName="Header Files"
projectFiles="true">
</logicalFolder>
<logicalFolder name="LinkerScript"
displayName="Linker Files"
projectFiles="true">
</logicalFolder>
<logicalFolder name="SourceFiles"
displayName="Source Files"
projectFiles="true">
<itemPath>../../src/crl.c</itemPath>
<itemPath>../../src/internal.c</itemPath>
<itemPath>../../src/io.c</itemPath>
<itemPath>../../src/keys.c</itemPath>
<itemPath>../../src/ocsp.c</itemPath>
<itemPath>../../src/sniffer.c</itemPath>
<itemPath>../../src/ssl.c</itemPath>
<itemPath>../../src/tls.c</itemPath>
<itemPath>../../ctaocrypt/src/aes.c</itemPath>
<itemPath>../../ctaocrypt/src/arc4.c</itemPath>
<itemPath>../../ctaocrypt/src/asm.c</itemPath>
<itemPath>../../ctaocrypt/src/asn.c</itemPath>
<itemPath>../../ctaocrypt/src/coding.c</itemPath>
<itemPath>../../ctaocrypt/src/des3.c</itemPath>
<itemPath>../../ctaocrypt/src/dh.c</itemPath>
<itemPath>../../ctaocrypt/src/dsa.c</itemPath>
<itemPath>../../ctaocrypt/src/ecc.c</itemPath>
<itemPath>../../ctaocrypt/src/ecc_fp.c</itemPath>
<itemPath>../../ctaocrypt/src/error.c</itemPath>
<itemPath>../../ctaocrypt/src/hc128.c</itemPath>
<itemPath>../../ctaocrypt/src/hmac.c</itemPath>
<itemPath>../../ctaocrypt/src/integer.c</itemPath>
<itemPath>../../ctaocrypt/src/logging.c</itemPath>
<itemPath>../../ctaocrypt/src/md2.c</itemPath>
<itemPath>../../ctaocrypt/src/md4.c</itemPath>
<itemPath>../../ctaocrypt/src/md5.c</itemPath>
<itemPath>../../ctaocrypt/src/memory.c</itemPath>
<itemPath>../../ctaocrypt/src/misc.c</itemPath>
<itemPath>../../ctaocrypt/src/pwdbased.c</itemPath>
<itemPath>../../ctaocrypt/src/rabbit.c</itemPath>
<itemPath>../../ctaocrypt/src/random.c</itemPath>
<itemPath>../../ctaocrypt/src/ripemd.c</itemPath>
<itemPath>../../ctaocrypt/src/rsa.c</itemPath>
<itemPath>../../ctaocrypt/src/sha.c</itemPath>
<itemPath>../../ctaocrypt/src/sha256.c</itemPath>
<itemPath>../../ctaocrypt/src/sha512.c</itemPath>
<itemPath>../../ctaocrypt/src/tfm.c</itemPath>
<itemPath>../../ctaocrypt/src/wc_port.c</itemPath>
</logicalFolder>
<logicalFolder name="ExternalFiles"
displayName="Important Files"
projectFiles="false">
<itemPath>Makefile</itemPath>
</logicalFolder>
</logicalFolder>
<sourceRootList>
<Elem>..</Elem>
<Elem>../../cyassl/ctaocrypt</Elem>
<Elem>../../ctaocrypt/src</Elem>
</sourceRootList>
<projectmakefile>Makefile</projectmakefile>
<confs>
<conf name="default" type="3">
<toolsSet>
<developmentServer>localhost</developmentServer>
<targetDevice>PIC32MX795F512L</targetDevice>
<targetHeader></targetHeader>
<targetPluginBoard></targetPluginBoard>
<platformTool>PKOBSKDEPlatformTool</platformTool>
<languageToolchain>XC32</languageToolchain>
<languageToolchainVersion>1.10</languageToolchainVersion>
<platform>3</platform>
</toolsSet>
<compileType>
<archiverTool>
</archiverTool>
</compileType>
<makeCustomizationType>
<makeCustomizationPreStepEnabled>false</makeCustomizationPreStepEnabled>
<makeCustomizationPreStep></makeCustomizationPreStep>
<makeCustomizationPostStepEnabled>false</makeCustomizationPostStepEnabled>
<makeCustomizationPostStep></makeCustomizationPostStep>
<makeCustomizationPutChecksumInUserID>false</makeCustomizationPutChecksumInUserID>
<makeCustomizationEnableLongLines>false</makeCustomizationEnableLongLines>
<makeCustomizationNormalizeHexFile>false</makeCustomizationNormalizeHexFile>
</makeCustomizationType>
<C32>
<property key="additional-warnings" value="false"/>
<property key="enable-app-io" value="false"/>
<property key="enable-omit-frame-pointer" value="false"/>
<property key="enable-symbols" value="false"/>
<property key="enable-unroll-loops" value="false"/>
<property key="exclude-floating-point" value="false"/>
<property key="extra-include-directories" value="../../;..\"/>
<property key="generate-16-bit-code" value="false"/>
<property key="isolate-each-function" value="false"/>
<property key="make-warnings-into-errors" value="false"/>
<property key="optimization-level" value="-O3"/>
<property key="place-data-into-section" value="false"/>
<property key="post-instruction-scheduling" value="default"/>
<property key="pre-instruction-scheduling" value="default"/>
<property key="preprocessor-macros"
value="CYASSL_SHA512;CYASSL_SHA384;HAVE_ECC"/>
<property key="strict-ansi" value="false"/>
<property key="support-ansi" value="false"/>
<property key="use-cci" value="false"/>
<property key="use-iar" value="false"/>
<property key="use-indirect-calls" value="false"/>
</C32>
<C32-AS>
<property key="assembler-symbols" value=""/>
<property key="enable-symbols" value="false"/>
<property key="exclude-floating-point-library" value="false"/>
<property key="expand-macros" value="false"/>
<property key="extra-include-directories-for-assembler" value="../../"/>
<property key="extra-include-directories-for-preprocessor" value="../../"/>
<property key="false-conditionals" value="false"/>
<property key="keep-locals" value="false"/>
<property key="list-assembly" value="false"/>
<property key="list-source" value="false"/>
<property key="list-symbols" value="false"/>
<property key="oXC32asm-list-to-file" value="false"/>
<property key="omit-debug-dirs" value="false"/>
<property key="omit-forms" value="false"/>
<property key="preprocessor-macros" value=""/>
<property key="warning-level" value=""/>
</C32-AS>
<C32-LD>
<property key="additional-options-use-response-files" value="false"/>
<property key="enable-check-sections" value="false"/>
<property key="exclude-floating-point-library" value="false"/>
<property key="exclude-standard-libraries" value="false"/>
<property key="extra-lib-directories" value=""/>
<property key="generate-16-bit-code" value="false"/>
<property key="generate-cross-reference-file" value="false"/>
<property key="heap-size" value=""/>
<property key="input-libraries" value=""/>
<property key="linker-symbols" value=""/>
<property key="map-file" value=""/>
<property key="no-startup-files" value="false"/>
<property key="oXC32ld-extra-opts" value=""/>
<property key="optimization-level" value="-Os"/>
<property key="preprocessor-macros" value=""/>
<property key="remove-unused-sections" value="true"/>
<property key="report-memory-usage" value="false"/>
<property key="stack-size" value=""/>
<property key="symbol-stripping" value="-s"/>
<property key="trace-symbols" value=""/>
<property key="warn-section-align" value="false"/>
</C32-LD>
<C32CPP>
<property key="additional-warnings" value="false"/>
<property key="check-new" value="false"/>
<property key="eh-specs" value="false"/>
<property key="enable-app-io" value="false"/>
<property key="enable-omit-frame-pointer" value="false"/>
<property key="enable-symbols" value="true"/>
<property key="enable-unroll-loops" value="false"/>
<property key="exceptions" value="false"/>
<property key="exclude-floating-point" value="false"/>
<property key="extra-include-directories" value=""/>
<property key="generate-16-bit-code" value="false"/>
<property key="isolate-each-function" value="false"/>
<property key="make-warnings-into-errors" value="false"/>
<property key="optimization-level" value=""/>
<property key="place-data-into-section" value="false"/>
<property key="post-instruction-scheduling" value="default"/>
<property key="pre-instruction-scheduling" value="default"/>
<property key="preprocessor-macros" value=""/>
<property key="rtti" value="false"/>
<property key="strict-ansi" value="false"/>
<property key="use-cci" value="false"/>
<property key="use-indirect-calls" value="false"/>
</C32CPP>
<C32Global>
<property key="legacy-libc" value="false"/>
<property key="save-temps" value="false"/>
<property key="wpo-lto" value="false"/>
</C32Global>
<PKOBSKDEPlatformTool>
<property key="AutoSelectMemRanges" value="auto"/>
<property key="SecureSegment.SegmentProgramming" value="FullChipProgramming"/>
<property key="ToolFirmwareFilePath"
value="Press to browse for a specific firmware version"/>
<property key="ToolFirmwareOption.UseLatestFirmware" value="true"/>
<property key="memories.configurationmemory" value="true"/>
<property key="memories.eeprom" value="true"/>
<property key="memories.id" value="true"/>
<property key="memories.programmemory" value="true"/>
<property key="memories.programmemory.end" value="0x1d07ffff"/>
<property key="memories.programmemory.start" value="0x1d000000"/>
<property key="poweroptions.powerenable" value="false"/>
<property key="programoptions.eraseb4program" value="true"/>
<property key="programoptions.preserveeeprom" value="false"/>
<property key="programoptions.preserveprogramrange" value="false"/>
<property key="programoptions.preserveprogramrange.end" value="0x1d0001ff"/>
<property key="programoptions.preserveprogramrange.start" value="0x1d000000"/>
<property key="programoptions.usehighvoltageonmclr" value="false"/>
<property key="programoptions.uselvpprogramming" value="false"/>
<property key="voltagevalue" value="3.25"/>
</PKOBSKDEPlatformTool>
</conf>
</confs>
</configurationDescriptor>

View file

@ -0,0 +1,11 @@
# vim:ft=automake
# All paths should be given relative to the root
#
EXTRA_DIST += \
mplabx/cyassl.X/Makefile
EXTRA_DIST += \
mplabx/cyassl.X/nbproject/configurations.xml \
mplabx/cyassl.X/nbproject/project.xml

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/make-project/1">
<name>cyassl</name>
<creation-uuid>93bbfc3a-a0fa-4d48-bbc8-6cd47a2bd05b</creation-uuid>
<make-project-type>0</make-project-type>
<c-extensions>c</c-extensions>
<cpp-extensions/>
<header-extensions/>
<sourceEncoding>ISO-8859-1</sourceEncoding>
<asminc-extensions/>
<make-dep-projects/>
</data>
</configuration>
</project>

View file

@ -0,0 +1,10 @@
# vim:ft=automake
# All paths should be given relative to the root
#
EXTRA_DIST += \
mplabx/PIC32MZ-serial.h \
mplabx/README \
mplabx/benchmark_main.c \
mplabx/test_main.c

View file

@ -0,0 +1,77 @@
/* main.c
*
* Copyright (C) 2006-2014 wolfSSL Inc.
*
* This file is part of CyaSSL.
*
* CyaSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* CyaSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <cyassl/ctaocrypt/settings.h>
#if defined(CYASSL_MICROCHIP_PIC32MZ)
#define MICROCHIP_PIC32
#include <xc.h>
#pragma config ICESEL = ICS_PGx2
/* ICE/ICD Comm Channel Select (Communicate on PGEC2/PGED2) */
#include <stdio.h>
#include <stdlib.h>
#include "PIC32MZ-serial.h"
#define SYSTEMConfigPerformance /* void out SYSTEMConfigPerformance(); */
#else
#define PIC32_STARTER_KIT
#include <stdio.h>
#include <stdlib.h>
#include <p32xxxx.h>
#include <plib.h>
#include <sys/appio.h>
#define init_serial() /* void out init_serial() */
#endif
/* func_args from test.h, so don't have to pull in other junk */
typedef struct func_args {
int argc;
char** argv;
int return_code;
} func_args;
/*
* Main driver for CTaoCrypt tests.
*/
int main(int argc, char** argv) {
int i ;
init_serial() ; /* initialize PIC32MZ serial I/O */
SYSTEMConfigPerformance(80000000);
DBINIT();
printf("CTaoCrypt Test:\n");
func_args args;
args.argc = argc;
args.argv = argv;
ctaocrypt_test(&args);
if (args.return_code == 0) {
printf("All tests passed!\n");
}
return 0;
}