mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2026-02-20 00:55:28 -05:00
Rename the CyaSSL directory to WolfSSL
This commit is contained in:
parent
1b010fbaa7
commit
8af1ad9bac
391 changed files with 0 additions and 0 deletions
0
FreeRTOS-Plus/Source/WolfSSL/AUTHORS
Normal file
0
FreeRTOS-Plus/Source/WolfSSL/AUTHORS
Normal file
339
FreeRTOS-Plus/Source/WolfSSL/COPYING
Normal file
339
FreeRTOS-Plus/Source/WolfSSL/COPYING
Normal file
|
|
@ -0,0 +1,339 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program 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.
|
||||
|
||||
This program 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.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
0
FreeRTOS-Plus/Source/WolfSSL/ChangeLog
Normal file
0
FreeRTOS-Plus/Source/WolfSSL/ChangeLog
Normal file
164
FreeRTOS-Plus/Source/WolfSSL/Makefile.am
Normal file
164
FreeRTOS-Plus/Source/WolfSSL/Makefile.am
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
# includes append to these:
|
||||
SUFFIXES =
|
||||
TESTS =
|
||||
CLEANFILES =
|
||||
DISTCLEANFILES =
|
||||
bin_PROGRAMS =
|
||||
noinst_HEADERS =
|
||||
lib_LTLIBRARIES =
|
||||
man_MANS =
|
||||
noinst_LTLIBRARIES =
|
||||
noinst_PROGRAMS =
|
||||
include_HEADERS =
|
||||
nobase_include_HEADERS =
|
||||
check_PROGRAMS =
|
||||
EXTRA_HEADERS =
|
||||
BUILT_SOURCES=
|
||||
EXTRA_DIST=
|
||||
dist_doc_DATA=
|
||||
|
||||
#includes additional rules from aminclude.am
|
||||
@INC_AMINCLUDE@
|
||||
DISTCLEANFILES+= aminclude.am
|
||||
|
||||
CLEANFILES+= cert.der \
|
||||
cert.pem \
|
||||
certecc.der \
|
||||
certecc.pem \
|
||||
certreq.der \
|
||||
certreq.pem \
|
||||
key.der \
|
||||
key.pem \
|
||||
ntru-cert.der \
|
||||
ntru-cert.pem \
|
||||
ntru-key.raw \
|
||||
othercert.der \
|
||||
othercert.pem \
|
||||
pkcs7cert.der \
|
||||
pkcs7envelopedData.der \
|
||||
pkcs7signedData.der
|
||||
|
||||
exampledir = $(docdir)/example
|
||||
dist_example_DATA=
|
||||
|
||||
ACLOCAL_AMFLAGS= -I m4
|
||||
|
||||
EXTRA_DIST+= lib/dummy
|
||||
|
||||
EXTRA_DIST+= cyassl-ntru.vcproj
|
||||
EXTRA_DIST+= cyassl.vcproj
|
||||
EXTRA_DIST+= cyassl.vcxproj
|
||||
EXTRA_DIST+= cyassl-iphone.xcodeproj/project.pbxproj
|
||||
EXTRA_DIST+= cyassl-ios.xcodeproj/project.pbxproj
|
||||
EXTRA_DIST+= cyassl-ntru.sln
|
||||
EXTRA_DIST+= cyassl.sln
|
||||
EXTRA_DIST+= cyassl64.sln
|
||||
EXTRA_DIST+= valgrind-error.sh
|
||||
EXTRA_DIST+= gencertbuf.pl
|
||||
EXTRA_DIST+= IDE
|
||||
|
||||
include cyassl/include.am
|
||||
include certs/include.am
|
||||
include certs/1024/include.am
|
||||
include certs/crl/include.am
|
||||
include doc/include.am
|
||||
include swig/include.am
|
||||
|
||||
include src/include.am
|
||||
include support/include.am
|
||||
include ctaocrypt/benchmark/include.am
|
||||
include ctaocrypt/src/include.am
|
||||
include ctaocrypt/test/include.am
|
||||
include examples/client/include.am
|
||||
include examples/server/include.am
|
||||
include examples/echoclient/include.am
|
||||
include examples/echoserver/include.am
|
||||
include testsuite/include.am
|
||||
include tests/include.am
|
||||
include sslSniffer/sslSnifferTest/include.am
|
||||
include rpm/include.am
|
||||
include mqx/ctaocrypt_test/Sources/include.am
|
||||
include mqx/cyassl/include.am
|
||||
include mqx/cyassl_client/Sources/include.am
|
||||
include mqx/util_lib/Sources/include.am
|
||||
include mplabx/include.am
|
||||
include mplabx/ctaocrypt_benchmark.X/nbproject/include.am
|
||||
include mplabx/ctaocrypt_test.X/nbproject/include.am
|
||||
include mplabx/cyassl.X/nbproject/include.am
|
||||
include mcapi/include.am
|
||||
include mcapi/ctaocrypt_mcapi.X/nbproject/include.am
|
||||
include mcapi/ctaocrypt_test.X/nbproject/include.am
|
||||
include mcapi/cyassl.X/nbproject/include.am
|
||||
include mcapi/zlib.X/nbproject/include.am
|
||||
|
||||
if USE_VALGRIND
|
||||
TESTS_ENVIRONMENT=./valgrind-error.sh
|
||||
endif
|
||||
|
||||
TEST_EXTENSIONS=.test
|
||||
TESTS += $(check_PROGRAMS)
|
||||
test: check
|
||||
tests/unit.log: testsuite/testsuite.log
|
||||
|
||||
DISTCLEANFILES+= cyassl-config
|
||||
# fips files shouldn't be left after make distclean
|
||||
DISTCLEANFILES+= ctaocrypt/src/fips.c
|
||||
DISTCLEANFILES+= ctaocrypt/src/fips_test.c
|
||||
|
||||
maintainer-clean-local:
|
||||
-rm Makefile.in
|
||||
-rm aclocal.m4
|
||||
-rm build-aux/compile
|
||||
-rm build-aux/config.guess
|
||||
-rm build-aux/config.sub
|
||||
-rm build-aux/depcomp
|
||||
-rm build-aux/install-sh
|
||||
-rm build-aux/ltmain.sh
|
||||
-rm build-aux/missing
|
||||
-rm cyassl-config
|
||||
-rmdir build-aux
|
||||
-rm configure
|
||||
-rm config.log
|
||||
-rm config.status
|
||||
-rm config.in
|
||||
-rm m4/libtool.m4
|
||||
-rm m4/ltoptions.m4
|
||||
-rm m4/ltsugar.m4
|
||||
-rm m4/ltversion.m4
|
||||
-rm m4/lt~obsolete.m4
|
||||
-rm support/cyassl.pc
|
||||
find . -type f -name '*~' -exec rm -f '{}' \;
|
||||
-rm -f @PACKAGE@-*.tar.gz
|
||||
-rm -f @PACKAGE@-*.rpm
|
||||
|
||||
# !!!! first line of rule has to start with a hard (real) tab, not spaces
|
||||
egs:
|
||||
$(MAKE) examples/client/client; \
|
||||
$(MAKE) examples/echoclient/echoclient;\
|
||||
$(MAKE) examples/server/server; \
|
||||
$(MAKE) examples/echoserver/echoserver;
|
||||
|
||||
ctc:
|
||||
$(MAKE) ctaocrypt/test/testctaocrypt; \
|
||||
$(MAKE) ctaocrypt/benchmark/benchmark;
|
||||
|
||||
install-exec-local: install-generic-config
|
||||
|
||||
install-generic-config:
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
$(INSTALL_SCRIPT) @GENERIC_CONFIG@ $(DESTDIR)$(bindir)
|
||||
|
||||
uninstall-local:
|
||||
-rm -f $(DESTDIR)$(bindir)/@GENERIC_CONFIG@
|
||||
|
||||
merge-clean:
|
||||
@find ./ | $(GREP) \.gcda | xargs rm -f
|
||||
@find ./ | $(GREP) \.gcno | xargs rm -f
|
||||
@find ./ | $(GREP) \.gz | xargs rm -f
|
||||
@find ./ | $(GREP) \.orig | xargs rm -f
|
||||
@find ./ | $(GREP) \.rej | xargs rm -f
|
||||
@find ./ | $(GREP) \.rpm | xargs rm -f
|
||||
@find ./ | $(GREP) \.THIS | xargs rm -f
|
||||
@find ./ | $(GREP) \.OTHER | xargs rm -f
|
||||
@find ./ | $(GREP) \.BASE | xargs rm -f
|
||||
@find ./ | $(GREP) \~$$ | xargs rm -f
|
||||
3090
FreeRTOS-Plus/Source/WolfSSL/Makefile.in
Normal file
3090
FreeRTOS-Plus/Source/WolfSSL/Makefile.in
Normal file
File diff suppressed because it is too large
Load diff
0
FreeRTOS-Plus/Source/WolfSSL/NEWS
Normal file
0
FreeRTOS-Plus/Source/WolfSSL/NEWS
Normal file
1044
FreeRTOS-Plus/Source/WolfSSL/README
Normal file
1044
FreeRTOS-Plus/Source/WolfSSL/README
Normal file
File diff suppressed because it is too large
Load diff
5
FreeRTOS-Plus/Source/WolfSSL/ReadMeFirst.url
Normal file
5
FreeRTOS-Plus/Source/WolfSSL/ReadMeFirst.url
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[InternetShortcut]
|
||||
URL=http://www.freertos.org/ssl
|
||||
IDList=
|
||||
[{000214A0-0000-0000-C000-000000000046}]
|
||||
Prop3=19,2
|
||||
1195
FreeRTOS-Plus/Source/WolfSSL/aclocal.m4
vendored
Normal file
1195
FreeRTOS-Plus/Source/WolfSSL/aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load diff
347
FreeRTOS-Plus/Source/WolfSSL/build-aux/compile
Normal file
347
FreeRTOS-Plus/Source/WolfSSL/build-aux/compile
Normal file
|
|
@ -0,0 +1,347 @@
|
|||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program 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, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_dashL linkdir
|
||||
# Make cl look for libraries in LINKDIR
|
||||
func_cl_dashL ()
|
||||
{
|
||||
func_file_conv "$1"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
}
|
||||
|
||||
# func_cl_dashl library
|
||||
# Do a library search-path lookup for cl
|
||||
func_cl_dashl ()
|
||||
{
|
||||
lib=$1
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.dll.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/lib$lib.a"; then
|
||||
found=yes
|
||||
lib=$dir/lib$lib.a
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
if test "$found" != yes; then
|
||||
lib=$lib.lib
|
||||
fi
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I)
|
||||
eat=1
|
||||
func_file_conv "$2" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
eat=1
|
||||
func_cl_dashl "$2"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
func_cl_dashl "${1#-l}"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-L)
|
||||
eat=1
|
||||
func_cl_dashL "$2"
|
||||
;;
|
||||
-L*)
|
||||
func_cl_dashL "${1#-L}"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
1568
FreeRTOS-Plus/Source/WolfSSL/build-aux/config.guess
vendored
Normal file
1568
FreeRTOS-Plus/Source/WolfSSL/build-aux/config.guess
vendored
Normal file
File diff suppressed because it is too large
Load diff
1793
FreeRTOS-Plus/Source/WolfSSL/build-aux/config.sub
vendored
Normal file
1793
FreeRTOS-Plus/Source/WolfSSL/build-aux/config.sub
vendored
Normal file
File diff suppressed because it is too large
Load diff
791
FreeRTOS-Plus/Source/WolfSSL/build-aux/depcomp
Normal file
791
FreeRTOS-Plus/Source/WolfSSL/build-aux/depcomp
Normal file
|
|
@ -0,0 +1,791 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2013-05-30.07; # UTC
|
||||
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program 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, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by 'PROGRAMS ARGS'.
|
||||
object Object file output by 'PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputting dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get the directory component of the given path, and save it in the
|
||||
# global variables '$dir'. Note that this directory component will
|
||||
# be either empty or ending with a '/' character. This is deliberate.
|
||||
set_dir_from ()
|
||||
{
|
||||
case $1 in
|
||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||
*) dir=;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Get the suffix-stripped basename of the given path, and save it the
|
||||
# global variable '$base'.
|
||||
set_base_from ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||
}
|
||||
|
||||
# If no dependency file was actually created by the compiler invocation,
|
||||
# we still have to create a dummy depfile, to avoid errors with the
|
||||
# Makefile "include basename.Plo" scheme.
|
||||
make_dummy_depfile ()
|
||||
{
|
||||
echo "#dummy" > "$depfile"
|
||||
}
|
||||
|
||||
# Factor out some common post-processing of the generated depfile.
|
||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||
aix_post_process_depfile ()
|
||||
{
|
||||
# If the compiler actually managed to produce a dependency file,
|
||||
# post-process it.
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependency.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# $object: dependency.h
|
||||
# and one to simply output
|
||||
# dependency.h:
|
||||
# which is needed to avoid the deleted-header problem.
|
||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||
} > "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
}
|
||||
|
||||
# A tabulation character.
|
||||
tab=' '
|
||||
# A newline character.
|
||||
nl='
|
||||
'
|
||||
# Character ranges might be problematic outside the C locale.
|
||||
# These definitions help.
|
||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
lower=abcdefghijklmnopqrstuvwxyz
|
||||
digits=0123456789
|
||||
alpha=${upper}${lower}
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
if test "$depmode" = xlc; then
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||
## (see the conditional assignment to $gccflag above).
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||
## supported by the other compilers which use the 'gcc' depmode.
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The second -e expression handles DOS-style file names with drive
|
||||
# letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the "deleted header file" problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
## Some versions of gcc put a space before the ':'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||
| tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
xlc)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
tcc)
|
||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||
# FIXME: That version still under development at the moment of writing.
|
||||
# Make that this statement remains true also for stable, released
|
||||
# versions.
|
||||
# It will wrap lines (doesn't matter whether long or short) with a
|
||||
# trailing '\', as in:
|
||||
#
|
||||
# foo.o : \
|
||||
# foo.c \
|
||||
# foo.h \
|
||||
#
|
||||
# It will put a trailing '\' even on the last line, and will use leading
|
||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||
# "Emit spaces for -MD").
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||
# We have to change lines of the first kind to '$object: \'.
|
||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||
# dummy dependency, to avoid the deleted-header problem.
|
||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\' :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
set_dir_from "$object"
|
||||
# Use the source, not the object, to determine the base name, since
|
||||
# that's sadly what pgcc will do too.
|
||||
set_base_from "$source"
|
||||
tmpdepfile=$base.d
|
||||
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# the same $tmpdepfile.
|
||||
lockdir=$base.d-lock
|
||||
trap "
|
||||
echo '$0: caught signal, cleaning up...' >&2
|
||||
rmdir '$lockdir'
|
||||
exit 1
|
||||
" 1 2 13 15
|
||||
numtries=100
|
||||
i=$numtries
|
||||
while test $i -gt 0; do
|
||||
# mkdir is a portable test-and-set.
|
||||
if mkdir "$lockdir" 2>/dev/null; then
|
||||
# This process acquired the lock.
|
||||
"$@" -MD
|
||||
stat=$?
|
||||
# Release the lock.
|
||||
rmdir "$lockdir"
|
||||
break
|
||||
else
|
||||
# If the lock is being held by a different process, wait
|
||||
# until the winning process is done or we timeout.
|
||||
while test -d "$lockdir" && test $i -gt 0; do
|
||||
sleep 1
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
fi
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
trap - 1 2 13 15
|
||||
if test $i -le 0; then
|
||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||
echo "$0: check lockdir '$lockdir'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
showIncludes=-showIncludes
|
||||
fi
|
||||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The first sed program below extracts the file names and escapes
|
||||
# backslashes for cygpath. The second sed program outputs the file
|
||||
# name when reading, but also accumulates all include files in the
|
||||
# hold buffer in order to output them again at the end. This only
|
||||
# works with sed implementations that can handle large buffers.
|
||||
sed < "$tmpdepfile" -n '
|
||||
/^Note: including file: *\(.*\)/ {
|
||||
s//\1/
|
||||
s/\\/\\\\/g
|
||||
p
|
||||
}' | $cygpath_u | sort -u | sed -n '
|
||||
s/ /\\ /g
|
||||
s/\(.*\)/'"$tab"'\1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/'"$tab"'/
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7msys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for ':'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed '1,2d' "$tmpdepfile" \
|
||||
| tr ' ' "$nl" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E \
|
||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||
echo "$tab" >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
527
FreeRTOS-Plus/Source/WolfSSL/build-aux/install-sh
Normal file
527
FreeRTOS-Plus/Source/WolfSSL/build-aux/install-sh
Normal file
|
|
@ -0,0 +1,527 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2011-11-20.07; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# 'make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
9656
FreeRTOS-Plus/Source/WolfSSL/build-aux/ltmain.sh
Normal file
9656
FreeRTOS-Plus/Source/WolfSSL/build-aux/ltmain.sh
Normal file
File diff suppressed because it is too large
Load diff
215
FreeRTOS-Plus/Source/WolfSSL/build-aux/missing
Normal file
215
FreeRTOS-Plus/Source/WolfSSL/build-aux/missing
Normal file
|
|
@ -0,0 +1,215 @@
|
|||
#! /bin/sh
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2013-10-28.13; # UTC
|
||||
|
||||
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program 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, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
|
||||
--is-lightweight)
|
||||
# Used by our autoconf macros to check whether the available missing
|
||||
# script is modern enough.
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--run)
|
||||
# Back-compat with the calling convention used by older automake.
|
||||
shift
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||
to PROGRAM being missing or too old.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal autoconf autoheader autom4te automake makeinfo
|
||||
bison yacc flex lex help2man
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||
'g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: unknown '$1' option"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Run the given program, remember its exit status.
|
||||
"$@"; st=$?
|
||||
|
||||
# If it succeeded, we are done.
|
||||
test $st -eq 0 && exit 0
|
||||
|
||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||
# passed; such an option is passed most likely to detect whether the
|
||||
# program is present and works.
|
||||
case $2 in --version|--help) exit $st;; esac
|
||||
|
||||
# Exit code 63 means version mismatch. This often happens when the user
|
||||
# tries to use an ancient version of a tool on a file that requires a
|
||||
# minimum version.
|
||||
if test $st -eq 63; then
|
||||
msg="probably too old"
|
||||
elif test $st -eq 127; then
|
||||
# Program was missing.
|
||||
msg="missing on your system"
|
||||
else
|
||||
# Program was found and executed, but failed. Give up.
|
||||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=http://www.perl.org/
|
||||
flex_URL=http://flex.sourceforge.net/
|
||||
gnu_software_URL=http://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
case $1 in
|
||||
aclocal|automake)
|
||||
echo "The '$1' program is part of the GNU Automake package:"
|
||||
echo "<$gnu_software_URL/automake>"
|
||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/autoconf>"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
autoconf|autom4te|autoheader)
|
||||
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||
echo "<$gnu_software_URL/autoconf/>"
|
||||
echo "It also requires GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice ()
|
||||
{
|
||||
# Normalize program name to check for.
|
||||
normalized_program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
printf '%s\n' "'$1' is $msg."
|
||||
|
||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||
case $normalized_program in
|
||||
autoconf*)
|
||||
echo "You should only need it if you modified 'configure.ac',"
|
||||
echo "or m4 files included by it."
|
||||
program_details 'autoconf'
|
||||
;;
|
||||
autoheader*)
|
||||
echo "You should only need it if you modified 'acconfig.h' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'autoheader'
|
||||
;;
|
||||
automake*)
|
||||
echo "You should only need it if you modified 'Makefile.am' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'automake'
|
||||
;;
|
||||
aclocal*)
|
||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'aclocal'
|
||||
;;
|
||||
autom4te*)
|
||||
echo "You might have modified some maintainer files that require"
|
||||
echo "the 'autom4te' program to be rebuilt."
|
||||
program_details 'autom4te'
|
||||
;;
|
||||
bison*|yacc*)
|
||||
echo "You should only need it if you modified a '.y' file."
|
||||
echo "You may want to install the GNU Bison package:"
|
||||
echo "<$gnu_software_URL/bison/>"
|
||||
;;
|
||||
lex*|flex*)
|
||||
echo "You should only need it if you modified a '.l' file."
|
||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||
echo "<$flex_URL>"
|
||||
;;
|
||||
help2man*)
|
||||
echo "You should only need it if you modified a dependency" \
|
||||
"of a man page."
|
||||
echo "You may want to install the GNU Help2man package:"
|
||||
echo "<$gnu_software_URL/help2man/>"
|
||||
;;
|
||||
makeinfo*)
|
||||
echo "You should only need it if you modified a '.texi' file, or"
|
||||
echo "any other file indirectly affecting the aspect of the manual."
|
||||
echo "You might want to install the Texinfo package:"
|
||||
echo "<$gnu_software_URL/texinfo/>"
|
||||
echo "The spurious makeinfo call might also be the consequence of"
|
||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||
echo "want to install GNU make:"
|
||||
echo "<$gnu_software_URL/make/>"
|
||||
;;
|
||||
*)
|
||||
echo "You might have modified some files without having the proper"
|
||||
echo "tools for further handling them. Check the 'README' file, it"
|
||||
echo "often tells you about the needed prerequisites for installing"
|
||||
echo "this package. You may also peek at any GNU archive site, in"
|
||||
echo "case some other package contains this missing '$1' program."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
-e '2,$s/^/ /' >&2
|
||||
|
||||
# Propagate the correct exit status (expected to be 127 for a program
|
||||
# not found, 63 for a program that failed due to version mismatch).
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
139
FreeRTOS-Plus/Source/WolfSSL/build-aux/test-driver
Normal file
139
FreeRTOS-Plus/Source/WolfSSL/build-aux/test-driver
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
#! /bin/sh
|
||||
# test-driver - basic testsuite driver script.
|
||||
|
||||
scriptversion=2013-07-13.22; # UTC
|
||||
|
||||
# Copyright (C) 2011-2013 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program 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, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program 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, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
# Make unconditional expansion of undefined variables an error. This
|
||||
# helps a lot in preventing typo-related bugs.
|
||||
set -u
|
||||
|
||||
usage_error ()
|
||||
{
|
||||
echo "$0: $*" >&2
|
||||
print_usage >&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
print_usage ()
|
||||
{
|
||||
cat <<END
|
||||
Usage:
|
||||
test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
|
||||
[--expect-failure={yes|no}] [--color-tests={yes|no}]
|
||||
[--enable-hard-errors={yes|no}] [--]
|
||||
TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
|
||||
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
|
||||
END
|
||||
}
|
||||
|
||||
test_name= # Used for reporting.
|
||||
log_file= # Where to save the output of the test script.
|
||||
trs_file= # Where to save the metadata of the test run.
|
||||
expect_failure=no
|
||||
color_tests=no
|
||||
enable_hard_errors=yes
|
||||
while test $# -gt 0; do
|
||||
case $1 in
|
||||
--help) print_usage; exit $?;;
|
||||
--version) echo "test-driver $scriptversion"; exit $?;;
|
||||
--test-name) test_name=$2; shift;;
|
||||
--log-file) log_file=$2; shift;;
|
||||
--trs-file) trs_file=$2; shift;;
|
||||
--color-tests) color_tests=$2; shift;;
|
||||
--expect-failure) expect_failure=$2; shift;;
|
||||
--enable-hard-errors) enable_hard_errors=$2; shift;;
|
||||
--) shift; break;;
|
||||
-*) usage_error "invalid option: '$1'";;
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
missing_opts=
|
||||
test x"$test_name" = x && missing_opts="$missing_opts --test-name"
|
||||
test x"$log_file" = x && missing_opts="$missing_opts --log-file"
|
||||
test x"$trs_file" = x && missing_opts="$missing_opts --trs-file"
|
||||
if test x"$missing_opts" != x; then
|
||||
usage_error "the following mandatory options are missing:$missing_opts"
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
usage_error "missing argument"
|
||||
fi
|
||||
|
||||
if test $color_tests = yes; then
|
||||
# Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
|
||||
red='[0;31m' # Red.
|
||||
grn='[0;32m' # Green.
|
||||
lgn='[1;32m' # Light green.
|
||||
blu='[1;34m' # Blue.
|
||||
mgn='[0;35m' # Magenta.
|
||||
std='[m' # No color.
|
||||
else
|
||||
red= grn= lgn= blu= mgn= std=
|
||||
fi
|
||||
|
||||
do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
|
||||
trap "st=129; $do_exit" 1
|
||||
trap "st=130; $do_exit" 2
|
||||
trap "st=141; $do_exit" 13
|
||||
trap "st=143; $do_exit" 15
|
||||
|
||||
# Test script is run here.
|
||||
"$@" >$log_file 2>&1
|
||||
estatus=$?
|
||||
if test $enable_hard_errors = no && test $estatus -eq 99; then
|
||||
estatus=1
|
||||
fi
|
||||
|
||||
case $estatus:$expect_failure in
|
||||
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
|
||||
0:*) col=$grn res=PASS recheck=no gcopy=no;;
|
||||
77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
|
||||
99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
|
||||
*:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
|
||||
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
|
||||
esac
|
||||
|
||||
# Report outcome to console.
|
||||
echo "${col}${res}${std}: $test_name"
|
||||
|
||||
# Register the test result, and other relevant metadata.
|
||||
echo ":test-result: $res" > $trs_file
|
||||
echo ":global-test-result: $res" >> $trs_file
|
||||
echo ":recheck: $recheck" >> $trs_file
|
||||
echo ":copy-in-global-log: $gcopy" >> $trs_file
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/1024/client-cert.der
Normal file
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/1024/client-cert.der
Normal file
Binary file not shown.
59
FreeRTOS-Plus/Source/WolfSSL/certs/1024/client-cert.pem
Normal file
59
FreeRTOS-Plus/Source/WolfSSL/certs/1024/client-cert.pem
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
Certificate:
|
||||
Data:
|
||||
Version: 3 (0x2)
|
||||
Serial Number: 10163970144298616102 (0x8d0dacfec6984526)
|
||||
Signature Algorithm: sha1WithRSAEncryption
|
||||
Issuer: C=US, ST=Oregon, L=Portland, O=yaSSL, OU=Programming, CN=www.yassl.com/emailAddress=info@yassl.com
|
||||
Validity
|
||||
Not Before: Jan 18 21:42:49 2013 GMT
|
||||
Not After : Oct 15 21:42:49 2015 GMT
|
||||
Subject: C=US, ST=Oregon, L=Portland, O=yaSSL, OU=Programming, CN=www.yassl.com/emailAddress=info@yassl.com
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: rsaEncryption
|
||||
Public-Key: (1024 bit)
|
||||
Modulus:
|
||||
00:bc:73:0e:a8:49:f3:74:a2:a9:ef:18:a5:da:55:
|
||||
99:21:f9:c8:ec:b3:6d:48:e5:35:35:75:77:37:ec:
|
||||
d1:61:90:5f:3e:d9:e4:d5:df:94:ca:c1:a9:d7:19:
|
||||
da:86:c9:e8:4d:c4:61:36:82:fe:ab:ad:7e:77:25:
|
||||
bb:8d:11:a5:bc:62:3a:a8:38:cc:39:a2:04:66:b4:
|
||||
f7:f7:f3:aa:da:4d:02:0e:bb:5e:8d:69:48:dc:77:
|
||||
c9:28:0e:22:e9:6b:a4:26:ba:4c:e8:c1:fd:4a:6f:
|
||||
2b:1f:ef:8a:ae:f6:90:62:e5:64:1e:eb:2b:3c:67:
|
||||
c8:dc:27:00:f6:91:68:65:a9
|
||||
Exponent: 65537 (0x10001)
|
||||
X509v3 extensions:
|
||||
X509v3 Subject Key Identifier:
|
||||
81:69:0F:F8:DF:DD:CF:34:29:D5:67:75:71:85:C7:75:10:69:59:EC
|
||||
X509v3 Authority Key Identifier:
|
||||
keyid:81:69:0F:F8:DF:DD:CF:34:29:D5:67:75:71:85:C7:75:10:69:59:EC
|
||||
|
||||
X509v3 Basic Constraints:
|
||||
CA:TRUE
|
||||
Signature Algorithm: sha1WithRSAEncryption
|
||||
72:66:0f:6a:a1:85:95:06:e6:87:1a:ed:2b:da:ed:84:90:89:
|
||||
a6:31:4d:60:f2:7b:63:0c:dc:9b:44:4c:d6:62:41:24:74:30:
|
||||
70:4e:07:10:05:12:5e:14:b3:dd:cf:58:27:93:cf:aa:4f:85:
|
||||
2c:35:0e:ff:5b:a8:6b:b5:95:32:d5:cc:73:68:5b:1b:c4:f8:
|
||||
89:5e:3d:f8:02:39:32:7d:06:a4:32:e9:b3:ef:62:a0:43:5d:
|
||||
4f:fb:ce:3d:08:33:af:3d:7f:12:cb:8a:5a:c2:63:db:3e:dd:
|
||||
ea:5b:67:10:49:9f:5b:96:1b:4e:5d:bc:4e:9a:7c:1f:ab:56:
|
||||
47:4a
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIC7DCCAlWgAwIBAgIJAI0NrP7GmEUmMA0GCSqGSIb3DQEBBQUAMIGOMQswCQYD
|
||||
VQQGEwJVUzEPMA0GA1UECAwGT3JlZ29uMREwDwYDVQQHDAhQb3J0bGFuZDEOMAwG
|
||||
A1UECgwFeWFTU0wxFDASBgNVBAsMC1Byb2dyYW1taW5nMRYwFAYDVQQDDA13d3cu
|
||||
eWFzc2wuY29tMR0wGwYJKoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbTAeFw0xMzAx
|
||||
MTgyMTQyNDlaFw0xNTEwMTUyMTQyNDlaMIGOMQswCQYDVQQGEwJVUzEPMA0GA1UE
|
||||
CAwGT3JlZ29uMREwDwYDVQQHDAhQb3J0bGFuZDEOMAwGA1UECgwFeWFTU0wxFDAS
|
||||
BgNVBAsMC1Byb2dyYW1taW5nMRYwFAYDVQQDDA13d3cueWFzc2wuY29tMR0wGwYJ
|
||||
KoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAw
|
||||
gYkCgYEAvHMOqEnzdKKp7xil2lWZIfnI7LNtSOU1NXV3N+zRYZBfPtnk1d+UysGp
|
||||
1xnahsnoTcRhNoL+q61+dyW7jRGlvGI6qDjMOaIEZrT39/Oq2k0CDrtejWlI3HfJ
|
||||
KA4i6WukJrpM6MH9Sm8rH++KrvaQYuVkHusrPGfI3CcA9pFoZakCAwEAAaNQME4w
|
||||
HQYDVR0OBBYEFIFpD/jf3c80KdVndXGFx3UQaVnsMB8GA1UdIwQYMBaAFIFpD/jf
|
||||
3c80KdVndXGFx3UQaVnsMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEA
|
||||
cmYPaqGFlQbmhxrtK9rthJCJpjFNYPJ7Ywzcm0RM1mJBJHQwcE4HEAUSXhSz3c9Y
|
||||
J5PPqk+FLDUO/1uoa7WVMtXMc2hbG8T4iV49+AI5Mn0GpDLps+9ioENdT/vOPQgz
|
||||
rz1/EsuKWsJj2z7d6ltnEEmfW5YbTl28Tpp8H6tWR0o=
|
||||
-----END CERTIFICATE-----
|
||||
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/1024/client-key.der
Normal file
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/1024/client-key.der
Normal file
Binary file not shown.
15
FreeRTOS-Plus/Source/WolfSSL/certs/1024/client-key.pem
Normal file
15
FreeRTOS-Plus/Source/WolfSSL/certs/1024/client-key.pem
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICXAIBAAKBgQC8cw6oSfN0oqnvGKXaVZkh+cjss21I5TU1dXc37NFhkF8+2eTV
|
||||
35TKwanXGdqGyehNxGE2gv6rrX53JbuNEaW8YjqoOMw5ogRmtPf386raTQIOu16N
|
||||
aUjcd8koDiLpa6Qmukzowf1Kbysf74qu9pBi5WQe6ys8Z8jcJwD2kWhlqQIDAQAB
|
||||
AoGAE5fq6Dh4JaJcBM4NQHwx5cRwzZuCO1gJhjtmX9wxkPFP1dsV3d7XO5WTMRgx
|
||||
Dl6j1qIacW6BSBxLz9uOeoZhMtz7VcEWbSeSJEWL8bhIsUsdrN7a3Y4vwpH7palu
|
||||
+Dpq8f1QGO+f58PKeOpW09NyW5bdTgZOOsPZvnK2ZQcHTAECQQD6R9R6fJI8Ve+B
|
||||
8EEwLaPPjxzmhycFcA3fmDXW8Ys4LyS10IS2eU9xKZRa8GRqrOdyxu1NWZg+Zzrz
|
||||
dCz5YRdpAkEAwMGCDQzrxi/ckvmdghox6en3S/KChxzuFmrRHRiCcPPAti/28/cd
|
||||
8YYjyE7rj1aOj/W/8fcrtcw9xlc5DBtUQQJBAJ1+Bd7t9Ley+/wwS1Ud4y8BR5Zp
|
||||
Bc0OLiy9g2O2q3y3bcpbZKfOvobfO1PeYdIe66X2N+2sq3jZTOdV+9cRmcECQBiY
|
||||
GCnmHic5cCForAovoXLBIYaVOMZYkKBXnLrjp7EVyN72G8JhI3bvsJ0cRL4TQzln
|
||||
F8idyvv1RWSLOIIs8oECQDmJ5ZwZVTC6t0iMSBQO9J9+d5dD4bQZNTEjdZw7RK1p
|
||||
ElbuAGFkFmbTfHQrFbSi/r8IaxpdP5ASsQWGMSnb2eI=
|
||||
-----END RSA PRIVATE KEY-----
|
||||
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/1024/dh1024.der
Normal file
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/1024/dh1024.der
Normal file
Binary file not shown.
17
FreeRTOS-Plus/Source/WolfSSL/certs/1024/dh1024.pem
Normal file
17
FreeRTOS-Plus/Source/WolfSSL/certs/1024/dh1024.pem
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
PKCS#3 DH Parameters: (1024 bit)
|
||||
prime:
|
||||
00:a4:d2:b8:6e:78:f5:d9:ed:2d:7c:dd:b6:16:86:
|
||||
5a:4b:05:76:90:dd:66:61:b9:6d:52:a7:1c:af:62:
|
||||
c6:69:47:7b:39:f2:fb:94:ec:bc:79:ff:24:5e:ef:
|
||||
79:bb:59:b2:fc:ca:07:d6:f4:e9:34:f7:e8:38:e7:
|
||||
d7:33:44:1d:a3:64:76:1a:84:97:54:74:40:84:1f:
|
||||
15:fe:7c:25:2a:2b:25:fd:9e:c1:89:33:8c:39:25:
|
||||
2b:40:e6:cd:f8:a8:a1:8a:53:c6:47:b2:a0:d7:8f:
|
||||
eb:2e:60:0a:0d:4b:f8:b4:94:8c:63:0a:ad:c7:10:
|
||||
ea:c7:a1:b9:9d:f2:a8:37:73
|
||||
generator: 2 (0x2)
|
||||
-----BEGIN DH PARAMETERS-----
|
||||
MIGHAoGBAKTSuG549dntLXzdthaGWksFdpDdZmG5bVKnHK9ixmlHezny+5TsvHn/
|
||||
JF7vebtZsvzKB9b06TT36Djn1zNEHaNkdhqEl1R0QIQfFf58JSorJf2ewYkzjDkl
|
||||
K0DmzfiooYpTxkeyoNeP6y5gCg1L+LSUjGMKrccQ6sehuZ3yqDdzAgEC
|
||||
-----END DH PARAMETERS-----
|
||||
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/1024/dsa1024.der
Normal file
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/1024/dsa1024.der
Normal file
Binary file not shown.
12
FreeRTOS-Plus/Source/WolfSSL/certs/1024/dsa1024.pem
Normal file
12
FreeRTOS-Plus/Source/WolfSSL/certs/1024/dsa1024.pem
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
-----BEGIN DSA PRIVATE KEY-----
|
||||
MIIBvAIBAAKBgQD3S/m7FZjr3d4eTnGIhfK3uuJK2nZAzWlInoN8EfdlMXj1JS33
|
||||
t/hSP77YtsX+GBVbudWShryyF3zYsL6gfPLVc3pYj43lSgCZg0rAnhYJoRA01Rm7
|
||||
Y+Pdg3R/EMpzde4xSt2f4AJqne6yS6drKmzHhnfoBBXckrR6KR9Og2OFVQIVANIF
|
||||
5HP7wZnF3GikjZInPeJSX4mLAoGBAKohAglDbvuiVBSFCvQofMvM2/UeohipId6I
|
||||
iDOMLuuNo/AdyI/2fvjPEvW0oRFvDNTwBq3E/BRFx5QVvBlLru+Tak/MFNhHizlm
|
||||
hwLUKAq47gk39ACgBKd5p9I89zRDVo7QfMLYTQ+J7RTBLJxMGZue3FMJn98t8Awn
|
||||
VDp3FC3eAoGBAOgffLfAVFGnKC1YfN7UXN3VdoQ8NiDAwyXXOjjhVMj9QGgaIVQm
|
||||
ORS/9qOcXtkr98klugAJy38MSiT9FRYVSM0LUkRAe5BjK5AixRgFgFOvgx9U4rCi
|
||||
C1qSJOFiKD+3yrmJ1qC3ra4F4cFZQO1KG2ine/vDIIHvS/NpkbDOOrA4AhQlODuh
|
||||
GXXfm/VyU0854RzsE4SCGA==
|
||||
-----END DSA PRIVATE KEY-----
|
||||
17
FreeRTOS-Plus/Source/WolfSSL/certs/1024/include.am
Normal file
17
FreeRTOS-Plus/Source/WolfSSL/certs/1024/include.am
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# vim:ft=automake
|
||||
# All paths should be given relative to the root
|
||||
#
|
||||
|
||||
EXTRA_DIST += \
|
||||
certs/1024/client-cert.pem \
|
||||
certs/1024/client-key.pem \
|
||||
certs/1024/dh1024.pem \
|
||||
certs/1024/dsa1024.pem
|
||||
|
||||
EXTRA_DIST += \
|
||||
certs/1024/client-cert.der \
|
||||
certs/1024/client-key.der \
|
||||
certs/1024/dh1024.der \
|
||||
certs/1024/dsa1024.der \
|
||||
certs/1024/rsa1024.der
|
||||
|
||||
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/1024/rsa1024.der
Normal file
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/1024/rsa1024.der
Normal file
Binary file not shown.
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/ca-cert.der
Normal file
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/ca-cert.der
Normal file
Binary file not shown.
87
FreeRTOS-Plus/Source/WolfSSL/certs/ca-cert.pem
Normal file
87
FreeRTOS-Plus/Source/WolfSSL/certs/ca-cert.pem
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIEqjCCA5KgAwIBAgIJAJpBR82hFGKMMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD
|
||||
VQQGEwJVUzEQMA4GA1UECAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjERMA8G
|
||||
A1UECgwIU2F3dG9vdGgxEzARBgNVBAsMCkNvbnN1bHRpbmcxGDAWBgNVBAMMD3d3
|
||||
dy53b2xmc3NsLmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTAe
|
||||
Fw0xNDA3MTEwMzIwMDhaFw0xNzA0MDYwMzIwMDhaMIGUMQswCQYDVQQGEwJVUzEQ
|
||||
MA4GA1UECAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjERMA8GA1UECgwIU2F3
|
||||
dG9vdGgxEzARBgNVBAsMCkNvbnN1bHRpbmcxGDAWBgNVBAMMD3d3dy53b2xmc3Ns
|
||||
LmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTCCASIwDQYJKoZI
|
||||
hvcNAQEBBQADggEPADCCAQoCggEBAL8Myi0Ush6EQlvNOB9K8k11EPG2NZ/fyn0D
|
||||
mNOs3gNm7irx2LB9bgdUCxCYIU2AyxIg58xP3kV9yXJ3MurKkLtpUhADL6jzlcXx
|
||||
i2JWG+9nb6QQQZWtCpvjpcCw0nB2UDBbqOgILHztp6J6jTgpHKzH7fJ8lbCVgn1J
|
||||
XDjNdyXvvYB1U5Q8PcpjW58VtdMdEy8Z0TzbdjrMuH3J5cLX2kBv2CHccxtCLVOc
|
||||
/hr8fat6Nj+Y3oR8BWfOahQ4h6nxjLVoy2h/cSAr9aBj9VYvoybSt2+xWhfXOJkI
|
||||
/pNYb/7DE0kIFgunTWcAUjFnI06Y7VFFHbkE2Qvs2CizS73tNnkCAwEAAaOB/DCB
|
||||
+TAdBgNVHQ4EFgQUJ45nEXTDJh0/7TNjs6TYHTDl6NUwgckGA1UdIwSBwTCBvoAU
|
||||
J45nEXTDJh0/7TNjs6TYHTDl6NWhgZqkgZcwgZQxCzAJBgNVBAYTAlVTMRAwDgYD
|
||||
VQQIDAdNb250YW5hMRAwDgYDVQQHDAdCb3plbWFuMREwDwYDVQQKDAhTYXd0b290
|
||||
aDETMBEGA1UECwwKQ29uc3VsdGluZzEYMBYGA1UEAwwPd3d3LndvbGZzc2wuY29t
|
||||
MR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdvbGZzc2wuY29tggkAmkFHzaEUYowwDAYD
|
||||
VR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAeXgMbXmIkfw6FZz5J2IW8CEf
|
||||
+n0/oqgyHvfyEal0FnRe3BjK8AAq1QMGJjDxR4P9Mm787apPfQxjYDEvfAy/mWaH
|
||||
7ScIhi3EM+iYIxz+o9uaSU78WkLvccM/rdxKqNKjHQmsMwR7hvNtAFmjyNvRPHP2
|
||||
DpDWXkngvzZjCHulsI81O1aMETVJBBzQ57pWxQ0KkY3Wt2IZNBJSTNJtfMU9DxiB
|
||||
VMv2POWE0tZxFewaNAvwoCF0Q8ijsN/ZZ9rirZNI+KCHvXkU4GIK3/cxLjF70TIq
|
||||
Cv5dFO/ZZFDkg5G8cA3XiI3ZvIQOxRqzv2QCTlGRpKKFFYOv8FubKElfsrMD2A==
|
||||
-----END CERTIFICATE-----
|
||||
Certificate:
|
||||
Data:
|
||||
Version: 3 (0x2)
|
||||
Serial Number:
|
||||
9a:41:47:cd:a1:14:62:8c
|
||||
Signature Algorithm: sha1WithRSAEncryption
|
||||
Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
Validity
|
||||
Not Before: Jul 11 03:20:08 2014 GMT
|
||||
Not After : Apr 6 03:20:08 2017 GMT
|
||||
Subject: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: rsaEncryption
|
||||
Public-Key: (2048 bit)
|
||||
Modulus:
|
||||
00:bf:0c:ca:2d:14:b2:1e:84:42:5b:cd:38:1f:4a:
|
||||
f2:4d:75:10:f1:b6:35:9f:df:ca:7d:03:98:d3:ac:
|
||||
de:03:66:ee:2a:f1:d8:b0:7d:6e:07:54:0b:10:98:
|
||||
21:4d:80:cb:12:20:e7:cc:4f:de:45:7d:c9:72:77:
|
||||
32:ea:ca:90:bb:69:52:10:03:2f:a8:f3:95:c5:f1:
|
||||
8b:62:56:1b:ef:67:6f:a4:10:41:95:ad:0a:9b:e3:
|
||||
a5:c0:b0:d2:70:76:50:30:5b:a8:e8:08:2c:7c:ed:
|
||||
a7:a2:7a:8d:38:29:1c:ac:c7:ed:f2:7c:95:b0:95:
|
||||
82:7d:49:5c:38:cd:77:25:ef:bd:80:75:53:94:3c:
|
||||
3d:ca:63:5b:9f:15:b5:d3:1d:13:2f:19:d1:3c:db:
|
||||
76:3a:cc:b8:7d:c9:e5:c2:d7:da:40:6f:d8:21:dc:
|
||||
73:1b:42:2d:53:9c:fe:1a:fc:7d:ab:7a:36:3f:98:
|
||||
de:84:7c:05:67:ce:6a:14:38:87:a9:f1:8c:b5:68:
|
||||
cb:68:7f:71:20:2b:f5:a0:63:f5:56:2f:a3:26:d2:
|
||||
b7:6f:b1:5a:17:d7:38:99:08:fe:93:58:6f:fe:c3:
|
||||
13:49:08:16:0b:a7:4d:67:00:52:31:67:23:4e:98:
|
||||
ed:51:45:1d:b9:04:d9:0b:ec:d8:28:b3:4b:bd:ed:
|
||||
36:79
|
||||
Exponent: 65537 (0x10001)
|
||||
X509v3 extensions:
|
||||
X509v3 Subject Key Identifier:
|
||||
27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5
|
||||
X509v3 Authority Key Identifier:
|
||||
keyid:27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5
|
||||
DirName:/C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
serial:9A:41:47:CD:A1:14:62:8C
|
||||
|
||||
X509v3 Basic Constraints:
|
||||
CA:TRUE
|
||||
Signature Algorithm: sha1WithRSAEncryption
|
||||
79:78:0c:6d:79:88:91:fc:3a:15:9c:f9:27:62:16:f0:21:1f:
|
||||
fa:7d:3f:a2:a8:32:1e:f7:f2:11:a9:74:16:74:5e:dc:18:ca:
|
||||
f0:00:2a:d5:03:06:26:30:f1:47:83:fd:32:6e:fc:ed:aa:4f:
|
||||
7d:0c:63:60:31:2f:7c:0c:bf:99:66:87:ed:27:08:86:2d:c4:
|
||||
33:e8:98:23:1c:fe:a3:db:9a:49:4e:fc:5a:42:ef:71:c3:3f:
|
||||
ad:dc:4a:a8:d2:a3:1d:09:ac:33:04:7b:86:f3:6d:00:59:a3:
|
||||
c8:db:d1:3c:73:f6:0e:90:d6:5e:49:e0:bf:36:63:08:7b:a5:
|
||||
b0:8f:35:3b:56:8c:11:35:49:04:1c:d0:e7:ba:56:c5:0d:0a:
|
||||
91:8d:d6:b7:62:19:34:12:52:4c:d2:6d:7c:c5:3d:0f:18:81:
|
||||
54:cb:f6:3c:e5:84:d2:d6:71:15:ec:1a:34:0b:f0:a0:21:74:
|
||||
43:c8:a3:b0:df:d9:67:da:e2:ad:93:48:f8:a0:87:bd:79:14:
|
||||
e0:62:0a:df:f7:31:2e:31:7b:d1:32:2a:0a:fe:5d:14:ef:d9:
|
||||
64:50:e4:83:91:bc:70:0d:d7:88:8d:d9:bc:84:0e:c5:1a:b3:
|
||||
bf:64:02:4e:51:91:a4:a2:85:15:83:af:f0:5b:9b:28:49:5f:
|
||||
b2:b3:03:d8
|
||||
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/ca-key.der
Normal file
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/ca-key.der
Normal file
Binary file not shown.
27
FreeRTOS-Plus/Source/WolfSSL/certs/ca-key.pem
Normal file
27
FreeRTOS-Plus/Source/WolfSSL/certs/ca-key.pem
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEpAIBAAKCAQEAvwzKLRSyHoRCW804H0ryTXUQ8bY1n9/KfQOY06zeA2buKvHY
|
||||
sH1uB1QLEJghTYDLEiDnzE/eRX3Jcncy6sqQu2lSEAMvqPOVxfGLYlYb72dvpBBB
|
||||
la0Km+OlwLDScHZQMFuo6AgsfO2nonqNOCkcrMft8nyVsJWCfUlcOM13Je+9gHVT
|
||||
lDw9ymNbnxW10x0TLxnRPNt2Osy4fcnlwtfaQG/YIdxzG0ItU5z+Gvx9q3o2P5je
|
||||
hHwFZ85qFDiHqfGMtWjLaH9xICv1oGP1Vi+jJtK3b7FaF9c4mQj+k1hv/sMTSQgW
|
||||
C6dNZwBSMWcjTpjtUUUduQTZC+zYKLNLve02eQIDAQABAoIBAD1uTmAahH+dhXzh
|
||||
Swd84NaZKt6d+TY0DncOPgjqT+UGJtT2OPffDQ8cLgai9CponGNy4zXmBJGRtcGx
|
||||
pFSs18b7QaDWdW+9C06/sVLoX0kmmFZHx97p6jxgAb8o3DG/SV+TSYd6gVuWS03K
|
||||
XDhPt+Gy08ch2jwShwfkG9xD7OjsVGHn9u2mCy7134J/xh9hGZykgznfIYWJb3ev
|
||||
hhUyCKJaCyZh+3AMypw4fbwi7uujqBYA+YqAHgCEqEpB+IQDZy8jWy+baybDBzSU
|
||||
owM7ctWfcuCtzDSrvcfV9SYwhQ8wIzlS/zzLmSFNiKWr7mK5x+C7R4fBac9z8zC+
|
||||
zjkEnOUCgYEA4XZFgFm200nfCu8S1g/wt8sqN7+n+LVN9TE1reSjlKHb8ZattQVk
|
||||
hYP8G1spqr74Jj92fq0c8MvXJrQbBY5Whn4IYiHBhtZHeT63XaTGOtexdCD2UJdB
|
||||
BFPtPybWb5H6aCbsKtya8efc+3PweUMbIaNZBGNSB8nX5tEbXV6W+lMCgYEA2O1O
|
||||
ZGFrkQxhAbUPu0RnUx7cB8Qkfp5shCORDOQSBBZNeJjMlj0gTg9Fmrb4s5MNsqIb
|
||||
KfImecjF0nh+XnPy13Bhu0DOYQX+aR6CKeYUuKHnltAjPwWTAPLhTX7tt5Zs9/Dk
|
||||
0c8BmE/cdFSqbV5aQTH+/5q2oAXdqRBU+GvQqoMCgYAh0wSKROtQt3xmv4cr5ihO
|
||||
6oPi6TXh8hFH/6H1/J8t5TqB/AEDb1OtVCe2Uu7lVtETq+GzD3WQCoS0ocCMDNae
|
||||
RrorPrUx7WO7pNUNj3LN0R4mNeu+G3L9mzm0h7cT9eqDRZOYuo/kSsy0TKh/CLpB
|
||||
SahJKD1ePcHONwDL+SzdUQKBgQChV58+udavg22DP4/70NyozgMJI7GhG2PKxElW
|
||||
NSvRLmVglQVVmRE1/dXfRMeliHJfsoJRqHFFkzbPXB9hUQwFgOivxXu6XiLjPHXD
|
||||
hAVVbdY6LYSJkzPLONqqMQXNzmwt3VXTVwvwpTVqsK4xukOWygDHS+MZEkPTQvpv
|
||||
6oDA0QKBgQC524kgNCdwYjTqXyViEvOdgb9I7poOwY0Q/2WanS0aipRayMClpYRh
|
||||
ntQkue+pncl3C8dwZj26yFTf0jPh9X/5J2G+V0Xdt0UXJPUj5DgOkSfu4yDYFMiU
|
||||
R3dAd0UYng3OeT9XMVYJSWe+lFhP9sSr4onj44rABVUsJMBKlwQnmg==
|
||||
-----END RSA PRIVATE KEY-----
|
||||
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/client-cert.der
Normal file
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/client-cert.der
Normal file
Binary file not shown.
87
FreeRTOS-Plus/Source/WolfSSL/certs/client-cert.pem
Normal file
87
FreeRTOS-Plus/Source/WolfSSL/certs/client-cert.pem
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
Certificate:
|
||||
Data:
|
||||
Version: 3 (0x2)
|
||||
Serial Number:
|
||||
b6:63:af:8f:5d:62:57:a0
|
||||
Signature Algorithm: sha1WithRSAEncryption
|
||||
Issuer: C=US, ST=Montana, L=Bozeman, O=wolfSSL, OU=Programming, CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
Validity
|
||||
Not Before: Jul 11 17:39:44 2014 GMT
|
||||
Not After : Apr 6 17:39:44 2017 GMT
|
||||
Subject: C=US, ST=Montana, L=Bozeman, O=wolfSSL, OU=Programming, CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: rsaEncryption
|
||||
Public-Key: (2048 bit)
|
||||
Modulus:
|
||||
00:c3:03:d1:2b:fe:39:a4:32:45:3b:53:c8:84:2b:
|
||||
2a:7c:74:9a:bd:aa:2a:52:07:47:d6:a6:36:b2:07:
|
||||
32:8e:d0:ba:69:7b:c6:c3:44:9e:d4:81:48:fd:2d:
|
||||
68:a2:8b:67:bb:a1:75:c8:36:2c:4a:d2:1b:f7:8b:
|
||||
ba:cf:0d:f9:ef:ec:f1:81:1e:7b:9b:03:47:9a:bf:
|
||||
65:cc:7f:65:24:69:a6:e8:14:89:5b:e4:34:f7:c5:
|
||||
b0:14:93:f5:67:7b:3a:7a:78:e1:01:56:56:91:a6:
|
||||
13:42:8d:d2:3c:40:9c:4c:ef:d1:86:df:37:51:1b:
|
||||
0c:a1:3b:f5:f1:a3:4a:35:e4:e1:ce:96:df:1b:7e:
|
||||
bf:4e:97:d0:10:e8:a8:08:30:81:af:20:0b:43:14:
|
||||
c5:74:67:b4:32:82:6f:8d:86:c2:88:40:99:36:83:
|
||||
ba:1e:40:72:22:17:d7:52:65:24:73:b0:ce:ef:19:
|
||||
cd:ae:ff:78:6c:7b:c0:12:03:d4:4e:72:0d:50:6d:
|
||||
3b:a3:3b:a3:99:5e:9d:c8:d9:0c:85:b3:d9:8a:d9:
|
||||
54:26:db:6d:fa:ac:bb:ff:25:4c:c4:d1:79:f4:71:
|
||||
d3:86:40:18:13:b0:63:b5:72:4e:30:c4:97:84:86:
|
||||
2d:56:2f:d7:15:f7:7f:c0:ae:f5:fc:5b:e5:fb:a1:
|
||||
ba:d3
|
||||
Exponent: 65537 (0x10001)
|
||||
X509v3 extensions:
|
||||
X509v3 Subject Key Identifier:
|
||||
33:D8:45:66:D7:68:87:18:7E:54:0D:70:27:91:C7:26:D7:85:65:C0
|
||||
X509v3 Authority Key Identifier:
|
||||
keyid:33:D8:45:66:D7:68:87:18:7E:54:0D:70:27:91:C7:26:D7:85:65:C0
|
||||
DirName:/C=US/ST=Montana/L=Bozeman/O=wolfSSL/OU=Programming/CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
serial:B6:63:AF:8F:5D:62:57:A0
|
||||
|
||||
X509v3 Basic Constraints:
|
||||
CA:TRUE
|
||||
Signature Algorithm: sha1WithRSAEncryption
|
||||
85:10:90:c5:5d:de:25:8c:f2:57:7b:2d:14:1c:05:f9:71:63:
|
||||
40:b0:e3:c1:c1:2e:13:2a:7a:b7:d6:24:58:87:eb:03:fb:0d:
|
||||
af:e0:f4:d0:c8:bc:51:36:10:4f:79:cc:4f:66:7d:af:99:cb:
|
||||
7b:ce:68:94:c6:36:aa:42:6e:8c:78:5b:b2:85:ca:d1:e1:a8:
|
||||
31:d1:81:d9:f9:c1:a3:9e:34:43:ef:0a:79:7d:3e:83:61:fc:
|
||||
14:5c:d1:dd:bc:0e:d7:51:b7:71:6e:41:7e:8b:2c:5a:9a:cb:
|
||||
77:4b:6a:f5:06:ff:02:af:1e:e6:63:4f:bc:44:d9:3f:56:9e:
|
||||
09:9c:43:f9:55:21:32:46:82:09:86:a9:7b:74:1c:9e:5a:2a:
|
||||
bf:03:79:91:cb:f2:29:7f:c9:15:82:89:b9:53:cd:7e:07:90:
|
||||
a9:5d:76:e1:19:5e:0d:58:b8:59:d5:0d:df:23:ab:6b:63:76:
|
||||
19:9e:9c:df:b0:57:49:6c:d0:86:97:c3:6c:3c:fa:e0:56:c2:
|
||||
1b:e3:a1:42:1a:58:62:85:9d:74:19:83:08:af:59:90:f8:99:
|
||||
bd:67:d3:4a:ea:0e:c9:ca:61:8a:0d:8a:42:cc:90:e9:2e:c2:
|
||||
54:73:7f:5e:af:8d:e2:32:cb:45:20:d6:19:4d:5b:77:31:cc:
|
||||
0f:2d:c0:7e
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIEqjCCA5KgAwIBAgIJALZjr49dYlegMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD
|
||||
VQQGEwJVUzEQMA4GA1UECAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjEQMA4G
|
||||
A1UECgwHd29sZlNTTDEUMBIGA1UECwwLUHJvZ3JhbW1pbmcxGDAWBgNVBAMMD3d3
|
||||
dy53b2xmc3NsLmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTAe
|
||||
Fw0xNDA3MTExNzM5NDRaFw0xNzA0MDYxNzM5NDRaMIGUMQswCQYDVQQGEwJVUzEQ
|
||||
MA4GA1UECAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjEQMA4GA1UECgwHd29s
|
||||
ZlNTTDEUMBIGA1UECwwLUHJvZ3JhbW1pbmcxGDAWBgNVBAMMD3d3dy53b2xmc3Ns
|
||||
LmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTCCASIwDQYJKoZI
|
||||
hvcNAQEBBQADggEPADCCAQoCggEBAMMD0Sv+OaQyRTtTyIQrKnx0mr2qKlIHR9am
|
||||
NrIHMo7Quml7xsNEntSBSP0taKKLZ7uhdcg2LErSG/eLus8N+e/s8YEee5sDR5q/
|
||||
Zcx/ZSRppugUiVvkNPfFsBST9Wd7Onp44QFWVpGmE0KN0jxAnEzv0YbfN1EbDKE7
|
||||
9fGjSjXk4c6W3xt+v06X0BDoqAgwga8gC0MUxXRntDKCb42GwohAmTaDuh5AciIX
|
||||
11JlJHOwzu8Zza7/eGx7wBID1E5yDVBtO6M7o5lencjZDIWz2YrZVCbbbfqsu/8l
|
||||
TMTRefRx04ZAGBOwY7VyTjDEl4SGLVYv1xX3f8Cu9fxb5fuhutMCAwEAAaOB/DCB
|
||||
+TAdBgNVHQ4EFgQUM9hFZtdohxh+VA1wJ5HHJteFZcAwgckGA1UdIwSBwTCBvoAU
|
||||
M9hFZtdohxh+VA1wJ5HHJteFZcChgZqkgZcwgZQxCzAJBgNVBAYTAlVTMRAwDgYD
|
||||
VQQIDAdNb250YW5hMRAwDgYDVQQHDAdCb3plbWFuMRAwDgYDVQQKDAd3b2xmU1NM
|
||||
MRQwEgYDVQQLDAtQcm9ncmFtbWluZzEYMBYGA1UEAwwPd3d3LndvbGZzc2wuY29t
|
||||
MR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdvbGZzc2wuY29tggkAtmOvj11iV6AwDAYD
|
||||
VR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAhRCQxV3eJYzyV3stFBwF+XFj
|
||||
QLDjwcEuEyp6t9YkWIfrA/sNr+D00Mi8UTYQT3nMT2Z9r5nLe85olMY2qkJujHhb
|
||||
soXK0eGoMdGB2fnBo540Q+8KeX0+g2H8FFzR3bwO11G3cW5BfossWprLd0tq9Qb/
|
||||
Aq8e5mNPvETZP1aeCZxD+VUhMkaCCYape3QcnloqvwN5kcvyKX/JFYKJuVPNfgeQ
|
||||
qV124RleDVi4WdUN3yOra2N2GZ6c37BXSWzQhpfDbDz64FbCG+OhQhpYYoWddBmD
|
||||
CK9ZkPiZvWfTSuoOycphig2KQsyQ6S7CVHN/Xq+N4jLLRSDWGU1bdzHMDy3Afg==
|
||||
-----END CERTIFICATE-----
|
||||
54
FreeRTOS-Plus/Source/WolfSSL/certs/client-ecc-cert.pem
Normal file
54
FreeRTOS-Plus/Source/WolfSSL/certs/client-ecc-cert.pem
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
Certificate:
|
||||
Data:
|
||||
Version: 3 (0x2)
|
||||
Serial Number:
|
||||
bf:cc:cb:7a:0a:07:42:82
|
||||
Signature Algorithm: ecdsa-with-SHA1
|
||||
Issuer: C=US, ST=Oregon, L=Salem, O=Client ECC, OU=Fast, CN=www.yassl.com/emailAddress=info@yassl.com
|
||||
Validity
|
||||
Not Before: May 1 23:51:33 2012 GMT
|
||||
Not After : Jan 26 23:51:33 2015 GMT
|
||||
Subject: C=US, ST=Oregon, L=Salem, O=Client ECC, OU=Fast, CN=www.yassl.com/emailAddress=info@yassl.com
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: id-ecPublicKey
|
||||
EC Public Key:
|
||||
pub:
|
||||
04:55:bf:f4:0f:44:50:9a:3d:ce:9b:b7:f0:c5:4d:
|
||||
f5:70:7b:d4:ec:24:8e:19:80:ec:5a:4c:a2:24:03:
|
||||
62:2c:9b:da:ef:a2:35:12:43:84:76:16:c6:56:95:
|
||||
06:cc:01:a9:bd:f6:75:1a:42:f7:bd:a9:b2:36:22:
|
||||
5f:c7:5d:7f:b4
|
||||
ASN1 OID: prime256v1
|
||||
X509v3 extensions:
|
||||
X509v3 Subject Key Identifier:
|
||||
EB:D4:4B:59:6B:95:61:3F:51:57:B6:04:4D:89:41:88:44:5C:AB:F2
|
||||
X509v3 Authority Key Identifier:
|
||||
keyid:EB:D4:4B:59:6B:95:61:3F:51:57:B6:04:4D:89:41:88:44:5C:AB:F2
|
||||
DirName:/C=US/ST=Oregon/L=Salem/O=Client ECC/OU=Fast/CN=www.yassl.com/emailAddress=info@yassl.com
|
||||
serial:BF:CC:CB:7A:0A:07:42:82
|
||||
|
||||
X509v3 Basic Constraints:
|
||||
CA:TRUE
|
||||
Signature Algorithm: ecdsa-with-SHA1
|
||||
30:44:02:20:26:08:44:95:35:2e:fa:9d:20:01:a6:79:60:ed:
|
||||
35:a7:0a:dd:7a:0e:75:c5:80:d2:0b:9f:6a:90:d6:31:76:75:
|
||||
02:20:2d:87:a2:bb:d5:e2:42:61:35:19:59:40:1d:fd:71:4f:
|
||||
28:65:96:99:e6:85:1b:09:ad:d4:58:71:56:63:0b:c7
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIC+jCCAqKgAwIBAgIJAL/My3oKB0KCMAkGByqGSM49BAEwgYkxCzAJBgNVBAYT
|
||||
AlVTMQ8wDQYDVQQIEwZPcmVnb24xDjAMBgNVBAcTBVNhbGVtMRMwEQYDVQQKEwpD
|
||||
bGllbnQgRUNDMQ0wCwYDVQQLEwRGYXN0MRYwFAYDVQQDEw13d3cueWFzc2wuY29t
|
||||
MR0wGwYJKoZIhvcNAQkBFg5pbmZvQHlhc3NsLmNvbTAeFw0xMjA1MDEyMzUxMzNa
|
||||
Fw0xNTAxMjYyMzUxMzNaMIGJMQswCQYDVQQGEwJVUzEPMA0GA1UECBMGT3JlZ29u
|
||||
MQ4wDAYDVQQHEwVTYWxlbTETMBEGA1UEChMKQ2xpZW50IEVDQzENMAsGA1UECxME
|
||||
RmFzdDEWMBQGA1UEAxMNd3d3Lnlhc3NsLmNvbTEdMBsGCSqGSIb3DQEJARYOaW5m
|
||||
b0B5YXNzbC5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAARVv/QPRFCaPc6b
|
||||
t/DFTfVwe9TsJI4ZgOxaTKIkA2Ism9rvojUSQ4R2FsZWlQbMAam99nUaQve9qbI2
|
||||
Il/HXX+0o4HxMIHuMB0GA1UdDgQWBBTr1EtZa5VhP1FXtgRNiUGIRFyr8jCBvgYD
|
||||
VR0jBIG2MIGzgBTr1EtZa5VhP1FXtgRNiUGIRFyr8qGBj6SBjDCBiTELMAkGA1UE
|
||||
BhMCVVMxDzANBgNVBAgTBk9yZWdvbjEOMAwGA1UEBxMFU2FsZW0xEzARBgNVBAoT
|
||||
CkNsaWVudCBFQ0MxDTALBgNVBAsTBEZhc3QxFjAUBgNVBAMTDXd3dy55YXNzbC5j
|
||||
b20xHTAbBgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tggkAv8zLegoHQoIwDAYD
|
||||
VR0TBAUwAwEB/zAJBgcqhkjOPQQBA0cAMEQCICYIRJU1LvqdIAGmeWDtNacK3XoO
|
||||
dcWA0gufapDWMXZ1AiAth6K71eJCYTUZWUAd/XFPKGWWmeaFGwmt1FhxVmMLxw==
|
||||
-----END CERTIFICATE-----
|
||||
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/client-key.der
Normal file
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/client-key.der
Normal file
Binary file not shown.
27
FreeRTOS-Plus/Source/WolfSSL/certs/client-key.pem
Normal file
27
FreeRTOS-Plus/Source/WolfSSL/certs/client-key.pem
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEpAIBAAKCAQEAwwPRK/45pDJFO1PIhCsqfHSavaoqUgdH1qY2sgcyjtC6aXvG
|
||||
w0Se1IFI/S1oootnu6F1yDYsStIb94u6zw357+zxgR57mwNHmr9lzH9lJGmm6BSJ
|
||||
W+Q098WwFJP1Z3s6enjhAVZWkaYTQo3SPECcTO/Rht83URsMoTv18aNKNeThzpbf
|
||||
G36/TpfQEOioCDCBryALQxTFdGe0MoJvjYbCiECZNoO6HkByIhfXUmUkc7DO7xnN
|
||||
rv94bHvAEgPUTnINUG07ozujmV6dyNkMhbPZitlUJttt+qy7/yVMxNF59HHThkAY
|
||||
E7BjtXJOMMSXhIYtVi/XFfd/wK71/Fvl+6G60wIDAQABAoIBAQCi5thfEHFkCJ4u
|
||||
bdFtHoXSCrGMR84sUWqgEp5T3pFMHW3qWXvyd6rZxtmKq9jhFuRjJv+1bBNZuOOl
|
||||
yHIXLgyfb+VZP3ZvSbERwlouFikN3reO3EDVou7gHqH0vpfbhmOWFM2YCWAtMHac
|
||||
PM3miO5HknkLWgDiXl8RfH35CLcgBokqXf0AqyLh8LO8JKleJg4fAC3+IZpTW23T
|
||||
K6uUgmhDNtj2L8Yi/LVBXQ0zYOqkfX7oS1WRVtNcV48flBcvqt7pnqj0z4pMjqDk
|
||||
VnOyz0+GxWk88yQgi1yWDPprEjuaZ8HfxpaypdWSDZsJQmgkEEXUUOQXOUjQNYuU
|
||||
bRHej8pZAoGBAOokp/lpM+lx3FJ9iCEoL0neunIW6cxHeogNlFeEWBY6gbA/os+m
|
||||
bB6wBikAj+d3dqzbysfZXps/JpBSrvw4kAAUu7QPWJTnL2p+HE9BIdQxWR9OihqN
|
||||
p1dsItjl9H4yphDLZKVVA4emJwWMw9e2J7JNujDaR49U0z2LhI2UmFilAoGBANU4
|
||||
G8OPxZMMRwtvNZLFsI1GyJIYj/WACvfvof6AubUqusoYsF2lB9CTjdicBBzUYo6m
|
||||
JoEB/86KKmM0NUCqbYDeiSNqV02ebq2TTlaQC22dc4sMric93k7wqsVseGdslFKc
|
||||
N2dsLe+7r9+mkDzER8+Nlp6YqbSfxaZQ3LPw+3QXAoGAXoMJYr26fKK/QnT1fBzS
|
||||
ackEDYV+Pj0kEsMYe/Mp818OdmxZdeRBhGmdMvPNIquwNbpKsjzl2Vi2Yk9d3uWe
|
||||
CspTsiz3nrNrClt5ZexukU6SIPb8/Bbt03YM4ux/smkTa3gOWkZktF63JaBadTpL
|
||||
78c8Pvf9JrggxJkKmnO+wxkCgYEAukSTFKw0GTtfkWCs97TWgQU2UVM96GXcry7c
|
||||
YT7Jfbh/h/A7mwOCKTfOck4R1bHBDAegmZFKjX/sec/xObXphexi99p9vGRNIjwO
|
||||
8tZR9YfYmcARIF0PKf1b4q7ZHNkhVm38hNBf7RAVHBgh58Q9S9fQnmqVzyLJA3ue
|
||||
42AB/C8CgYAR0EvPG2e5nxB1R4ZlrjHCxjCsWQZQ2Q+1cAb38NPIYnyo2m72IT/T
|
||||
f1/qiqs/2Spe81HSwjA34y2jdQ0eTSE01VdwXIm/cuxKbmjVzRh0M06MOkWP5pZA
|
||||
62P5GYY6Ud2JS7Dz+Z9dKJU4vjWrylznk1M0oUVdEzllQkahn831vw==
|
||||
-----END RSA PRIVATE KEY-----
|
||||
12
FreeRTOS-Plus/Source/WolfSSL/certs/client-keyEnc.pem
Normal file
12
FreeRTOS-Plus/Source/WolfSSL/certs/client-keyEnc.pem
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
-----BEGIN RSA PRIVATE KEY-----
|
||||
Proc-Type: 4,ENCRYPTED
|
||||
DEK-Info: DES-EDE3-CBC,BDE979D13CCC0ABD
|
||||
|
||||
N7yz2JV13EmQ7MZPL5wamid5+G1V1gp8FKqMemAC5JDxonS/W9oViMLUcxbfPTDx
|
||||
FznKdYSVTIQ7vv3ofmDG4MEyV/2C568N2kdtAw+jTfrZFN+IU9CI+W+In/nacirF
|
||||
02sAcvDMofustnooKNOO7/iyb5+3vRvEt5vSSRQn5WuSQ9sUKjuzoLs/lbf7fyAt
|
||||
4NeqfI3rYBZXxiUOLITOGXzGNRuFoY+o2uDCfelLAJ8uhiVG6ME3LeJEo1dT5lZ8
|
||||
CSJOLPasKg0iG4V7olM4j9FvAfZr48RRsSfUen756Jo2HpI4bad8LKhFYIdNs2Au
|
||||
WwKLmjpo6QB9hBmRshR04rEXPdrgTqLBExCE08PyaGYnWU8ggWritCeBzDQFj/n4
|
||||
sI+NO0Mymuvg98e5RpO52lg3Xnqv9RIK3guLFOmI6aEHC0PS4WwOEQ==
|
||||
-----END RSA PRIVATE KEY-----
|
||||
39
FreeRTOS-Plus/Source/WolfSSL/certs/crl/cliCrl.pem
Normal file
39
FreeRTOS-Plus/Source/WolfSSL/certs/crl/cliCrl.pem
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
Certificate Revocation List (CRL):
|
||||
Version 2 (0x1)
|
||||
Signature Algorithm: sha1WithRSAEncryption
|
||||
Issuer: /C=US/ST=Montana/L=Bozeman/O=wolfSSL/OU=Programming/CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
Last Update: Jul 11 20:39:48 2014 GMT
|
||||
Next Update: Jul 11 20:39:48 2015 GMT
|
||||
CRL extensions:
|
||||
X509v3 CRL Number:
|
||||
2
|
||||
No Revoked Certificates.
|
||||
Signature Algorithm: sha1WithRSAEncryption
|
||||
35:c1:34:91:04:d9:88:99:83:40:ef:09:ee:04:28:91:be:7a:
|
||||
b1:84:48:f4:f8:c5:9d:50:6c:67:56:4c:ee:b2:3a:32:5c:1d:
|
||||
1c:49:ef:58:72:a7:69:71:9a:d8:a6:68:0c:3e:ff:48:15:c7:
|
||||
44:28:67:6b:34:9d:c0:dc:c5:1b:d1:2f:e6:90:0f:45:7c:aa:
|
||||
0c:f9:3c:19:dd:55:a0:92:8a:a0:fe:93:1d:1f:42:ae:5f:7c:
|
||||
48:a5:de:61:89:94:bf:43:d3:c1:2d:e8:8b:f9:c5:6e:b9:8a:
|
||||
40:0e:6e:32:5e:39:83:cb:9b:76:6b:de:6e:6c:da:4e:1e:5c:
|
||||
69:d6:8c:08:0e:9f:de:4e:77:9d:f5:e9:97:29:b3:4c:e0:cb:
|
||||
ed:46:68:ed:e1:89:ac:d7:b9:11:ca:5a:ed:fe:e3:73:20:6e:
|
||||
01:e6:77:a8:48:c7:01:83:40:25:a5:ee:d7:ef:2f:af:b8:e2:
|
||||
2d:85:37:2a:80:8f:7f:6a:a7:32:29:86:42:66:40:d7:eb:87:
|
||||
44:66:54:5f:04:5f:7b:22:14:6c:4c:5d:f0:57:ac:33:e0:da:
|
||||
53:d6:13:52:ea:85:b2:89:de:41:e6:a6:f5:0d:34:47:37:75:
|
||||
26:b8:c4:f3:e0:1b:c6:32:3f:3b:65:0a:20:08:8e:c7:7e:6d:
|
||||
61:f1:aa:eb
|
||||
-----BEGIN X509 CRL-----
|
||||
MIIB7jCB1wIBATANBgkqhkiG9w0BAQUFADCBlDELMAkGA1UEBhMCVVMxEDAOBgNV
|
||||
BAgMB01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xEDAOBgNVBAoMB3dvbGZTU0wx
|
||||
FDASBgNVBAsMC1Byb2dyYW1taW5nMRgwFgYDVQQDDA93d3cud29sZnNzbC5jb20x
|
||||
HzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20XDTE0MDcxMTIwMzk0OFoX
|
||||
DTE1MDcxMTIwMzk0OFqgDjAMMAoGA1UdFAQDAgECMA0GCSqGSIb3DQEBBQUAA4IB
|
||||
AQA1wTSRBNmImYNA7wnuBCiRvnqxhEj0+MWdUGxnVkzusjoyXB0cSe9YcqdpcZrY
|
||||
pmgMPv9IFcdEKGdrNJ3A3MUb0S/mkA9FfKoM+TwZ3VWgkoqg/pMdH0KuX3xIpd5h
|
||||
iZS/Q9PBLeiL+cVuuYpADm4yXjmDy5t2a95ubNpOHlxp1owIDp/eTned9emXKbNM
|
||||
4MvtRmjt4Yms17kRylrt/uNzIG4B5neoSMcBg0Alpe7X7y+vuOIthTcqgI9/aqcy
|
||||
KYZCZkDX64dEZlRfBF97IhRsTF3wV6wz4NpT1hNS6oWyid5B5qb1DTRHN3UmuMTz
|
||||
4BvGMj87ZQogCI7Hfm1h8arr
|
||||
-----END X509 CRL-----
|
||||
39
FreeRTOS-Plus/Source/WolfSSL/certs/crl/crl.pem
Normal file
39
FreeRTOS-Plus/Source/WolfSSL/certs/crl/crl.pem
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
Certificate Revocation List (CRL):
|
||||
Version 2 (0x1)
|
||||
Signature Algorithm: sha1WithRSAEncryption
|
||||
Issuer: /C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
Last Update: Jul 11 20:36:35 2014 GMT
|
||||
Next Update: Jul 11 20:36:35 2015 GMT
|
||||
CRL extensions:
|
||||
X509v3 CRL Number:
|
||||
1
|
||||
No Revoked Certificates.
|
||||
Signature Algorithm: sha1WithRSAEncryption
|
||||
b4:54:84:e9:f8:c3:5c:e4:c4:a1:9a:71:eb:bc:46:96:09:bd:
|
||||
84:9d:4c:ac:29:a8:23:12:9d:80:8e:18:30:85:92:94:72:04:
|
||||
6d:74:05:31:e0:1b:20:b1:ef:6f:44:98:e8:d4:20:74:b1:ec:
|
||||
9f:fe:ad:74:14:66:ad:6f:5b:7a:45:02:b5:6f:a8:d3:bd:dc:
|
||||
88:94:d1:e2:78:e1:11:44:95:57:7d:d9:8c:7e:09:dc:aa:4f:
|
||||
07:e0:59:f2:09:30:d5:7c:a0:6c:54:88:d0:76:88:33:11:61:
|
||||
20:9d:3d:89:49:3b:85:be:e7:c0:38:f1:08:be:44:7a:1d:4c:
|
||||
e4:84:7a:40:23:6f:85:bd:67:7b:77:7e:00:78:d2:3c:e2:a8:
|
||||
47:ba:5c:21:c4:78:15:81:a2:9e:a6:9c:c4:47:4c:ee:97:81:
|
||||
18:91:5e:18:2b:92:e8:06:1f:dc:f2:51:e1:b3:14:bf:c3:c5:
|
||||
9c:78:ce:41:2e:61:0b:71:ad:ea:9e:2d:bb:2e:e4:98:a9:14:
|
||||
47:3f:00:65:4e:09:17:82:ee:be:ea:48:1e:2e:a5:92:64:ce:
|
||||
e9:b1:ee:ce:01:5b:e8:e3:fe:ba:dd:8c:eb:ad:34:32:15:00:
|
||||
56:4d:fe:9d:60:bf:a1:cd:9e:1b:61:94:21:0a:b1:98:4f:ec:
|
||||
c1:af:b3:dc
|
||||
-----BEGIN X509 CRL-----
|
||||
MIIB7jCB1wIBATANBgkqhkiG9w0BAQUFADCBlDELMAkGA1UEBhMCVVMxEDAOBgNV
|
||||
BAgMB01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xETAPBgNVBAoMCFNhd3Rvb3Ro
|
||||
MRMwEQYDVQQLDApDb25zdWx0aW5nMRgwFgYDVQQDDA93d3cud29sZnNzbC5jb20x
|
||||
HzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20XDTE0MDcxMTIwMzYzNVoX
|
||||
DTE1MDcxMTIwMzYzNVqgDjAMMAoGA1UdFAQDAgEBMA0GCSqGSIb3DQEBBQUAA4IB
|
||||
AQC0VITp+MNc5MShmnHrvEaWCb2EnUysKagjEp2AjhgwhZKUcgRtdAUx4Bsgse9v
|
||||
RJjo1CB0seyf/q10FGatb1t6RQK1b6jTvdyIlNHieOERRJVXfdmMfgncqk8H4Fny
|
||||
CTDVfKBsVIjQdogzEWEgnT2JSTuFvufAOPEIvkR6HUzkhHpAI2+FvWd7d34AeNI8
|
||||
4qhHulwhxHgVgaKeppzER0zul4EYkV4YK5LoBh/c8lHhsxS/w8WceM5BLmELca3q
|
||||
ni27LuSYqRRHPwBlTgkXgu6+6kgeLqWSZM7pse7OAVvo4/663YzrrTQyFQBWTf6d
|
||||
YL+hzZ4bYZQhCrGYT+zBr7Pc
|
||||
-----END X509 CRL-----
|
||||
13
FreeRTOS-Plus/Source/WolfSSL/certs/crl/crl.revoked
Normal file
13
FreeRTOS-Plus/Source/WolfSSL/certs/crl/crl.revoked
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
-----BEGIN X509 CRL-----
|
||||
MIICBDCB7QIBATANBgkqhkiG9w0BAQsFADCBlDELMAkGA1UEBhMCVVMxEDAOBgNV
|
||||
BAgMB01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xETAPBgNVBAoMCFNhd3Rvb3Ro
|
||||
MRMwEQYDVQQLDApDb25zdWx0aW5nMRgwFgYDVQQDDA93d3cud29sZnNzbC5jb20x
|
||||
HzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20XDTE0MDcxMTEyMzUyN1oX
|
||||
DTE1MDcxMTEyMzUyN1owFDASAgEBFw0xNDA3MTExMjM1MjdaoA4wDDAKBgNVHRQE
|
||||
AwIBOzANBgkqhkiG9w0BAQsFAAOCAQEAB+ao48FzCAbRKKPkFJX8Ho5SZl44YhNW
|
||||
Uy/JxMkonyjyaMwp7GSwd2hNpv3geC6tHO7YLSRcyvyKu1BQVbeoa6FpultQSv5+
|
||||
twk6mmeSenzhzNhfJmzSEhJicXOgBoLAh4aBXkixQis9dAVg16/nNSS2DAJwEKMW
|
||||
kXcJpuBLt6XLL0aM71+NDqB8HAUUPyuNWLiYEb4NlScIWNh7lI6ZWmsv8vb1PMmn
|
||||
2hn4CVJIkHkfEHYnikek55iE31QMUyobCXzro+cR9jGR1iPZSQu9dxstRHF5bXai
|
||||
eBYWZIblBVCSJ896a5TJ5uaA1RKk6ZZbAG43oQTB/hupaEPjTTXysw==
|
||||
-----END X509 CRL-----
|
||||
26
FreeRTOS-Plus/Source/WolfSSL/certs/crl/eccCliCRL.pem
Normal file
26
FreeRTOS-Plus/Source/WolfSSL/certs/crl/eccCliCRL.pem
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
Certificate Revocation List (CRL):
|
||||
Version 2 (0x1)
|
||||
Signature Algorithm: ecdsa-with-SHA1
|
||||
Issuer: /C=US/ST=Oregon/L=Salem/O=Client ECC/OU=Fast/CN=www.yassl.com/emailAddress=info@yassl.com
|
||||
Last Update: Feb 7 20:14:06 2014 GMT
|
||||
Next Update: Feb 7 20:14:06 2015 GMT
|
||||
CRL extensions:
|
||||
X509v3 CRL Number:
|
||||
4
|
||||
Revoked Certificates:
|
||||
Serial Number: 02
|
||||
Revocation Date: Feb 7 20:14:06 2014 GMT
|
||||
Signature Algorithm: ecdsa-with-SHA1
|
||||
30:44:02:20:10:95:f9:c8:20:bc:7d:ce:79:6d:35:23:4c:82:
|
||||
8c:f5:8b:d1:4f:69:a9:5e:70:97:dd:bb:c2:67:13:46:b0:47:
|
||||
02:20:4f:1f:43:c2:cc:63:1c:6e:26:89:2d:e7:ce:69:45:6d:
|
||||
fb:8f:53:cd:1f:84:0f:93:fe:83:91:69:f2:91:c6:f9
|
||||
-----BEGIN X509 CRL-----
|
||||
MIIBNTCB3gIBATAJBgcqhkjOPQQBMIGJMQswCQYDVQQGEwJVUzEPMA0GA1UECBMG
|
||||
T3JlZ29uMQ4wDAYDVQQHEwVTYWxlbTETMBEGA1UEChMKQ2xpZW50IEVDQzENMAsG
|
||||
A1UECxMERmFzdDEWMBQGA1UEAxMNd3d3Lnlhc3NsLmNvbTEdMBsGCSqGSIb3DQEJ
|
||||
ARYOaW5mb0B5YXNzbC5jb20XDTE0MDIwNzIwMTQwNloXDTE1MDIwNzIwMTQwNlow
|
||||
FDASAgECFw0xNDAyMDcyMDE0MDZaoA4wDDAKBgNVHRQEAwIBBDAJBgcqhkjOPQQB
|
||||
A0cAMEQCIBCV+cggvH3OeW01I0yCjPWL0U9pqV5wl927wmcTRrBHAiBPH0PCzGMc
|
||||
biaJLefOaUVt+49TzR+ED5P+g5Fp8pHG+Q==
|
||||
-----END X509 CRL-----
|
||||
26
FreeRTOS-Plus/Source/WolfSSL/certs/crl/eccSrvCRL.pem
Normal file
26
FreeRTOS-Plus/Source/WolfSSL/certs/crl/eccSrvCRL.pem
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
Certificate Revocation List (CRL):
|
||||
Version 2 (0x1)
|
||||
Signature Algorithm: ecdsa-with-SHA1
|
||||
Issuer: /C=US/ST=Washington/L=Seattle/O=Eliptic/OU=ECC/CN=www.yassl.com/emailAddress=info@yassl.com
|
||||
Last Update: Feb 7 20:14:06 2014 GMT
|
||||
Next Update: Feb 7 20:14:06 2015 GMT
|
||||
CRL extensions:
|
||||
X509v3 CRL Number:
|
||||
5
|
||||
Revoked Certificates:
|
||||
Serial Number: 02
|
||||
Revocation Date: Feb 7 20:14:06 2014 GMT
|
||||
Signature Algorithm: ecdsa-with-SHA1
|
||||
30:44:02:20:2a:2a:2c:ff:8a:0f:6a:74:57:b8:41:a8:5a:5c:
|
||||
8c:7d:c1:7d:b1:76:a3:db:ff:22:1a:69:cd:80:8d:d5:e4:2a:
|
||||
02:20:2d:51:3e:01:5b:79:6c:f4:89:89:63:46:0b:65:44:46:
|
||||
59:2d:42:3e:ba:a8:6d:08:4a:20:1f:9a:06:cc:a9:65
|
||||
-----BEGIN X509 CRL-----
|
||||
MIIBNzCB4AIBATAJBgcqhkjOPQQBMIGLMQswCQYDVQQGEwJVUzETMBEGA1UECBMK
|
||||
V2FzaGluZ3RvbjEQMA4GA1UEBxMHU2VhdHRsZTEQMA4GA1UEChMHRWxpcHRpYzEM
|
||||
MAoGA1UECxMDRUNDMRYwFAYDVQQDEw13d3cueWFzc2wuY29tMR0wGwYJKoZIhvcN
|
||||
AQkBFg5pbmZvQHlhc3NsLmNvbRcNMTQwMjA3MjAxNDA2WhcNMTUwMjA3MjAxNDA2
|
||||
WjAUMBICAQIXDTE0MDIwNzIwMTQwNlqgDjAMMAoGA1UdFAQDAgEFMAkGByqGSM49
|
||||
BAEDRwAwRAIgKios/4oPanRXuEGoWlyMfcF9sXaj2/8iGmnNgI3V5CoCIC1RPgFb
|
||||
eWz0iYljRgtlREZZLUI+uqhtCEogH5oGzKll
|
||||
-----END X509 CRL-----
|
||||
14
FreeRTOS-Plus/Source/WolfSSL/certs/crl/include.am
Normal file
14
FreeRTOS-Plus/Source/WolfSSL/certs/crl/include.am
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# vim:ft=automake
|
||||
# All paths should be given relative to the root
|
||||
#
|
||||
|
||||
EXTRA_DIST += \
|
||||
certs/crl/crl.pem \
|
||||
certs/crl/cliCrl.pem \
|
||||
certs/crl/eccSrvCRL.pem \
|
||||
certs/crl/eccCliCRL.pem
|
||||
|
||||
EXTRA_DIST += \
|
||||
certs/crl/crl.revoked
|
||||
|
||||
|
||||
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/dh2048.der
Normal file
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/dh2048.der
Normal file
Binary file not shown.
29
FreeRTOS-Plus/Source/WolfSSL/certs/dh2048.pem
Normal file
29
FreeRTOS-Plus/Source/WolfSSL/certs/dh2048.pem
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
Diffie-Hellman-Parameters: (2048 bit)
|
||||
prime:
|
||||
00:b0:a1:08:06:9c:08:13:ba:59:06:3c:bc:30:d5:
|
||||
f5:00:c1:4f:44:a7:d6:ef:4a:c6:25:27:1c:e8:d2:
|
||||
96:53:0a:5c:91:dd:a2:c2:94:84:bf:7d:b2:44:9f:
|
||||
9b:d2:c1:8a:c5:be:72:5c:a7:e7:91:e6:d4:9f:73:
|
||||
07:85:5b:66:48:c7:70:fa:b4:ee:02:c9:3d:9a:4a:
|
||||
da:3d:c1:46:3e:19:69:d1:17:46:07:a3:4d:9f:2b:
|
||||
96:17:39:6d:30:8d:2a:f3:94:d3:75:cf:a0:75:e6:
|
||||
f2:92:1f:1a:70:05:aa:04:83:57:30:fb:da:76:93:
|
||||
38:50:e8:27:fd:63:ee:3c:e5:b7:c8:09:ae:6f:50:
|
||||
35:8e:84:ce:4a:00:e9:12:7e:5a:31:d7:33:fc:21:
|
||||
13:76:cc:16:30:db:0c:fc:c5:62:a7:35:b8:ef:b7:
|
||||
b0:ac:c0:36:f6:d9:c9:46:48:f9:40:90:00:2b:1b:
|
||||
aa:6c:e3:1a:c3:0b:03:9e:1b:c2:46:e4:48:4e:22:
|
||||
73:6f:c3:5f:d4:9a:d6:30:07:48:d6:8c:90:ab:d4:
|
||||
f6:f1:e3:48:d3:58:4b:a6:b9:cd:29:bf:68:1f:08:
|
||||
4b:63:86:2f:5c:6b:d6:b6:06:65:f7:a6:dc:00:67:
|
||||
6b:bb:c3:a9:41:83:fb:c7:fa:c8:e2:1e:7e:af:00:
|
||||
3f:93
|
||||
generator: 2 (0x2)
|
||||
-----BEGIN DH PARAMETERS-----
|
||||
MIIBCAKCAQEAsKEIBpwIE7pZBjy8MNX1AMFPRKfW70rGJScc6NKWUwpckd2iwpSE
|
||||
v32yRJ+b0sGKxb5yXKfnkebUn3MHhVtmSMdw+rTuAsk9mkraPcFGPhlp0RdGB6NN
|
||||
nyuWFzltMI0q85TTdc+gdebykh8acAWqBINXMPvadpM4UOgn/WPuPOW3yAmub1A1
|
||||
joTOSgDpEn5aMdcz/CETdswWMNsM/MVipzW477ewrMA29tnJRkj5QJAAKxuqbOMa
|
||||
wwsDnhvCRuRITiJzb8Nf1JrWMAdI1oyQq9T28eNI01hLprnNKb9oHwhLY4YvXGvW
|
||||
tgZl96bcAGdru8OpQYP7x/rI4h5+rwA/kwIBAg==
|
||||
-----END DH PARAMETERS-----
|
||||
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/dsa2048.der
Normal file
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/dsa2048.der
Normal file
Binary file not shown.
9
FreeRTOS-Plus/Source/WolfSSL/certs/ecc-client-key.pem
Normal file
9
FreeRTOS-Plus/Source/WolfSSL/certs/ecc-client-key.pem
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
ASN1 OID: prime256v1
|
||||
-----BEGIN EC PARAMETERS-----
|
||||
BggqhkjOPQMBBw==
|
||||
-----END EC PARAMETERS-----
|
||||
-----BEGIN EC PRIVATE KEY-----
|
||||
MHcCAQEEIPjPkmu9HijxqKuhI08ydBiIUK1+x+yS+I+XTa9WiWXHoAoGCCqGSM49
|
||||
AwEHoUQDQgAEVb/0D0RQmj3Om7fwxU31cHvU7CSOGYDsWkyiJANiLJva76I1EkOE
|
||||
dhbGVpUGzAGpvfZ1GkL3vamyNiJfx11/tA==
|
||||
-----END EC PRIVATE KEY-----
|
||||
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/ecc-key.der
Normal file
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/ecc-key.der
Normal file
Binary file not shown.
9
FreeRTOS-Plus/Source/WolfSSL/certs/ecc-key.pem
Normal file
9
FreeRTOS-Plus/Source/WolfSSL/certs/ecc-key.pem
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
ASN1 OID: prime256v1
|
||||
-----BEGIN EC PARAMETERS-----
|
||||
BggqhkjOPQMBBw==
|
||||
-----END EC PARAMETERS-----
|
||||
-----BEGIN EC PRIVATE KEY-----
|
||||
MHcCAQEEIEW2aQJznGyFoThbcujox6zEA41TNQT6bCjcNI3hqAmMoAoGCCqGSM49
|
||||
AwEHoUQDQgAEuzOsTCdQSsZKpQTDPN6fNttyLc6U6iv6yyAJOSwW6GEC6a9N0wKT
|
||||
mjFbl5Ihf/DPGNqREQI0huggWDMLgDSJ2A==
|
||||
-----END EC PRIVATE KEY-----
|
||||
5
FreeRTOS-Plus/Source/WolfSSL/certs/ecc-keyPkcs8.pem
Normal file
5
FreeRTOS-Plus/Source/WolfSSL/certs/ecc-keyPkcs8.pem
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgRbZpAnOcbIWhOFty
|
||||
6OjHrMQDjVM1BPpsKNw0jeGoCYyhRANCAAS7M6xMJ1BKxkqlBMM83p8223ItzpTq
|
||||
K/rLIAk5LBboYQLpr03TApOaMVuXkiF/8M8Y2pERAjSG6CBYMwuANInY
|
||||
-----END PRIVATE KEY-----
|
||||
42
FreeRTOS-Plus/Source/WolfSSL/certs/include.am
Normal file
42
FreeRTOS-Plus/Source/WolfSSL/certs/include.am
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
# vim:ft=automake
|
||||
# All paths should be given relative to the root
|
||||
#
|
||||
|
||||
EXTRA_DIST += \
|
||||
certs/ca-cert.pem \
|
||||
certs/ca-key.pem \
|
||||
certs/client-cert.pem \
|
||||
certs/client-keyEnc.pem \
|
||||
certs/client-key.pem \
|
||||
certs/ecc-key.pem \
|
||||
certs/ecc-keyPkcs8.pem \
|
||||
certs/ecc-client-key.pem \
|
||||
certs/client-ecc-cert.pem \
|
||||
certs/ntru-cert.pem \
|
||||
certs/dh2048.pem \
|
||||
certs/server-cert.pem \
|
||||
certs/server-ecc.pem \
|
||||
certs/server-ecc-rsa.pem \
|
||||
certs/server-keyEnc.pem \
|
||||
certs/server-key.pem \
|
||||
certs/server-keyPkcs8Enc12.pem \
|
||||
certs/server-keyPkcs8Enc2.pem \
|
||||
certs/server-keyPkcs8Enc.pem \
|
||||
certs/server-keyPkcs8.pem
|
||||
|
||||
EXTRA_DIST += \
|
||||
certs/ca-key.der \
|
||||
certs/ca-cert.der \
|
||||
certs/client-cert.der \
|
||||
certs/client-key.der \
|
||||
certs/dh2048.der \
|
||||
certs/rsa2048.der \
|
||||
certs/dsa2048.der \
|
||||
certs/ecc-key.der \
|
||||
certs/server-key.der \
|
||||
certs/server-cert.der
|
||||
|
||||
dist_doc_DATA+= certs/taoCert.txt
|
||||
|
||||
EXTRA_DIST+= certs/ntru-key.raw
|
||||
|
||||
28
FreeRTOS-Plus/Source/WolfSSL/certs/ntru-cert.pem
Normal file
28
FreeRTOS-Plus/Source/WolfSSL/certs/ntru-cert.pem
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIEzzCCA7egAwIBAgIIAXf7v+vECVkwDQYJKoZIhvcNAQEFBQAwgZQxCzAJBgNV
|
||||
BAYTAlVTMRAwDgYDVQQIDAdNb250YW5hMRAwDgYDVQQHDAdCb3plbWFuMREwDwYD
|
||||
VQQKDAhTYXd0b290aDETMBEGA1UECwwKQ29uc3VsdGluZzEYMBYGA1UEAwwPd3d3
|
||||
LndvbGZzc2wuY29tMR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdvbGZzc2wuY29tMCIY
|
||||
DzIwMTQwNzEwMjMyMDM5WhgPMjAxNTExMjMyMjIwMzlaMIGKMQswCQYDVQQGEwJV
|
||||
UzELMAkGA1UECAwCT1IxETAPBgNVBAcMCFBvcnRsYW5kMQ4wDAYDVQQKDAV5YVNT
|
||||
TDEUMBIGA1UECwwLRGV2ZWxvcG1lbnQxFjAUBgNVBAMMDXd3dy55YXNzbC5jb20x
|
||||
HTAbBgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tMIICTTAaBgsrBgEEAcEWAQEB
|
||||
AQYLKwYBBAHBFgEBAi4DggItAASCAijYe+JeNLXR6gSUtCr6lgMmeCQqvDRCb8wp
|
||||
bzUt/kqyRU7K0eMTSMv40ThD6jriU3p8uQQ92OkfbNwtWfB3VyScTpyr4INIvS3D
|
||||
gB6Y4uH+kDlWVQutqiPNvNSn0AxBnTEBOsBqqyDqzAXujcoSOxTbU9GLv5jk08iU
|
||||
Q9H4EkGMQgUr0VsPSBjrxK0VrQY9StpyObUM2z6LfRNjI5SGDvR6FBRdKUBdmUWw
|
||||
EMvUhB39MbFebvXHNkyFeFaTbc6hgCRgzLNHpb2xzq7YCb+F5CsLFD8WuWKLn/Fn
|
||||
61MSLvP99mIUM5MBBqacfrJSFzBWL8LX/NpEAO4SRbnKUJRr3e8cjfALU9oZnCgr
|
||||
2TY91lnlJcfPTeHLckkYVacz+l0E8zJpge7PViYGK2Zdune7EJZ2QZ/EnhV7mrjc
|
||||
GVwK6PZQ/l0UpzSz0yYyAzsb9OW7AlGOnH6u6lCP0sYwMDRdr1fPvq5Cu0ZkVzy+
|
||||
sfVD5kOyy35WEJQVmyuTu8ifos0QcmbqCNF5IrZtfZL7m/4Msg+GePL6x20A1TMF
|
||||
rZ//+1gNbcxaeZZVG7Jw7RfW461SMbTuypt3Qp2eNHox6OrF+6A96t5vfOwqYa8W
|
||||
GMMobFVQR8lH4qsBt/km0iQVjkvIjoSaPSSBcIgBxzXJwU2XCzVsj8tFW9IXP1SG
|
||||
4ouMty6qbFb73k9EwliEQkLBjXfINp5/wlR1nv4dAA66rZNtysktWah8t8jXtSAw
|
||||
DQYJKoZIhvcNAQEFBQADggEBAGCcqiwYrVUdQ7t4CvuPkuD7NFIAlVFNdwKaiJSp
|
||||
moCCNL3sBWW1UjGKTLLRvn08oPAmrOQ8OkK1rusw+G7hxWjicEypp/WcaVCQv4or
|
||||
M+BtWOUZ+fgIn6gHt4JRLMqt/R/t70AvONhIESL/XEjgQCP+GDuz+UDiwIxhzdcn
|
||||
pSFU7APxKbeKIrFxiMaH8fB8fwPY60IH/LRTX7jA5ixXQWOm6r3u5ocmMW4naHd4
|
||||
qAWB5wGmU/rmvrSw+v0mHjwvI66DiCeZl9Y9i4mOKk+7eOTdOsKR1VifBtEg/+Qj
|
||||
UHiltbupX9fkm5ncvaRS/stAYywBheGYbEMYMaatndvMuzw=
|
||||
-----END CERTIFICATE-----
|
||||
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/ntru-key.raw
Normal file
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/ntru-key.raw
Normal file
Binary file not shown.
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/rsa2048.der
Normal file
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/rsa2048.der
Normal file
Binary file not shown.
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/server-cert.der
Normal file
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/server-cert.der
Normal file
Binary file not shown.
173
FreeRTOS-Plus/Source/WolfSSL/certs/server-cert.pem
Normal file
173
FreeRTOS-Plus/Source/WolfSSL/certs/server-cert.pem
Normal file
|
|
@ -0,0 +1,173 @@
|
|||
Certificate:
|
||||
Data:
|
||||
Version: 3 (0x2)
|
||||
Serial Number: 1 (0x1)
|
||||
Signature Algorithm: sha1WithRSAEncryption
|
||||
Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
Validity
|
||||
Not Before: Jul 11 17:20:14 2014 GMT
|
||||
Not After : Apr 6 17:20:14 2017 GMT
|
||||
Subject: C=US, ST=Montana, L=Bozeman, O=wolfSSL, OU=Support, CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: rsaEncryption
|
||||
Public-Key: (2048 bit)
|
||||
Modulus:
|
||||
00:c0:95:08:e1:57:41:f2:71:6d:b7:d2:45:41:27:
|
||||
01:65:c6:45:ae:f2:bc:24:30:b8:95:ce:2f:4e:d6:
|
||||
f6:1c:88:bc:7c:9f:fb:a8:67:7f:fe:5c:9c:51:75:
|
||||
f7:8a:ca:07:e7:35:2f:8f:e1:bd:7b:c0:2f:7c:ab:
|
||||
64:a8:17:fc:ca:5d:7b:ba:e0:21:e5:72:2e:6f:2e:
|
||||
86:d8:95:73:da:ac:1b:53:b9:5f:3f:d7:19:0d:25:
|
||||
4f:e1:63:63:51:8b:0b:64:3f:ad:43:b8:a5:1c:5c:
|
||||
34:b3:ae:00:a0:63:c5:f6:7f:0b:59:68:78:73:a6:
|
||||
8c:18:a9:02:6d:af:c3:19:01:2e:b8:10:e3:c6:cc:
|
||||
40:b4:69:a3:46:33:69:87:6e:c4:bb:17:a6:f3:e8:
|
||||
dd:ad:73:bc:7b:2f:21:b5:fd:66:51:0c:bd:54:b3:
|
||||
e1:6d:5f:1c:bc:23:73:d1:09:03:89:14:d2:10:b9:
|
||||
64:c3:2a:d0:a1:96:4a:bc:e1:d4:1a:5b:c7:a0:c0:
|
||||
c1:63:78:0f:44:37:30:32:96:80:32:23:95:a1:77:
|
||||
ba:13:d2:97:73:e2:5d:25:c9:6a:0d:c3:39:60:a4:
|
||||
b4:b0:69:42:42:09:e9:d8:08:bc:33:20:b3:58:22:
|
||||
a7:aa:eb:c4:e1:e6:61:83:c5:d2:96:df:d9:d0:4f:
|
||||
ad:d7
|
||||
Exponent: 65537 (0x10001)
|
||||
X509v3 extensions:
|
||||
X509v3 Subject Key Identifier:
|
||||
B3:11:32:C9:92:98:84:E2:C9:F8:D0:3B:6E:03:42:CA:1F:0E:8E:3C
|
||||
X509v3 Authority Key Identifier:
|
||||
keyid:27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5
|
||||
DirName:/C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
serial:9A:41:47:CD:A1:14:62:8C
|
||||
|
||||
X509v3 Basic Constraints:
|
||||
CA:TRUE
|
||||
Signature Algorithm: sha1WithRSAEncryption
|
||||
3d:8c:70:05:5b:62:4b:bf:6c:b6:48:61:01:10:1d:5e:05:ba:
|
||||
55:94:2c:ae:59:6f:97:80:5d:6c:86:ec:9a:eb:15:45:44:e4:
|
||||
56:f8:75:ca:8a:45:32:f4:c7:e1:fa:f2:98:1c:91:d3:3f:e8:
|
||||
0e:c9:1b:fa:e1:79:99:67:0e:0d:6b:8a:ec:1a:2c:59:c4:34:
|
||||
04:8d:39:77:cd:b5:e9:60:5b:82:bf:34:ce:ed:c6:4f:3f:b4:
|
||||
5c:4d:8a:b4:f4:0a:04:12:a0:56:c1:e1:33:37:a1:54:87:48:
|
||||
e9:81:c2:0f:8f:6f:d3:52:4c:4c:32:4c:6b:9f:3a:04:8f:77:
|
||||
5d:ad:dc:3d:2b:f2:c9:df:3c:60:5d:d8:fc:86:72:7c:3d:d0:
|
||||
84:4b:8c:df:26:43:fe:c0:cc:5b:e1:36:b3:3d:32:28:a3:ef:
|
||||
0c:20:d6:b1:50:39:d6:67:a9:8b:84:bc:92:34:eb:19:23:e8:
|
||||
10:8f:ea:bd:18:8c:93:27:3c:74:75:8e:58:04:fa:2a:74:44:
|
||||
7d:fc:4d:39:df:54:17:ba:78:e1:5d:6a:70:d3:7c:a2:80:81:
|
||||
e6:19:51:91:c3:44:51:ec:bb:88:a9:53:e1:d7:a9:8c:28:f4:
|
||||
21:1c:42:51:09:b4:12:6d:a0:d6:25:09:85:c6:2a:0c:af:a7:
|
||||
58:e6:52:8b
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIEnjCCA4agAwIBAgIBATANBgkqhkiG9w0BAQUFADCBlDELMAkGA1UEBhMCVVMx
|
||||
EDAOBgNVBAgMB01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xETAPBgNVBAoMCFNh
|
||||
d3Rvb3RoMRMwEQYDVQQLDApDb25zdWx0aW5nMRgwFgYDVQQDDA93d3cud29sZnNz
|
||||
bC5jb20xHzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20wHhcNMTQwNzEx
|
||||
MTcyMDE0WhcNMTcwNDA2MTcyMDE0WjCBkDELMAkGA1UEBhMCVVMxEDAOBgNVBAgM
|
||||
B01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xEDAOBgNVBAoMB3dvbGZTU0wxEDAO
|
||||
BgNVBAsMB1N1cHBvcnQxGDAWBgNVBAMMD3d3dy53b2xmc3NsLmNvbTEfMB0GCSqG
|
||||
SIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEP
|
||||
ADCCAQoCggEBAMCVCOFXQfJxbbfSRUEnAWXGRa7yvCQwuJXOL07W9hyIvHyf+6hn
|
||||
f/5cnFF194rKB+c1L4/hvXvAL3yrZKgX/Mpde7rgIeVyLm8uhtiVc9qsG1O5Xz/X
|
||||
GQ0lT+FjY1GLC2Q/rUO4pRxcNLOuAKBjxfZ/C1loeHOmjBipAm2vwxkBLrgQ48bM
|
||||
QLRpo0YzaYduxLsXpvPo3a1zvHsvIbX9ZlEMvVSz4W1fHLwjc9EJA4kU0hC5ZMMq
|
||||
0KGWSrzh1Bpbx6DAwWN4D0Q3MDKWgDIjlaF3uhPSl3PiXSXJag3DOWCktLBpQkIJ
|
||||
6dgIvDMgs1gip6rrxOHmYYPF0pbf2dBPrdcCAwEAAaOB/DCB+TAdBgNVHQ4EFgQU
|
||||
sxEyyZKYhOLJ+NA7bgNCyh8OjjwwgckGA1UdIwSBwTCBvoAUJ45nEXTDJh0/7TNj
|
||||
s6TYHTDl6NWhgZqkgZcwgZQxCzAJBgNVBAYTAlVTMRAwDgYDVQQIDAdNb250YW5h
|
||||
MRAwDgYDVQQHDAdCb3plbWFuMREwDwYDVQQKDAhTYXd0b290aDETMBEGA1UECwwK
|
||||
Q29uc3VsdGluZzEYMBYGA1UEAwwPd3d3LndvbGZzc2wuY29tMR8wHQYJKoZIhvcN
|
||||
AQkBFhBpbmZvQHdvbGZzc2wuY29tggkAmkFHzaEUYowwDAYDVR0TBAUwAwEB/zAN
|
||||
BgkqhkiG9w0BAQUFAAOCAQEAPYxwBVtiS79stkhhARAdXgW6VZQsrllvl4BdbIbs
|
||||
musVRUTkVvh1yopFMvTH4frymByR0z/oDskb+uF5mWcODWuK7BosWcQ0BI05d821
|
||||
6WBbgr80zu3GTz+0XE2KtPQKBBKgVsHhMzehVIdI6YHCD49v01JMTDJMa586BI93
|
||||
Xa3cPSvyyd88YF3Y/IZyfD3QhEuM3yZD/sDMW+E2sz0yKKPvDCDWsVA51mepi4S8
|
||||
kjTrGSPoEI/qvRiMkyc8dHWOWAT6KnREffxNOd9UF7p44V1qcNN8ooCB5hlRkcNE
|
||||
Uey7iKlT4depjCj0IRxCUQm0Em2g1iUJhcYqDK+nWOZSiw==
|
||||
-----END CERTIFICATE-----
|
||||
Certificate:
|
||||
Data:
|
||||
Version: 3 (0x2)
|
||||
Serial Number:
|
||||
9a:41:47:cd:a1:14:62:8c
|
||||
Signature Algorithm: sha1WithRSAEncryption
|
||||
Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
Validity
|
||||
Not Before: Jul 11 03:20:08 2014 GMT
|
||||
Not After : Apr 6 03:20:08 2017 GMT
|
||||
Subject: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: rsaEncryption
|
||||
Public-Key: (2048 bit)
|
||||
Modulus:
|
||||
00:bf:0c:ca:2d:14:b2:1e:84:42:5b:cd:38:1f:4a:
|
||||
f2:4d:75:10:f1:b6:35:9f:df:ca:7d:03:98:d3:ac:
|
||||
de:03:66:ee:2a:f1:d8:b0:7d:6e:07:54:0b:10:98:
|
||||
21:4d:80:cb:12:20:e7:cc:4f:de:45:7d:c9:72:77:
|
||||
32:ea:ca:90:bb:69:52:10:03:2f:a8:f3:95:c5:f1:
|
||||
8b:62:56:1b:ef:67:6f:a4:10:41:95:ad:0a:9b:e3:
|
||||
a5:c0:b0:d2:70:76:50:30:5b:a8:e8:08:2c:7c:ed:
|
||||
a7:a2:7a:8d:38:29:1c:ac:c7:ed:f2:7c:95:b0:95:
|
||||
82:7d:49:5c:38:cd:77:25:ef:bd:80:75:53:94:3c:
|
||||
3d:ca:63:5b:9f:15:b5:d3:1d:13:2f:19:d1:3c:db:
|
||||
76:3a:cc:b8:7d:c9:e5:c2:d7:da:40:6f:d8:21:dc:
|
||||
73:1b:42:2d:53:9c:fe:1a:fc:7d:ab:7a:36:3f:98:
|
||||
de:84:7c:05:67:ce:6a:14:38:87:a9:f1:8c:b5:68:
|
||||
cb:68:7f:71:20:2b:f5:a0:63:f5:56:2f:a3:26:d2:
|
||||
b7:6f:b1:5a:17:d7:38:99:08:fe:93:58:6f:fe:c3:
|
||||
13:49:08:16:0b:a7:4d:67:00:52:31:67:23:4e:98:
|
||||
ed:51:45:1d:b9:04:d9:0b:ec:d8:28:b3:4b:bd:ed:
|
||||
36:79
|
||||
Exponent: 65537 (0x10001)
|
||||
X509v3 extensions:
|
||||
X509v3 Subject Key Identifier:
|
||||
27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5
|
||||
X509v3 Authority Key Identifier:
|
||||
keyid:27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5
|
||||
DirName:/C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
serial:9A:41:47:CD:A1:14:62:8C
|
||||
|
||||
X509v3 Basic Constraints:
|
||||
CA:TRUE
|
||||
Signature Algorithm: sha1WithRSAEncryption
|
||||
79:78:0c:6d:79:88:91:fc:3a:15:9c:f9:27:62:16:f0:21:1f:
|
||||
fa:7d:3f:a2:a8:32:1e:f7:f2:11:a9:74:16:74:5e:dc:18:ca:
|
||||
f0:00:2a:d5:03:06:26:30:f1:47:83:fd:32:6e:fc:ed:aa:4f:
|
||||
7d:0c:63:60:31:2f:7c:0c:bf:99:66:87:ed:27:08:86:2d:c4:
|
||||
33:e8:98:23:1c:fe:a3:db:9a:49:4e:fc:5a:42:ef:71:c3:3f:
|
||||
ad:dc:4a:a8:d2:a3:1d:09:ac:33:04:7b:86:f3:6d:00:59:a3:
|
||||
c8:db:d1:3c:73:f6:0e:90:d6:5e:49:e0:bf:36:63:08:7b:a5:
|
||||
b0:8f:35:3b:56:8c:11:35:49:04:1c:d0:e7:ba:56:c5:0d:0a:
|
||||
91:8d:d6:b7:62:19:34:12:52:4c:d2:6d:7c:c5:3d:0f:18:81:
|
||||
54:cb:f6:3c:e5:84:d2:d6:71:15:ec:1a:34:0b:f0:a0:21:74:
|
||||
43:c8:a3:b0:df:d9:67:da:e2:ad:93:48:f8:a0:87:bd:79:14:
|
||||
e0:62:0a:df:f7:31:2e:31:7b:d1:32:2a:0a:fe:5d:14:ef:d9:
|
||||
64:50:e4:83:91:bc:70:0d:d7:88:8d:d9:bc:84:0e:c5:1a:b3:
|
||||
bf:64:02:4e:51:91:a4:a2:85:15:83:af:f0:5b:9b:28:49:5f:
|
||||
b2:b3:03:d8
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIEqjCCA5KgAwIBAgIJAJpBR82hFGKMMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD
|
||||
VQQGEwJVUzEQMA4GA1UECAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjERMA8G
|
||||
A1UECgwIU2F3dG9vdGgxEzARBgNVBAsMCkNvbnN1bHRpbmcxGDAWBgNVBAMMD3d3
|
||||
dy53b2xmc3NsLmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTAe
|
||||
Fw0xNDA3MTEwMzIwMDhaFw0xNzA0MDYwMzIwMDhaMIGUMQswCQYDVQQGEwJVUzEQ
|
||||
MA4GA1UECAwHTW9udGFuYTEQMA4GA1UEBwwHQm96ZW1hbjERMA8GA1UECgwIU2F3
|
||||
dG9vdGgxEzARBgNVBAsMCkNvbnN1bHRpbmcxGDAWBgNVBAMMD3d3dy53b2xmc3Ns
|
||||
LmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTCCASIwDQYJKoZI
|
||||
hvcNAQEBBQADggEPADCCAQoCggEBAL8Myi0Ush6EQlvNOB9K8k11EPG2NZ/fyn0D
|
||||
mNOs3gNm7irx2LB9bgdUCxCYIU2AyxIg58xP3kV9yXJ3MurKkLtpUhADL6jzlcXx
|
||||
i2JWG+9nb6QQQZWtCpvjpcCw0nB2UDBbqOgILHztp6J6jTgpHKzH7fJ8lbCVgn1J
|
||||
XDjNdyXvvYB1U5Q8PcpjW58VtdMdEy8Z0TzbdjrMuH3J5cLX2kBv2CHccxtCLVOc
|
||||
/hr8fat6Nj+Y3oR8BWfOahQ4h6nxjLVoy2h/cSAr9aBj9VYvoybSt2+xWhfXOJkI
|
||||
/pNYb/7DE0kIFgunTWcAUjFnI06Y7VFFHbkE2Qvs2CizS73tNnkCAwEAAaOB/DCB
|
||||
+TAdBgNVHQ4EFgQUJ45nEXTDJh0/7TNjs6TYHTDl6NUwgckGA1UdIwSBwTCBvoAU
|
||||
J45nEXTDJh0/7TNjs6TYHTDl6NWhgZqkgZcwgZQxCzAJBgNVBAYTAlVTMRAwDgYD
|
||||
VQQIDAdNb250YW5hMRAwDgYDVQQHDAdCb3plbWFuMREwDwYDVQQKDAhTYXd0b290
|
||||
aDETMBEGA1UECwwKQ29uc3VsdGluZzEYMBYGA1UEAwwPd3d3LndvbGZzc2wuY29t
|
||||
MR8wHQYJKoZIhvcNAQkBFhBpbmZvQHdvbGZzc2wuY29tggkAmkFHzaEUYowwDAYD
|
||||
VR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAeXgMbXmIkfw6FZz5J2IW8CEf
|
||||
+n0/oqgyHvfyEal0FnRe3BjK8AAq1QMGJjDxR4P9Mm787apPfQxjYDEvfAy/mWaH
|
||||
7ScIhi3EM+iYIxz+o9uaSU78WkLvccM/rdxKqNKjHQmsMwR7hvNtAFmjyNvRPHP2
|
||||
DpDWXkngvzZjCHulsI81O1aMETVJBBzQ57pWxQ0KkY3Wt2IZNBJSTNJtfMU9DxiB
|
||||
VMv2POWE0tZxFewaNAvwoCF0Q8ijsN/ZZ9rirZNI+KCHvXkU4GIK3/cxLjF70TIq
|
||||
Cv5dFO/ZZFDkg5G8cA3XiI3ZvIQOxRqzv2QCTlGRpKKFFYOv8FubKElfsrMD2A==
|
||||
-----END CERTIFICATE-----
|
||||
69
FreeRTOS-Plus/Source/WolfSSL/certs/server-ecc-rsa.pem
Normal file
69
FreeRTOS-Plus/Source/WolfSSL/certs/server-ecc-rsa.pem
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
Certificate:
|
||||
Data:
|
||||
Version: 3 (0x2)
|
||||
Serial Number: 1 (0x1)
|
||||
Signature Algorithm: sha1WithRSAEncryption
|
||||
Issuer: C=US, ST=Montana, L=Bozeman, O=Sawtooth, OU=Consulting, CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
Validity
|
||||
Not Before: Jul 11 17:25:56 2014 GMT
|
||||
Not After : Apr 6 17:25:56 2017 GMT
|
||||
Subject: C=US, ST=Montana, L=Bozeman, O=wolfSSL, OU=Support, CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: id-ecPublicKey
|
||||
Public-Key: (256 bit)
|
||||
pub:
|
||||
04:bb:33:ac:4c:27:50:4a:c6:4a:a5:04:c3:3c:de:
|
||||
9f:36:db:72:2d:ce:94:ea:2b:fa:cb:20:09:39:2c:
|
||||
16:e8:61:02:e9:af:4d:d3:02:93:9a:31:5b:97:92:
|
||||
21:7f:f0:cf:18:da:91:11:02:34:86:e8:20:58:33:
|
||||
0b:80:34:89:d8
|
||||
ASN1 OID: prime256v1
|
||||
X509v3 extensions:
|
||||
X509v3 Subject Key Identifier:
|
||||
5D:5D:26:EF:AC:7E:36:F9:9B:76:15:2B:4A:25:02:23:EF:B2:89:30
|
||||
X509v3 Authority Key Identifier:
|
||||
keyid:27:8E:67:11:74:C3:26:1D:3F:ED:33:63:B3:A4:D8:1D:30:E5:E8:D5
|
||||
DirName:/C=US/ST=Montana/L=Bozeman/O=Sawtooth/OU=Consulting/CN=www.wolfssl.com/emailAddress=info@wolfssl.com
|
||||
serial:9A:41:47:CD:A1:14:62:8C
|
||||
|
||||
X509v3 Basic Constraints:
|
||||
CA:TRUE
|
||||
Signature Algorithm: sha1WithRSAEncryption
|
||||
61:a8:c1:b3:39:c8:f6:77:e7:cc:58:ed:15:25:44:81:47:ac:
|
||||
09:58:37:ab:5f:1d:2d:a7:78:70:96:c4:7f:98:cf:56:80:a3:
|
||||
0f:ce:e1:80:fa:80:f6:96:04:97:50:4e:08:04:30:97:64:e7:
|
||||
0d:c2:16:a3:ab:a8:d4:11:f2:70:10:65:6c:b6:65:4d:bc:9a:
|
||||
40:20:a3:6c:e7:93:6d:fa:ab:a5:e0:82:9a:30:e6:0c:82:6c:
|
||||
1c:7f:76:cc:78:a1:9c:3d:56:67:37:58:6c:e2:ab:8a:ae:c9:
|
||||
b2:83:d5:a5:79:74:e5:c9:bb:f3:39:5a:45:ca:ad:54:65:06:
|
||||
1b:bf:c5:d4:16:33:f2:10:6b:2a:07:fe:a7:ef:47:c6:df:02:
|
||||
4d:28:35:a5:ed:1b:86:d8:82:3b:4a:cb:76:fe:98:62:d4:bd:
|
||||
98:28:aa:86:b5:02:3b:24:4e:ad:bb:63:f7:e3:dc:e5:12:41:
|
||||
ca:ee:93:b3:33:1e:a1:26:82:ce:ff:66:8d:c5:51:5f:b0:1f:
|
||||
0f:03:df:e2:c5:66:82:9a:42:ab:36:ef:3e:cf:44:d9:39:e3:
|
||||
59:63:f2:9c:24:13:6f:9a:cb:3c:78:be:4b:c6:be:c8:e7:11:
|
||||
31:8b:de:5f:c5:de:50:d0:87:c5:5b:6e:1e:d6:cf:68:39:b1:
|
||||
e1:f2:a3:d6
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIID0zCCArugAwIBAgIBATANBgkqhkiG9w0BAQUFADCBlDELMAkGA1UEBhMCVVMx
|
||||
EDAOBgNVBAgMB01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xETAPBgNVBAoMCFNh
|
||||
d3Rvb3RoMRMwEQYDVQQLDApDb25zdWx0aW5nMRgwFgYDVQQDDA93d3cud29sZnNz
|
||||
bC5jb20xHzAdBgkqhkiG9w0BCQEWEGluZm9Ad29sZnNzbC5jb20wHhcNMTQwNzEx
|
||||
MTcyNTU2WhcNMTcwNDA2MTcyNTU2WjCBkDELMAkGA1UEBhMCVVMxEDAOBgNVBAgM
|
||||
B01vbnRhbmExEDAOBgNVBAcMB0JvemVtYW4xEDAOBgNVBAoMB3dvbGZTU0wxEDAO
|
||||
BgNVBAsMB1N1cHBvcnQxGDAWBgNVBAMMD3d3dy53b2xmc3NsLmNvbTEfMB0GCSqG
|
||||
SIb3DQEJARYQaW5mb0B3b2xmc3NsLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEH
|
||||
A0IABLszrEwnUErGSqUEwzzenzbbci3OlOor+ssgCTksFuhhAumvTdMCk5oxW5eS
|
||||
IX/wzxjakRECNIboIFgzC4A0idijgfwwgfkwHQYDVR0OBBYEFF1dJu+sfjb5m3YV
|
||||
K0olAiPvsokwMIHJBgNVHSMEgcEwgb6AFCeOZxF0wyYdP+0zY7Ok2B0w5ejVoYGa
|
||||
pIGXMIGUMQswCQYDVQQGEwJVUzEQMA4GA1UECAwHTW9udGFuYTEQMA4GA1UEBwwH
|
||||
Qm96ZW1hbjERMA8GA1UECgwIU2F3dG9vdGgxEzARBgNVBAsMCkNvbnN1bHRpbmcx
|
||||
GDAWBgNVBAMMD3d3dy53b2xmc3NsLmNvbTEfMB0GCSqGSIb3DQEJARYQaW5mb0B3
|
||||
b2xmc3NsLmNvbYIJAJpBR82hFGKMMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEF
|
||||
BQADggEBAGGowbM5yPZ358xY7RUlRIFHrAlYN6tfHS2neHCWxH+Yz1aAow/O4YD6
|
||||
gPaWBJdQTggEMJdk5w3CFqOrqNQR8nAQZWy2ZU28mkAgo2znk236q6Xggpow5gyC
|
||||
bBx/dsx4oZw9Vmc3WGziq4quybKD1aV5dOXJu/M5WkXKrVRlBhu/xdQWM/IQayoH
|
||||
/qfvR8bfAk0oNaXtG4bYgjtKy3b+mGLUvZgoqoa1AjskTq27Y/fj3OUSQcruk7Mz
|
||||
HqEmgs7/Zo3FUV+wHw8D3+LFZoKaQqs27z7PRNk541lj8pwkE2+ayzx4vkvGvsjn
|
||||
ETGL3l/F3lDQh8Vbbh7Wz2g5seHyo9Y=
|
||||
-----END CERTIFICATE-----
|
||||
55
FreeRTOS-Plus/Source/WolfSSL/certs/server-ecc.pem
Normal file
55
FreeRTOS-Plus/Source/WolfSSL/certs/server-ecc.pem
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
Certificate:
|
||||
Data:
|
||||
Version: 3 (0x2)
|
||||
Serial Number:
|
||||
f9:ec:48:2d:d0:a4:49:6c
|
||||
Signature Algorithm: ecdsa-with-SHA1
|
||||
Issuer: C=US, ST=Washington, L=Seattle, O=Eliptic, OU=ECC, CN=www.yassl.com/emailAddress=info@yassl.com
|
||||
Validity
|
||||
Not Before: Oct 22 04:02:45 2013 GMT
|
||||
Not After : Jul 18 04:02:45 2016 GMT
|
||||
Subject: C=US, ST=Washington, L=Seattle, O=Eliptic, OU=ECC, CN=www.yassl.com/emailAddress=info@yassl.com
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: id-ecPublicKey
|
||||
EC Public Key:
|
||||
pub:
|
||||
04:bb:33:ac:4c:27:50:4a:c6:4a:a5:04:c3:3c:de:
|
||||
9f:36:db:72:2d:ce:94:ea:2b:fa:cb:20:09:39:2c:
|
||||
16:e8:61:02:e9:af:4d:d3:02:93:9a:31:5b:97:92:
|
||||
21:7f:f0:cf:18:da:91:11:02:34:86:e8:20:58:33:
|
||||
0b:80:34:89:d8
|
||||
ASN1 OID: prime256v1
|
||||
X509v3 extensions:
|
||||
X509v3 Subject Key Identifier:
|
||||
5D:5D:26:EF:AC:7E:36:F9:9B:76:15:2B:4A:25:02:23:EF:B2:89:30
|
||||
X509v3 Authority Key Identifier:
|
||||
keyid:5D:5D:26:EF:AC:7E:36:F9:9B:76:15:2B:4A:25:02:23:EF:B2:89:30
|
||||
DirName:/C=US/ST=Washington/L=Seattle/O=Eliptic/OU=ECC/CN=www.yassl.com/emailAddress=info@yassl.com
|
||||
serial:F9:EC:48:2D:D0:A4:49:6C
|
||||
|
||||
X509v3 Basic Constraints:
|
||||
CA:TRUE
|
||||
Signature Algorithm: ecdsa-with-SHA1
|
||||
30:44:02:20:36:14:3b:c8:19:43:87:b9:3d:aa:32:6f:18:9a:
|
||||
4e:07:0c:47:6c:e1:dc:87:fd:ad:f4:2c:71:ec:04:ba:c9:58:
|
||||
02:20:65:4e:67:ee:68:26:ed:1c:03:11:0e:31:91:69:f6:16:
|
||||
27:06:f7:33:68:18:0b:5d:63:5f:8b:e8:bc:d6:00:57
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDADCCAqigAwIBAgIJAPnsSC3QpElsMAkGByqGSM49BAEwgYsxCzAJBgNVBAYT
|
||||
AlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdTZWF0dGxlMRAwDgYD
|
||||
VQQKEwdFbGlwdGljMQwwCgYDVQQLEwNFQ0MxFjAUBgNVBAMTDXd3dy55YXNzbC5j
|
||||
b20xHTAbBgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tMB4XDTEzMTAyMjA0MDI0
|
||||
NVoXDTE2MDcxODA0MDI0NVowgYsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNo
|
||||
aW5ndG9uMRAwDgYDVQQHEwdTZWF0dGxlMRAwDgYDVQQKEwdFbGlwdGljMQwwCgYD
|
||||
VQQLEwNFQ0MxFjAUBgNVBAMTDXd3dy55YXNzbC5jb20xHTAbBgkqhkiG9w0BCQEW
|
||||
DmluZm9AeWFzc2wuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEuzOsTCdQ
|
||||
SsZKpQTDPN6fNttyLc6U6iv6yyAJOSwW6GEC6a9N0wKTmjFbl5Ihf/DPGNqREQI0
|
||||
huggWDMLgDSJ2KOB8zCB8DAdBgNVHQ4EFgQUXV0m76x+NvmbdhUrSiUCI++yiTAw
|
||||
gcAGA1UdIwSBuDCBtYAUXV0m76x+NvmbdhUrSiUCI++yiTChgZGkgY4wgYsxCzAJ
|
||||
BgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdTZWF0dGxl
|
||||
MRAwDgYDVQQKEwdFbGlwdGljMQwwCgYDVQQLEwNFQ0MxFjAUBgNVBAMTDXd3dy55
|
||||
YXNzbC5jb20xHTAbBgkqhkiG9w0BCQEWDmluZm9AeWFzc2wuY29tggkA+exILdCk
|
||||
SWwwDAYDVR0TBAUwAwEB/zAJBgcqhkjOPQQBA0cAMEQCIDYUO8gZQ4e5Paoybxia
|
||||
TgcMR2zh3If9rfQscewEuslYAiBlTmfuaCbtHAMRDjGRafYWJwb3M2gYC11jX4vo
|
||||
vNYAVw==
|
||||
-----END CERTIFICATE-----
|
||||
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/server-key.der
Normal file
BIN
FreeRTOS-Plus/Source/WolfSSL/certs/server-key.der
Normal file
Binary file not shown.
27
FreeRTOS-Plus/Source/WolfSSL/certs/server-key.pem
Normal file
27
FreeRTOS-Plus/Source/WolfSSL/certs/server-key.pem
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIIEpQIBAAKCAQEAwJUI4VdB8nFtt9JFQScBZcZFrvK8JDC4lc4vTtb2HIi8fJ/7
|
||||
qGd//lycUXX3isoH5zUvj+G9e8AvfKtkqBf8yl17uuAh5XIuby6G2JVz2qwbU7lf
|
||||
P9cZDSVP4WNjUYsLZD+tQ7ilHFw0s64AoGPF9n8LWWh4c6aMGKkCba/DGQEuuBDj
|
||||
xsxAtGmjRjNph27Euxem8+jdrXO8ey8htf1mUQy9VLPhbV8cvCNz0QkDiRTSELlk
|
||||
wyrQoZZKvOHUGlvHoMDBY3gPRDcwMpaAMiOVoXe6E9KXc+JdJclqDcM5YKS0sGlC
|
||||
Qgnp2Ai8MyCzWCKnquvE4eZhg8XSlt/Z0E+t1wIDAQABAoIBAQCa0DQPUmIFUAHv
|
||||
n+1kbsLE2hryhNeSEEiSxOlq64t1bMZ5OPLJckqGZFSVd8vDmp231B2kAMieTuTd
|
||||
x7pnFsF0vKnWlI8rMBr77d8hBSPZSjm9mGtlmrjcxH3upkMVLj2+HSJgKnMw1T7Y
|
||||
oqyGQy7E9WReP4l1DxHYUSVOn9iqo85gs+KK2X4b8GTKmlsFC1uqy+XjP24yIgXz
|
||||
0PrvdFKB4l90073/MYNFdfpjepcu1rYZxpIm5CgGUFAOeC6peA0Ul7QS2DFAq6EB
|
||||
QcIw+AdfFuRhd9Jg8p+N6PS662PeKpeB70xs5lU0USsoNPRTHMRYCj+7r7X3SoVD
|
||||
LTzxWFiBAoGBAPIsVHY5I2PJEDK3k62vvhl1loFk5rW4iUJB0W3QHBv4G6xpyzY8
|
||||
ZH3c9Bm4w2CxV0hfUk9ZOlV/MsAZQ1A/rs5vF/MOn0DKTq0VO8l56cBZOHNwnAp8
|
||||
yTpIMqfYSXUKhcLC/RVz2pkJKmmanwpxv7AEpox6Wm9IWlQ7xrFTF9/nAoGBAMuT
|
||||
3ncVXbdcXHzYkKmYLdZpDmOzo9ymzItqpKISjI57SCyySzfcBhh96v52odSh6T8N
|
||||
zRtfr1+elltbD6F8r7ObkNtXczrtsCNErkFPHwdCEyNMy/r0FKTV9542fFufqDzB
|
||||
hV900jkt/9CE3/uzIHoumxeu5roLrl9TpFLtG8SRAoGBAOyY2rvV/vlSSn0CVUlv
|
||||
VW5SL4SjK7OGYrNU0mNS2uOIdqDvixWl0xgUcndex6MEH54ZYrUbG57D8rUy+UzB
|
||||
qusMJn3UX0pRXKRFBnBEp1bA1CIUdp7YY1CJkNPiv4GVkjFBhzkaQwsYpVMfORpf
|
||||
H0O8h2rfbtMiAP4imHBOGhkpAoGBAIpBVihRnl/Ungs7mKNU8mxW1KrpaTOFJAza
|
||||
1AwtxL9PAmk4fNTm3Ezt1xYRwz4A58MmwFEC3rt1nG9WnHrzju/PisUr0toGakTJ
|
||||
c/5umYf4W77xfOZltU9s8MnF/xbKixsX4lg9ojerAby/QM5TjI7t7+5ZneBj5nxe
|
||||
9Y5L8TvBAoGATUX5QIzFW/QqGoq08hysa+kMVja3TnKW1eWK0uL/8fEYEz2GCbjY
|
||||
dqfJHHFSlDBD4PF4dP1hG0wJzOZoKnGtHN9DvFbbpaS+NXCkXs9P/ABVmTo9I89n
|
||||
WvUi+LUp0EQR6zUuRr79jhiyX6i/GTKh9dwD5nyaHwx8qbAOITc78bA=
|
||||
-----END RSA PRIVATE KEY-----
|
||||
30
FreeRTOS-Plus/Source/WolfSSL/certs/server-keyEnc.pem
Normal file
30
FreeRTOS-Plus/Source/WolfSSL/certs/server-keyEnc.pem
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
-----BEGIN RSA PRIVATE KEY-----
|
||||
Proc-Type: 4,ENCRYPTED
|
||||
DEK-Info: DES-CBC,136C7D8A69656668
|
||||
|
||||
jvNTyPaztxPIoAzbdmZnD0Zw2+60tMxNc0GMHNmeOyG25aHP/dT+TWiKFpFVkkkY
|
||||
uoCIhYUyw7gmpw+CnRJwWd+ans4nrvAjwy5oWJvarvsyUpjqvnPoIlAqd+d4TDKN
|
||||
eESzcI76+gHdisAtCrQD+fGqgTZhli5TgDbnpasL/QnY2qDlutvakkVw7gPXe156
|
||||
2Phy8WN+efr65J6wt3K/dj7Datl9u4JeHQK81gYyWBVX+EagEjPGDzkFQCj9Z0q7
|
||||
8K3iB5GW1JAqJS0IfZPB40AnSTF/n1TL1SN3qfU3l7hTGNrx9o7580bgDEoAR7pI
|
||||
F8eZlS15KHtZmh11AnU1KTKZ6kmgnNqeMTGMN6N0ct2wMKW1dV87eTDlF0oiR2ol
|
||||
XwtFgKmrIjfpmzkdWjbJmWnGMjD56KdiFZga/ZyKMsPrVoYLgfJEpn36iQspfygx
|
||||
HCGNTf0PjIsjEWU0WyQiF86t+c45W3wNFsv/AxVyfMl+su02yrd6u2ecuQDir3Cs
|
||||
b2k8IKtQgVe/NIpEWLKuiHG5oedIPPQyDYK5uq+gHxCGeOoKnWlsWFEHZRiza4X5
|
||||
tbgTrJB8Sw0ENWrvVGGmQZN4pSImlsMwzQ2qik5CQ00N1b3+56/obn0z75I3bUSb
|
||||
tC5g8DRjl6oclAenNgh/MYMT287y5W2dD4npxHcekX4O3J2CDXNfg4vV2j5GRxtg
|
||||
LVJdYE2p7bpYePCDHrYng8b9ubBprx0CrEnkIvvtUjzNPf6VDL0+MBKl+XgR2/nz
|
||||
iRqTuZnlGGOyM+KYDwXpgwfs/HfvFGksxTAlO/40GkGh+WGPaIoNyCK0SgQKhyb4
|
||||
JIkR0vd2/yLg3lWMJrGwh7A0Gm07Z/781oURP3uWd+PaCOgGcd5ipcAjcEyuxNly
|
||||
AthipWqmQWUcbf6Z2N9j3OA22Hv2Uzk8HSfi9VOZtL9svdEEZ0NnOekJgnc6stQp
|
||||
bXiknlK/T5WdrWxSyCfgUq68Vf6DFfIRAVuFdJ3WHT2wVXHrDfft6D+Ne/XCxPoE
|
||||
8zGmkyusaph33UHQ1oNyUbLbwcDCDSmOo8gYoedD3IwxtMA3wJRugomqosItwV8X
|
||||
vkgmcy8eSE/+gZUxJEN2gnLcfKFhCkC80J6oFhmoDD6vuUnPHcFdKZgVPw2rzPk5
|
||||
Vb1kX+gpORplYmKpq1vz/ujscL4T0TmYLz02hkIS4edpW55ncTTv7JWefpRiTB1J
|
||||
RB3td3me4htqR+YIDWJ+emrOmqsCG2WvpAS+MTw2mj1jYk9LL/ZYobTjSCEWmuwT
|
||||
yVK6m303irR7HQDauxhslRFgoK21w63viOyj5NKIU1gQtaAANGDxcgORC1XLjjgt
|
||||
oNutSQA+7P42vfHSHK4cnTBXl6V32H/GyVpdHQOZqSrqIjgLmUZodSmRPROxosZF
|
||||
a46B1O7m/rJFxkiKW4vod+/WqjoE0Hhfrb8rRrkRjzGeCqqSSnQ3vrunVkvF8hlA
|
||||
b6FOv4ZBJL4piC1GKH+rscqke9NEiDqXN8C3iYz86jbck/Ha21yUS8T3X7N52sg+
|
||||
B3AmOGnLK6BebYeto9vZxQjacChJZSixSxLV+l9/nVQ0+mW42azHdzk0ru59TGAj
|
||||
-----END RSA PRIVATE KEY-----
|
||||
28
FreeRTOS-Plus/Source/WolfSSL/certs/server-keyPkcs8.pem
Normal file
28
FreeRTOS-Plus/Source/WolfSSL/certs/server-keyPkcs8.pem
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
-----BEGIN PRIVATE KEY-----
|
||||
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDAlQjhV0HycW23
|
||||
0kVBJwFlxkWu8rwkMLiVzi9O1vYciLx8n/uoZ3/+XJxRdfeKygfnNS+P4b17wC98
|
||||
q2SoF/zKXXu64CHlci5vLobYlXParBtTuV8/1xkNJU/hY2NRiwtkP61DuKUcXDSz
|
||||
rgCgY8X2fwtZaHhzpowYqQJtr8MZAS64EOPGzEC0aaNGM2mHbsS7F6bz6N2tc7x7
|
||||
LyG1/WZRDL1Us+FtXxy8I3PRCQOJFNIQuWTDKtChlkq84dQaW8egwMFjeA9ENzAy
|
||||
loAyI5Whd7oT0pdz4l0lyWoNwzlgpLSwaUJCCenYCLwzILNYIqeq68Th5mGDxdKW
|
||||
39nQT63XAgMBAAECggEBAJrQNA9SYgVQAe+f7WRuwsTaGvKE15IQSJLE6Wrri3Vs
|
||||
xnk48slySoZkVJV3y8OanbfUHaQAyJ5O5N3HumcWwXS8qdaUjyswGvvt3yEFI9lK
|
||||
Ob2Ya2WauNzEfe6mQxUuPb4dImAqczDVPtiirIZDLsT1ZF4/iXUPEdhRJU6f2Kqj
|
||||
zmCz4orZfhvwZMqaWwULW6rL5eM/bjIiBfPQ+u90UoHiX3TTvf8xg0V1+mN6ly7W
|
||||
thnGkibkKAZQUA54Lql4DRSXtBLYMUCroQFBwjD4B18W5GF30mDyn43o9LrrY94q
|
||||
l4HvTGzmVTRRKyg09FMcxFgKP7uvtfdKhUMtPPFYWIECgYEA8ixUdjkjY8kQMreT
|
||||
ra++GXWWgWTmtbiJQkHRbdAcG/gbrGnLNjxkfdz0GbjDYLFXSF9ST1k6VX8ywBlD
|
||||
UD+uzm8X8w6fQMpOrRU7yXnpwFk4c3CcCnzJOkgyp9hJdQqFwsL9FXPamQkqaZqf
|
||||
CnG/sASmjHpab0haVDvGsVMX3+cCgYEAy5PedxVdt1xcfNiQqZgt1mkOY7Oj3KbM
|
||||
i2qkohKMjntILLJLN9wGGH3q/nah1KHpPw3NG1+vX56WW1sPoXyvs5uQ21dzOu2w
|
||||
I0SuQU8fB0ITI0zL+vQUpNX3njZ8W5+oPMGFX3TSOS3/0ITf+7Mgei6bF67muguu
|
||||
X1OkUu0bxJECgYEA7Jjau9X++VJKfQJVSW9VblIvhKMrs4Zis1TSY1La44h2oO+L
|
||||
FaXTGBRyd17HowQfnhlitRsbnsPytTL5TMGq6wwmfdRfSlFcpEUGcESnVsDUIhR2
|
||||
nthjUImQ0+K/gZWSMUGHORpDCxilUx85Gl8fQ7yHat9u0yIA/iKYcE4aGSkCgYEA
|
||||
ikFWKFGeX9SeCzuYo1TybFbUqulpM4UkDNrUDC3Ev08CaTh81ObcTO3XFhHDPgDn
|
||||
wybAUQLeu3Wcb1acevOO78+KxSvS2gZqRMlz/m6Zh/hbvvF85mW1T2zwycX/FsqL
|
||||
GxfiWD2iN6sBvL9AzlOMju3v7lmd4GPmfF71jkvxO8ECgYBNRflAjMVb9CoairTy
|
||||
HKxr6QxWNrdOcpbV5YrS4v/x8RgTPYYJuNh2p8kccVKUMEPg8Xh0/WEbTAnM5mgq
|
||||
ca0c30O8VtulpL41cKRez0/8AFWZOj0jz2da9SL4tSnQRBHrNS5Gvv2OGLJfqL8Z
|
||||
MqH13APmfJofDHypsA4hNzvxsA==
|
||||
-----END PRIVATE KEY-----
|
||||
29
FreeRTOS-Plus/Source/WolfSSL/certs/server-keyPkcs8Enc.pem
Normal file
29
FreeRTOS-Plus/Source/WolfSSL/certs/server-keyPkcs8Enc.pem
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
-----BEGIN ENCRYPTED PRIVATE KEY-----
|
||||
MIIE6TAbBgkqhkiG9w0BBQMwDgQIr3AyvPqfFRQCAggABIIEyPUs6wCboqtKmExH
|
||||
zfez3vfHn2cp6s3X563Bz73hYn/8vXtI/q0oDNOpgav60/N7rMy50fno3LmW0/6E
|
||||
+UN4MwofmBS3lp1ZVY3KmzDy6lz5vcFo4GCCj+X6dacsyBQ4lFOge5BihQ3R9cKt
|
||||
dSrd1EFKwGGu3qTDG7ajTZukmYjxuRqpyHqPO5OJO7yXxHOB7B7sSKIyJRCkkucd
|
||||
oBC86kQdWraweSYj+Klza6VjKzmNzDBx9Fyhrj9XGXJ3rJLhjgNpelwX+PIMU31i
|
||||
/yklI4jm0aMSoAvXgdBXZuOsnsI27GXxy//i7AOgLLWi+Bu4dJSSl5PMtespf83u
|
||||
5jSysJymXiNcN6vEautGyjCujdMs5c/FEMbgubAMXymCI9DsAN+5dNMDY8Zrfqdl
|
||||
hFKfctcu8BxFa+0tavJ28fOEBuEyJLsQ9OvvS7dn4AV502JRKWObfsw7fi+mMzMu
|
||||
oxhYo99MRqic6a9uDmYB3SPeU31eOHiEi0n51D7Gtcn++F+IaDFwSHMirThzakGn
|
||||
go3nj0yq62euzVcEuhIfTTAe3F2tqzpzznVFbs1XgrGVREJ6gp5vRgMUUGYIqQir
|
||||
p5oW0HVRI4iuoSjdN4/wNAxIP9zakwYx+vWx1VXhDVEJfgNmxDRvEbF+OOz+iJCf
|
||||
7A2e8L+kZ/5oC3HO8h7GdHNTUjRRdh8FUM8lGo+HbMYDznMy/bJlIP2bx9hIIha7
|
||||
U70i09glS2Z7Ei+VecJbvFzdro0vdYyGO2ef8bWwCc5JMucxDcRklWdUxK6amKJN
|
||||
VpXL3TW0VYCfr1rLmZXUfBGk/KXM20/BoM04WLjeR3oiV/2b7SYK7GnJ7kBmAHHx
|
||||
gnrwMDO3JvH89CwlHRizVSQl59ViqEMGLmbHThcMqkEOkFphB2xox7/IOVyp6cFn
|
||||
mY0ZCrbhdX+L6t5jiyq/4us5bzF7FOBYsJr6n1Rm9b8eeOL693y/6uM3CvTJcTOb
|
||||
5RqWiHgTgmefeOeUQ0/dVgvEOIWz2yqBQmHKiB4+0CGGIRwUOXBrTKSLilumsjQe
|
||||
qGhJ6yw25VIpdXsMD1WVviczgRTNYjdldIJoHQdvpCEAhQ1RR3rkuIPniTumJFmY
|
||||
CnjfNqjtkaZWIN1nOCmcu50tswksWEEFEfkcP1xyzhr3EVCYAoFncLTp5vHBtdmg
|
||||
6KBdar40/OFGAcbDGDX1g3XEEi6jHmy0Lyz7M3DwESgaMgwzscsQLr+wMITk1IUN
|
||||
yfiXHl1CQjGxhDj8KoAhdDjjPENkSlCSd1vEO+lg1/IFb1dtnL2DJp6BQt9/VLHo
|
||||
Fp3pdZ7r95H20+pEhCZp0HXLNo1o8xjJQ5RWUCs1Zc1cauDOAh8lAjps6MBxTa3a
|
||||
LOgTW9lgiAQ+S1g2jK4BmqbLvZUF+Z6xupc8uE3E3HhJolmDRYojMNFNmmvODa8M
|
||||
CneWmj3T1KvqEToAIq46mStlTfQufSMpaJ73Wds4gmIiGwn5hIuUN6f3kybbt4f2
|
||||
4DLZXMcjYweLi9tJtFC+JaO0rS5gtX/k/ys1QSblSU5qfRu1XfwNAcZO1ReKgGYN
|
||||
ymI78cSACGIcEvAwin8CdRu3W99NbMqHW9AcCETFlTsC3wNlQxyYSem75sjPaWVF
|
||||
sxLy7YxEJ8tDEJZbSQ==
|
||||
-----END ENCRYPTED PRIVATE KEY-----
|
||||
29
FreeRTOS-Plus/Source/WolfSSL/certs/server-keyPkcs8Enc12.pem
Normal file
29
FreeRTOS-Plus/Source/WolfSSL/certs/server-keyPkcs8Enc12.pem
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
-----BEGIN ENCRYPTED PRIVATE KEY-----
|
||||
MIIE5TAcBgoqhkiG9w0BDAEBMA4ECFytdly5R2o9AgIIAASCBMOa6fgAUIR5GokK
|
||||
Z81YZMxC3sNqAwjLEkOwmez2za2fq+2mw6T8tB5W75lFpWyXD1MDPa1PpLzyw27c
|
||||
d2C8nipCzp37yYLmXr+aS519CBJR80ily/WLcdv+ScsA6pjOEW2p+VDY55jFp2pr
|
||||
n94/K2nFQpMxAdjxnqQCF5ewMLqzy3o3s6U3V9zIxy/xlLYi//UWFI8fqtOikqs4
|
||||
apWLNqJONRZq95OITKO/Nhz7GyEfjrewJmv4zVToEnSagSwbR4IVFn5Lok8rSpI9
|
||||
qwey9wsB1CguVwR0O2NjDVKUGXinfhdr+zMQlCoz+xY/Q1TkH4gEY5wpln4cBvtm
|
||||
PL/BnD4wEWHh8vS61wfOQ7wPgY+cdCe75stTrKzc6amVJB+40Qi3Vt4TEPGwcP16
|
||||
/qGl0zpYuAgilPtuEBw3GX3LiigpHmSt43D3DiYNGzv+Aran2Ei9iGSGeI2zHz8r
|
||||
WFZEnptAwlqeyL7+MZjAOXlu6QG1yix8HvZLmtBHrE2MhuR4KbS3fAUCNQpn8OKu
|
||||
zxYzs1ti5F2V4c9yK63gSz3H1ObRNsM2OkpUbSVGqLUN6a8HsI6yYh4we6q0gxKD
|
||||
VGdzEz4S1BFEBfXWVSPnRNMR4YD8kiQEPutUZFLiWWZ7WliH5yNfHZUia8dovxFa
|
||||
MWmAbSjMKRGvV+LvAGQHYBVfJSQO6VvBfBDtu0H4rLr8urmcPY+hbw1XxGfKSQp1
|
||||
iIdvVwjefl8wM9LSRsvqY5l4mu+XDPanQlFbzKBOSyLQts97ys3AR+jkK8Bmv14l
|
||||
xmCF8bJzzz5a2wAqbPhWIbk4J4VfcJEXNMzd19w4SxGv9fUXNiZZElUdNE+wtRsQ
|
||||
YvACYn9sZ6JUwg9hNTLXuXZY47LuQrrdTDHupoVA9zLvUYMKgO+pjwS8uy1dLQao
|
||||
0aztHLZEXuVJvpiRoMtYZl37ZNoLHQJeZUNyNATshAoD1+uSc7aywl8yqdTzXRR2
|
||||
g0rkExXEVJ5OPyzbFdOQSC5HoOC7dInIBmkrSFEJMKDkMzwYI+uSoIbn+8i+Gjzy
|
||||
Vh3/lftts/BIvr4NAh1ZAq/215jZSdAGo+1VZeuBeybwh3RBdBl8PhDBviTvbxSk
|
||||
P+F1T+UcbAz9bgjQJgNvDb9XHNI8rfEhfDPX/Pr4VvxBZNndmRJVQDKi23YD/7yF
|
||||
WAwXy418M7DPqp7NYmUHFe7JRm9bHk41EeknLZaZGW5qHwQKA10RoJCgjoOIFTsd
|
||||
kD3Qq/0mEuOiuJn5UPE19xtUpvFWamDf3s3zSHM7VJ+gGNrS/WbQ+KmTimj0Wucd
|
||||
2vWiNCGbhWwmp3LLKQlB5xDwXJy099SZUUkgcxGmfcT7FOpd3QSLYnwtPz8uLW0N
|
||||
76zbiUTYCQ/ASLrwcKFGCKKBz62DlRreK23E/RjqkKKCVFzzg8AzQTa02ml+wQyG
|
||||
+5EOwEF2yIrhV0p4hY/GDAIe3cdchiy1EQf6xH/IxPF/QsKNp0CfHVPgdFwLzjM2
|
||||
oFD3analGblxp9CMiDbiKTOdFPL8XcguufqpWra2jtUbe07HQaeU2NcM2TeB2KsU
|
||||
PhgBwgdNxW69K55iHReaZtuLw0GhD+KBrm7gSteVniiYLzLKzxmMycGGtoNwpbGi
|
||||
MMJBE+BYZylG
|
||||
-----END ENCRYPTED PRIVATE KEY-----
|
||||
30
FreeRTOS-Plus/Source/WolfSSL/certs/server-keyPkcs8Enc2.pem
Normal file
30
FreeRTOS-Plus/Source/WolfSSL/certs/server-keyPkcs8Enc2.pem
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
-----BEGIN ENCRYPTED PRIVATE KEY-----
|
||||
MIIFDjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIxaI9IblN3acCAggA
|
||||
MBQGCCqGSIb3DQMHBAi7kwdRvCrqMgSCBMjkSOSVfmu42O0q2GzFrJVr3cam9ZKe
|
||||
InQsxqtgADdBxMgJJVnr360tUNPQyyvfCH//Duhz+aJIC0MQZkWR3ZSy5pfHX+vr
|
||||
C3wd741VOlI44uEdzRktlPc11saMDyKS04/K9aaYIDqspOiobt9WZLQildXl1n8j
|
||||
N+7Laj7A/vxJ5GUJ4hdPwQOIeuJXTDDzn+Ld12XXGH+Iw1M5Cx3tBw1TNizSnmXQ
|
||||
vf/MsfsWsZbHBppCXZbF27jJA+6Bg7dGT0OZM0pI+ZQvyHr+qjog0hollY9KjwTG
|
||||
h+hsM7umWFJdeRMrmkTrX/R9HY/c5I4ExNSp1AtMmFeeU8h2VTJtYcoykUU1q2pF
|
||||
KHfjPghwmYromQGR4nPA9sqa9s+VMq9OaqoJDoBwNobdFr7sEtMLT08vTa0+rMX7
|
||||
bmjAF44/dVBYpBxXjTQ0pXVeb24Q00Sn6NOI4fTsBnkR+WTtuwz/L0qaGnJlh10y
|
||||
sQ3+95cUtZc3SZS67yYUx5auswqT3V4JCmhJcHNi+/jHyrj9D8nVWibQ2TBmgUf+
|
||||
0NzvdKb7sraEx7PSgFWDMLoQrd2+cqsJArpY9TbLSLhBDrOVc8v/lXYuK6QI0gMd
|
||||
HIwAZARUZMoI3WS6icTLYyLdQPMsFzI6U0arkbrdhjNNd3kVqeFEJ+oF0rkuAcJJ
|
||||
K8eUcsby1AIBS/9tuW1gSYubmuXsZX8xbYbJnHUqGOTAVa7jo8eVUTiyUfPXa+0N
|
||||
s1tTpZXtOOlqncZ08mPHppshdKF2cpuh0JNjiR6fHvXytGWFGMsKtxdwKs/14UCg
|
||||
qoTW0EQU4ONfBxR2PtX8PlNV4bOt704HP8Vc0H9JV2uWpJaLRzY2bBiPgKcrO9Eh
|
||||
83zFrPu/0obBQTxnP3mMihxvCndflHQqeJ0V1YYw9n4+XbgBqULXDQs7OetRohnY
|
||||
gYyc//NdC2I8mbdabFYvUTWSH6oMA6lqkwTjTTwtn5E8BJkRi1sIq4jNFUekpm2T
|
||||
5AwP7xWn//PM+B12CPoIgYtYT6Yhbf8arXuGU28y1Ahhi/hKcpR9HRPQeyaR62vi
|
||||
skjjycfn38wcj0WrIVnOceGgPa3EBrkkTaPUHvMQ5G/xzMZ82o3CnmwdnH+lp3eg
|
||||
TLcLm8Yp9InkMJNVOrGLxFvmTljl3h9x2JVuE0wtuWt91QVmfCZo0k3Cx46ad7xB
|
||||
eK20veTy+PySy2U3W1twGfsXXXRwaQiXXRrgPciK0LcGXZneShZuebk04U31sq4F
|
||||
rYaMAzIDDmvwbjh+UpNcl1VdBDGGePxzzOD3HHYPbm240HVMPuS85P2kFjak3PdJ
|
||||
GqsRUS1SRp1e451aFGjzggPLXFjAfDMaxrgjSWapRzu78i+xvcvf69979oX0KO9Y
|
||||
KMSC14RnmnT1+UdKxX+p9r1AwfH/vJxM34AOSva1uLiSJckRGYGOzuaYsTT9ZAx/
|
||||
q3CNALF4qFUMWmJnvQDYmCUnw6lJl3CazbtV5RI2ILQX6ZHR6YAHT5hYY43k+AnZ
|
||||
mFW6BGKoX/f4iVqYtjQWiGWAJAf6C9+548O2t9MiVcgQf4Nvj6lFLM00pzFn7jW4
|
||||
DsDFUBmmrSF8wfR7SRpOc/ViVZBRleYPLsMu0tmD29fowqqBY0MEkxqSahFAGTgk
|
||||
sao=
|
||||
-----END ENCRYPTED PRIVATE KEY-----
|
||||
173
FreeRTOS-Plus/Source/WolfSSL/certs/taoCert.txt
Normal file
173
FreeRTOS-Plus/Source/WolfSSL/certs/taoCert.txt
Normal file
|
|
@ -0,0 +1,173 @@
|
|||
|
||||
***** Create a self signed cert ************
|
||||
|
||||
1) openssl genrsa 1024 > client-key.pem
|
||||
|
||||
2) openssl req -new -x509 -nodes -sha1 -days 1000 -key client-key.pem > client-cert.pem
|
||||
|
||||
3) note md5 would be -md5
|
||||
|
||||
-- adding metadata to beginning
|
||||
|
||||
3) openssl x509 -in client-cert.pem -text > tmp.pem
|
||||
|
||||
4) mv tmp.pem client-cert.pem
|
||||
|
||||
|
||||
***** Create a CA, signing authority **********
|
||||
|
||||
same as self signed, use ca prefix instead of client
|
||||
|
||||
|
||||
***** Create a cert signed by CA **************
|
||||
|
||||
1) openssl req -newkey rsa:1024 -sha1 -days 1000 -nodes -keyout server-key.pem > server-req.pem
|
||||
|
||||
* note if using exisitng key do: -new -key keyName
|
||||
|
||||
2) copy ca-key.pem ca-cert.srl (why ????)
|
||||
|
||||
3) openssl x509 -req -in server-req.pem -days 1000 -sha1 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 > server-cert.pem
|
||||
|
||||
|
||||
***** Adding Subject Key ID and Authentication Key ID extensions to a cert *****
|
||||
|
||||
Create a config file for OpenSSL with the example contents:
|
||||
|
||||
[skidakid]
|
||||
subjectKeyIdentifier=hash
|
||||
authorityKeyIdentifier=keyid
|
||||
|
||||
Add to the openssl command for creating a cert signed by a CA step 3 the
|
||||
following options:
|
||||
|
||||
-extfile <file.cnf> -extensions skidakid
|
||||
|
||||
anywhere before the redirect. This will add the cert's public key hash as the
|
||||
Subject Key Identifier, and the signer's SKID as the Authentication Key ID.
|
||||
|
||||
|
||||
***** To create a dsa cert ********************
|
||||
|
||||
1) openssl dsaparam 512 > dsa512.param # creates group params
|
||||
|
||||
2) openssl gendsa dsa512.param > dsa512.pem # creates private key
|
||||
|
||||
3) openssl req -new -x509 -nodes -days 1000 -key dsa512.pem > dsa-cert.pem
|
||||
|
||||
|
||||
|
||||
|
||||
***** To convert from PEM to DER **************
|
||||
|
||||
a) openssl x509 -in cert.pem -inform PEM -out cert.der -outform DER
|
||||
|
||||
to convert rsa private PEM to DER :
|
||||
|
||||
b) openssl rsa -in key.pem -outform DER -out key.der
|
||||
|
||||
|
||||
**** To encrypt rsa key already in pem **********
|
||||
|
||||
a) openssl rsa <server-key.pem.bak -des >server-keyEnc.pem
|
||||
|
||||
note location of des, pass = yassl123
|
||||
|
||||
|
||||
*** To make a public key from a private key ******
|
||||
|
||||
|
||||
openssl rsa -in 1024rsa.priv -pubout -out 1024rsa.pub
|
||||
|
||||
|
||||
**** To convert to pkcs8 *******
|
||||
|
||||
openssl pkcs8 -nocrypt -topk8 -in server-key.pem -out server-keyPkcs8.pem
|
||||
|
||||
|
||||
**** To convert to pkcs8 encrypted *******
|
||||
|
||||
openssl pkcs8 -topk8 -in server-key.pem -out server-keyPkcs8Enc.pem
|
||||
|
||||
passwd: yassl123
|
||||
|
||||
to use PKCS#5 v2 instead of v1.5 which is default add
|
||||
|
||||
-v2 des3 # file Pkcs8Enc2
|
||||
|
||||
to use PKCS#12 instead use -v1 witch a 12 algo like
|
||||
|
||||
-v1 PBE-SHA1-RC4-128 # file Pkcs8Enc12 , see man pkcs8 for more info
|
||||
|
||||
|
||||
**** To convert from pkcs8 to traditional ****
|
||||
|
||||
openssl pkcs8 -nocrypt -in server-keyPkcs8.pem -out server-key.pem
|
||||
|
||||
|
||||
*** DH paramters ***
|
||||
|
||||
openssl dhparam 2048 > dh2048.param
|
||||
|
||||
to add metadata
|
||||
|
||||
openssl dhparam -in dh2048.param -text > dh2048.pem
|
||||
|
||||
**** ECC ******
|
||||
|
||||
1) make a key
|
||||
|
||||
to see types available do
|
||||
openssl ecparam -list_curves
|
||||
|
||||
make a new key
|
||||
openssl ecparam -genkey -text -name secp256r1 -out ecc-key.pem
|
||||
|
||||
|
||||
*** CRL ***
|
||||
|
||||
1) create a crl
|
||||
|
||||
a) openssl ca -gencrl -crldays 120 -out crl.pem -keyfile ./ca-key.pem -cert ./ca-cert.pem
|
||||
|
||||
Error No ./CA root/index.txt so:
|
||||
|
||||
b) touch ./CA root/index.txt
|
||||
|
||||
a) again
|
||||
|
||||
Error No ./CA root/crlnumber so:
|
||||
|
||||
c) touch ./CA root/crlnumber
|
||||
|
||||
a) again
|
||||
|
||||
Error unable to load CRL number
|
||||
|
||||
d) add '01' to crlnumber file
|
||||
|
||||
a) again
|
||||
|
||||
2) view crl file
|
||||
|
||||
openssl crl -in crl.pem -text
|
||||
|
||||
3) revoke
|
||||
|
||||
openssl ca -revoke server-cert.pem -keyfile ./ca-key.pem -cert ./ca-cert.pem
|
||||
|
||||
Then regenerate crl with a)
|
||||
|
||||
4) verify
|
||||
|
||||
openssl verify -CAfile ./ca-cert.pem ./server-cert.pem
|
||||
|
||||
OK
|
||||
|
||||
Make file with both ca and crl
|
||||
|
||||
cat ca-cert.pem crl.pem > ca-crl.pem
|
||||
|
||||
openssl verify -CAfile ./ca-crl.pem -crl_check ./ca-cert.pem
|
||||
|
||||
revoked
|
||||
178
FreeRTOS-Plus/Source/WolfSSL/config.in
Normal file
178
FreeRTOS-Plus/Source/WolfSSL/config.in
Normal file
|
|
@ -0,0 +1,178 @@
|
|||
/* config.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define if building universal (internal helper macro) */
|
||||
#undef AC_APPLE_UNIVERSAL_BUILD
|
||||
|
||||
/* Define to 1 to enable debugging code. */
|
||||
#undef DEBUG
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#undef HAVE_ARPA_INET_H
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <errno.h> header file. */
|
||||
#undef HAVE_ERRNO_H
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
/* Define to 1 if you have the `getaddrinfo' function. */
|
||||
#undef HAVE_GETADDRINFO
|
||||
|
||||
/* Define to 1 if you have the `gethostbyname' function. */
|
||||
#undef HAVE_GETHOSTBYNAME
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#undef HAVE_GETTIMEOFDAY
|
||||
|
||||
/* Define to 1 if you have the `inet_ntoa' function. */
|
||||
#undef HAVE_INET_NTOA
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `network' library (-lnetwork). */
|
||||
#undef HAVE_LIBNETWORK
|
||||
|
||||
/* Define to 1 if you have the `pthread' library (-lpthread). */
|
||||
#undef HAVE_LIBPTHREAD
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#undef HAVE_LIMITS_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the `memset' function. */
|
||||
#undef HAVE_MEMSET
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#undef HAVE_NETDB_H
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#undef HAVE_NETINET_IN_H
|
||||
|
||||
/* Define to 1 if you have the <pcap/pcap.h> header file. */
|
||||
#undef HAVE_PCAP_PCAP_H
|
||||
|
||||
/* Define if you have POSIX threads libraries and header files. */
|
||||
#undef HAVE_PTHREAD
|
||||
|
||||
/* Have PTHREAD_PRIO_INHERIT. */
|
||||
#undef HAVE_PTHREAD_PRIO_INHERIT
|
||||
|
||||
/* Define to 1 if you have the `socket' function. */
|
||||
#undef HAVE_SOCKET
|
||||
|
||||
/* Define to 1 if you have the <stddef.h> header file. */
|
||||
#undef HAVE_STDDEF_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
#undef HAVE_SYS_IOCTL_H
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#undef HAVE_SYS_TIME_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 or 0, depending whether the compiler supports simple visibility
|
||||
declarations. */
|
||||
#undef HAVE_VISIBILITY
|
||||
|
||||
/* Define to 1 if the system has the type `__uint128_t'. */
|
||||
#undef HAVE___UINT128_T
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
|
||||
#undef NO_MINUS_C_MINUS_O
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to necessary symbol if this constant uses a non-standard name on
|
||||
your system. */
|
||||
#undef PTHREAD_CREATE_JOINABLE
|
||||
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG
|
||||
|
||||
/* The size of `long long', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG_LONG
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* If the compiler supports a TLS storage class define it to that here */
|
||||
#undef TLS
|
||||
|
||||
/* Define if the code was built from VCS. */
|
||||
#undef VCS_CHECKOUT
|
||||
|
||||
/* VCS system */
|
||||
#undef VCS_SYSTEM
|
||||
|
||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
#if defined AC_APPLE_UNIVERSAL_BUILD
|
||||
# if defined __BIG_ENDIAN__
|
||||
# define WORDS_BIGENDIAN 1
|
||||
# endif
|
||||
#else
|
||||
# ifndef WORDS_BIGENDIAN
|
||||
# undef WORDS_BIGENDIAN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
|
||||
#define below would cause a syntax error. */
|
||||
#undef _UINT8_T
|
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
||||
/* Define to the type of an unsigned integer type of width exactly 8 bits if
|
||||
such a type exists and the standard includes do not define it. */
|
||||
#undef uint8_t
|
||||
27463
FreeRTOS-Plus/Source/WolfSSL/configure
vendored
Normal file
27463
FreeRTOS-Plus/Source/WolfSSL/configure
vendored
Normal file
File diff suppressed because it is too large
Load diff
1841
FreeRTOS-Plus/Source/WolfSSL/configure.ac
Normal file
1841
FreeRTOS-Plus/Source/WolfSSL/configure.ac
Normal file
File diff suppressed because it is too large
Load diff
1307
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/benchmark/benchmark.c
Normal file
1307
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/benchmark/benchmark.c
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual C++ Express 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "benchmark", "benchmark.vcproj", "{615AEC46-5595-4DEA-9490-DBD5DE0F8772}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{615AEC46-5595-4DEA-9490-DBD5DE0F8772}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{615AEC46-5595-4DEA-9490-DBD5DE0F8772}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{615AEC46-5595-4DEA-9490-DBD5DE0F8772}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{615AEC46-5595-4DEA-9490-DBD5DE0F8772}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
@ -0,0 +1,195 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="benchmark"
|
||||
ProjectGUID="{615AEC46-5595-4DEA-9490-DBD5DE0F8772}"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\benchmark.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
10
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/benchmark/include.am
Normal file
10
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/benchmark/include.am
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# vim:ft=automake
|
||||
# All paths should be given relative to the root
|
||||
|
||||
noinst_PROGRAMS += ctaocrypt/benchmark/benchmark
|
||||
ctaocrypt_benchmark_benchmark_SOURCES = ctaocrypt/benchmark/benchmark.c
|
||||
ctaocrypt_benchmark_benchmark_LDADD = src/libcyassl.la
|
||||
ctaocrypt_benchmark_benchmark_DEPENDENCIES = src/libcyassl.la
|
||||
EXTRA_DIST += ctaocrypt/benchmark/benchmark.sln
|
||||
EXTRA_DIST += ctaocrypt/benchmark/benchmark.vcproj
|
||||
DISTCLEANFILES+= ctaocrypt/benchmark/.libs/benchmark
|
||||
3542
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/aes.c
Normal file
3542
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/aes.c
Normal file
File diff suppressed because it is too large
Load diff
972
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/aes_asm.asm
Normal file
972
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/aes_asm.asm
Normal file
|
|
@ -0,0 +1,972 @@
|
|||
; /*aes_asm . asm
|
||||
; *
|
||||
; *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
|
||||
; */
|
||||
;
|
||||
;
|
||||
; /*See IntelA dvanced Encryption Standard[AES]Instructions Set White Paper
|
||||
; *by Israel,Intel Mobility Group Development Center,Israel Shay Gueron
|
||||
; */
|
||||
;
|
||||
; /* This file is in intel asm syntax, see .s for at&t syntax */
|
||||
;
|
||||
; /*
|
||||
; AES_CBC_encrypt[const ,unsigned char*in
|
||||
; unsigned ,char*out
|
||||
; unsigned ,char ivec+16
|
||||
; unsigned ,long length
|
||||
; const ,unsigned char*KS
|
||||
; int nr]
|
||||
; */
|
||||
_text SEGMENT
|
||||
AES_CBC_encrypt PROC
|
||||
;# parameter 1: rdi
|
||||
;# parameter 2: rsi
|
||||
;# parameter 3: rdx
|
||||
;# parameter 4: rcx
|
||||
;# parameter 5: r8
|
||||
;# parameter 6: r9d
|
||||
|
||||
; save rdi and rsi to rax and r11, restore before ret
|
||||
mov rax,rdi
|
||||
mov r11,rsi
|
||||
|
||||
; convert to what we had for att&t convention
|
||||
mov rdi,rcx
|
||||
mov rsi,rdx
|
||||
mov rdx,r8
|
||||
mov rcx,r9
|
||||
mov r8,[rsp+40]
|
||||
mov r9d,[rsp+48]
|
||||
|
||||
mov r10,rcx
|
||||
shr rcx,4
|
||||
shl r10,60
|
||||
je NO_PARTS
|
||||
add rcx,1
|
||||
NO_PARTS:
|
||||
sub rsi,16
|
||||
movdqa xmm1,[rdx]
|
||||
LOOP_1:
|
||||
pxor xmm1,[rdi]
|
||||
pxor xmm1,[r8]
|
||||
add rsi,16
|
||||
add rdi,16
|
||||
cmp r9d,12
|
||||
aesenc xmm1,16[r8]
|
||||
aesenc xmm1,32[r8]
|
||||
aesenc xmm1,48[r8]
|
||||
aesenc xmm1,64[r8]
|
||||
aesenc xmm1,80[r8]
|
||||
aesenc xmm1,96[r8]
|
||||
aesenc xmm1,112[r8]
|
||||
aesenc xmm1,128[r8]
|
||||
aesenc xmm1,144[r8]
|
||||
movdqa xmm2,160[r8]
|
||||
jb LAST
|
||||
cmp r9d,14
|
||||
|
||||
aesenc xmm1,160[r8]
|
||||
aesenc xmm1,176[r8]
|
||||
movdqa xmm2,192[r8]
|
||||
jb LAST
|
||||
aesenc xmm1,192[r8]
|
||||
aesenc xmm1,208[r8]
|
||||
movdqa xmm2,224[r8]
|
||||
LAST:
|
||||
dec rcx
|
||||
aesenclast xmm1,xmm2
|
||||
movdqu [rsi],xmm1
|
||||
jne LOOP_1
|
||||
; restore non volatile rdi,rsi
|
||||
mov rdi,rax
|
||||
mov rsi,r11
|
||||
ret
|
||||
AES_CBC_encrypt ENDP
|
||||
|
||||
|
||||
|
||||
; /*
|
||||
; AES_CBC_decrypt[const ,unsigned char*in
|
||||
; unsigned ,char*out
|
||||
; unsigned ,char ivec+16
|
||||
; unsigned ,long length
|
||||
; const ,unsigned char*KS
|
||||
; int nr]
|
||||
; */
|
||||
; . globl AES_CBC_decrypt
|
||||
AES_CBC_decrypt PROC
|
||||
;# parameter 1: rdi
|
||||
;# parameter 2: rsi
|
||||
;# parameter 3: rdx
|
||||
;# parameter 4: rcx
|
||||
;# parameter 5: r8
|
||||
;# parameter 6: r9d
|
||||
|
||||
; save rdi and rsi to rax and r11, restore before ret
|
||||
mov rax,rdi
|
||||
mov r11,rsi
|
||||
|
||||
; convert to what we had for att&t convention
|
||||
mov rdi,rcx
|
||||
mov rsi,rdx
|
||||
mov rdx,r8
|
||||
mov rcx,r9
|
||||
mov r8,[rsp+40]
|
||||
mov r9d,[rsp+48]
|
||||
|
||||
; on microsoft xmm6-xmm15 are non volaitle, let's save on stack and restore at end
|
||||
sub rsp,8+8*16 ; 8 = align stack , 8 xmm6-12,15 16 bytes each
|
||||
movdqa [rsp+0], xmm6
|
||||
movdqa [rsp+16], xmm7
|
||||
movdqa [rsp+32], xmm8
|
||||
movdqa [rsp+48], xmm9
|
||||
movdqa [rsp+64], xmm10
|
||||
movdqa [rsp+80], xmm11
|
||||
movdqa [rsp+96], xmm12
|
||||
movdqa [rsp+112], xmm15
|
||||
|
||||
mov r10,rcx
|
||||
shr rcx,4
|
||||
shl r10,60
|
||||
je DNO_PARTS_4
|
||||
add rcx,1
|
||||
DNO_PARTS_4:
|
||||
mov r10,rcx
|
||||
shl r10,62
|
||||
shr r10,62
|
||||
shr rcx,2
|
||||
movdqu xmm5,[rdx]
|
||||
je DREMAINDER_4
|
||||
sub rsi,64
|
||||
DLOOP_4:
|
||||
movdqu xmm1,[rdi]
|
||||
movdqu xmm2,16[rdi]
|
||||
movdqu xmm3,32[rdi]
|
||||
movdqu xmm4,48[rdi]
|
||||
movdqa xmm6,xmm1
|
||||
movdqa xmm7,xmm2
|
||||
movdqa xmm8,xmm3
|
||||
movdqa xmm15,xmm4
|
||||
movdqa xmm9,[r8]
|
||||
movdqa xmm10,16[r8]
|
||||
movdqa xmm11,32[r8]
|
||||
movdqa xmm12,48[r8]
|
||||
pxor xmm1,xmm9
|
||||
pxor xmm2,xmm9
|
||||
pxor xmm3,xmm9
|
||||
|
||||
pxor xmm4,xmm9
|
||||
aesdec xmm1,xmm10
|
||||
aesdec xmm2,xmm10
|
||||
aesdec xmm3,xmm10
|
||||
aesdec xmm4,xmm10
|
||||
aesdec xmm1,xmm11
|
||||
aesdec xmm2,xmm11
|
||||
aesdec xmm3,xmm11
|
||||
aesdec xmm4,xmm11
|
||||
aesdec xmm1,xmm12
|
||||
aesdec xmm2,xmm12
|
||||
aesdec xmm3,xmm12
|
||||
aesdec xmm4,xmm12
|
||||
movdqa xmm9,64[r8]
|
||||
movdqa xmm10,80[r8]
|
||||
movdqa xmm11,96[r8]
|
||||
movdqa xmm12,112[r8]
|
||||
aesdec xmm1,xmm9
|
||||
aesdec xmm2,xmm9
|
||||
aesdec xmm3,xmm9
|
||||
aesdec xmm4,xmm9
|
||||
aesdec xmm1,xmm10
|
||||
aesdec xmm2,xmm10
|
||||
aesdec xmm3,xmm10
|
||||
aesdec xmm4,xmm10
|
||||
aesdec xmm1,xmm11
|
||||
aesdec xmm2,xmm11
|
||||
aesdec xmm3,xmm11
|
||||
aesdec xmm4,xmm11
|
||||
aesdec xmm1,xmm12
|
||||
aesdec xmm2,xmm12
|
||||
aesdec xmm3,xmm12
|
||||
aesdec xmm4,xmm12
|
||||
movdqa xmm9,128[r8]
|
||||
movdqa xmm10,144[r8]
|
||||
movdqa xmm11,160[r8]
|
||||
cmp r9d,12
|
||||
aesdec xmm1,xmm9
|
||||
aesdec xmm2,xmm9
|
||||
aesdec xmm3,xmm9
|
||||
aesdec xmm4,xmm9
|
||||
aesdec xmm1,xmm10
|
||||
aesdec xmm2,xmm10
|
||||
aesdec xmm3,xmm10
|
||||
aesdec xmm4,xmm10
|
||||
jb DLAST_4
|
||||
movdqa xmm9,160[r8]
|
||||
movdqa xmm10,176[r8]
|
||||
movdqa xmm11,192[r8]
|
||||
cmp r9d,14
|
||||
aesdec xmm1,xmm9
|
||||
aesdec xmm2,xmm9
|
||||
aesdec xmm3,xmm9
|
||||
aesdec xmm4,xmm9
|
||||
aesdec xmm1,xmm10
|
||||
aesdec xmm2,xmm10
|
||||
aesdec xmm3,xmm10
|
||||
aesdec xmm4,xmm10
|
||||
jb DLAST_4
|
||||
|
||||
movdqa xmm9,192[r8]
|
||||
movdqa xmm10,208[r8]
|
||||
movdqa xmm11,224[r8]
|
||||
aesdec xmm1,xmm9
|
||||
aesdec xmm2,xmm9
|
||||
aesdec xmm3,xmm9
|
||||
aesdec xmm4,xmm9
|
||||
aesdec xmm1,xmm10
|
||||
aesdec xmm2,xmm10
|
||||
aesdec xmm3,xmm10
|
||||
aesdec xmm4,xmm10
|
||||
DLAST_4:
|
||||
add rdi,64
|
||||
add rsi,64
|
||||
dec rcx
|
||||
aesdeclast xmm1,xmm11
|
||||
aesdeclast xmm2,xmm11
|
||||
aesdeclast xmm3,xmm11
|
||||
aesdeclast xmm4,xmm11
|
||||
pxor xmm1,xmm5
|
||||
pxor xmm2,xmm6
|
||||
pxor xmm3,xmm7
|
||||
pxor xmm4,xmm8
|
||||
movdqu [rsi],xmm1
|
||||
movdqu 16[rsi],xmm2
|
||||
movdqu 32[rsi],xmm3
|
||||
movdqu 48[rsi],xmm4
|
||||
movdqa xmm5,xmm15
|
||||
jne DLOOP_4
|
||||
add rsi,64
|
||||
DREMAINDER_4:
|
||||
cmp r10,0
|
||||
je DEND_4
|
||||
DLOOP_4_2:
|
||||
movdqu xmm1,[rdi]
|
||||
movdqa xmm15,xmm1
|
||||
add rdi,16
|
||||
pxor xmm1,[r8]
|
||||
movdqu xmm2,160[r8]
|
||||
cmp r9d,12
|
||||
aesdec xmm1,16[r8]
|
||||
aesdec xmm1,32[r8]
|
||||
aesdec xmm1,48[r8]
|
||||
aesdec xmm1,64[r8]
|
||||
aesdec xmm1,80[r8]
|
||||
aesdec xmm1,96[r8]
|
||||
aesdec xmm1,112[r8]
|
||||
aesdec xmm1,128[r8]
|
||||
aesdec xmm1,144[r8]
|
||||
jb DLAST_4_2
|
||||
movdqu xmm2,192[r8]
|
||||
cmp r9d,14
|
||||
aesdec xmm1,160[r8]
|
||||
aesdec xmm1,176[r8]
|
||||
jb DLAST_4_2
|
||||
movdqu xmm2,224[r8]
|
||||
aesdec xmm1,192[r8]
|
||||
aesdec xmm1,208[r8]
|
||||
DLAST_4_2:
|
||||
aesdeclast xmm1,xmm2
|
||||
pxor xmm1,xmm5
|
||||
movdqa xmm5,xmm15
|
||||
movdqu [rsi],xmm1
|
||||
|
||||
add rsi,16
|
||||
dec r10
|
||||
jne DLOOP_4_2
|
||||
DEND_4:
|
||||
; restore non volatile rdi,rsi
|
||||
mov rdi,rax
|
||||
mov rsi,r11
|
||||
; restore non volatile xmms from stack
|
||||
movdqa xmm6, [rsp+0]
|
||||
movdqa xmm7, [rsp+16]
|
||||
movdqa xmm8, [rsp+32]
|
||||
movdqa xmm9, [rsp+48]
|
||||
movdqa xmm10, [rsp+64]
|
||||
movdqa xmm11, [rsp+80]
|
||||
movdqa xmm12, [rsp+96]
|
||||
movdqa xmm15, [rsp+112]
|
||||
add rsp,8+8*16 ; 8 = align stack , 8 xmm6-12,15 16 bytes each
|
||||
ret
|
||||
AES_CBC_decrypt ENDP
|
||||
|
||||
; /*
|
||||
; AES_ECB_encrypt[const ,unsigned char*in
|
||||
; unsigned ,char*out
|
||||
; unsigned ,long length
|
||||
; const ,unsigned char*KS
|
||||
; int nr]
|
||||
; */
|
||||
; . globl AES_ECB_encrypt
|
||||
AES_ECB_encrypt PROC
|
||||
;# parameter 1: rdi
|
||||
;# parameter 2: rsi
|
||||
;# parameter 3: rdx
|
||||
;# parameter 4: rcx
|
||||
;# parameter 5: r8d
|
||||
|
||||
; save rdi and rsi to rax and r11, restore before ret
|
||||
mov rax,rdi
|
||||
mov r11,rsi
|
||||
|
||||
; convert to what we had for att&t convention
|
||||
mov rdi,rcx
|
||||
mov rsi,rdx
|
||||
mov rdx,r8
|
||||
mov rcx,r9
|
||||
mov r8d,[rsp+40]
|
||||
|
||||
; on microsoft xmm6-xmm15 are non volaitle, let's save on stack and restore at end
|
||||
sub rsp,8+4*16 ; 8 = align stack , 4 xmm9-12, 16 bytes each
|
||||
movdqa [rsp+0], xmm9
|
||||
movdqa [rsp+16], xmm10
|
||||
movdqa [rsp+32], xmm11
|
||||
movdqa [rsp+48], xmm12
|
||||
|
||||
|
||||
mov r10,rdx
|
||||
shr rdx,4
|
||||
shl r10,60
|
||||
je EECB_NO_PARTS_4
|
||||
add rdx,1
|
||||
EECB_NO_PARTS_4:
|
||||
mov r10,rdx
|
||||
shl r10,62
|
||||
shr r10,62
|
||||
shr rdx,2
|
||||
je EECB_REMAINDER_4
|
||||
sub rsi,64
|
||||
EECB_LOOP_4:
|
||||
movdqu xmm1,[rdi]
|
||||
movdqu xmm2,16[rdi]
|
||||
movdqu xmm3,32[rdi]
|
||||
movdqu xmm4,48[rdi]
|
||||
movdqa xmm9,[rcx]
|
||||
movdqa xmm10,16[rcx]
|
||||
movdqa xmm11,32[rcx]
|
||||
movdqa xmm12,48[rcx]
|
||||
pxor xmm1,xmm9
|
||||
pxor xmm2,xmm9
|
||||
pxor xmm3,xmm9
|
||||
pxor xmm4,xmm9
|
||||
aesenc xmm1,xmm10
|
||||
aesenc xmm2,xmm10
|
||||
aesenc xmm3,xmm10
|
||||
aesenc xmm4,xmm10
|
||||
aesenc xmm1,xmm11
|
||||
aesenc xmm2,xmm11
|
||||
aesenc xmm3,xmm11
|
||||
aesenc xmm4,xmm11
|
||||
aesenc xmm1,xmm12
|
||||
aesenc xmm2,xmm12
|
||||
aesenc xmm3,xmm12
|
||||
aesenc xmm4,xmm12
|
||||
movdqa xmm9,64[rcx]
|
||||
movdqa xmm10,80[rcx]
|
||||
movdqa xmm11,96[rcx]
|
||||
movdqa xmm12,112[rcx]
|
||||
aesenc xmm1,xmm9
|
||||
aesenc xmm2,xmm9
|
||||
aesenc xmm3,xmm9
|
||||
aesenc xmm4,xmm9
|
||||
aesenc xmm1,xmm10
|
||||
aesenc xmm2,xmm10
|
||||
aesenc xmm3,xmm10
|
||||
aesenc xmm4,xmm10
|
||||
aesenc xmm1,xmm11
|
||||
aesenc xmm2,xmm11
|
||||
aesenc xmm3,xmm11
|
||||
aesenc xmm4,xmm11
|
||||
aesenc xmm1,xmm12
|
||||
aesenc xmm2,xmm12
|
||||
aesenc xmm3,xmm12
|
||||
aesenc xmm4,xmm12
|
||||
movdqa xmm9,128[rcx]
|
||||
movdqa xmm10,144[rcx]
|
||||
movdqa xmm11,160[rcx]
|
||||
cmp r8d,12
|
||||
aesenc xmm1,xmm9
|
||||
aesenc xmm2,xmm9
|
||||
aesenc xmm3,xmm9
|
||||
aesenc xmm4,xmm9
|
||||
aesenc xmm1,xmm10
|
||||
aesenc xmm2,xmm10
|
||||
aesenc xmm3,xmm10
|
||||
aesenc xmm4,xmm10
|
||||
jb EECB_LAST_4
|
||||
movdqa xmm9,160[rcx]
|
||||
movdqa xmm10,176[rcx]
|
||||
movdqa xmm11,192[rcx]
|
||||
cmp r8d,14
|
||||
aesenc xmm1,xmm9
|
||||
aesenc xmm2,xmm9
|
||||
aesenc xmm3,xmm9
|
||||
aesenc xmm4,xmm9
|
||||
aesenc xmm1,xmm10
|
||||
aesenc xmm2,xmm10
|
||||
aesenc xmm3,xmm10
|
||||
aesenc xmm4,xmm10
|
||||
jb EECB_LAST_4
|
||||
movdqa xmm9,192[rcx]
|
||||
movdqa xmm10,208[rcx]
|
||||
movdqa xmm11,224[rcx]
|
||||
aesenc xmm1,xmm9
|
||||
aesenc xmm2,xmm9
|
||||
aesenc xmm3,xmm9
|
||||
aesenc xmm4,xmm9
|
||||
aesenc xmm1,xmm10
|
||||
aesenc xmm2,xmm10
|
||||
aesenc xmm3,xmm10
|
||||
aesenc xmm4,xmm10
|
||||
EECB_LAST_4:
|
||||
add rdi,64
|
||||
add rsi,64
|
||||
dec rdx
|
||||
aesenclast xmm1,xmm11
|
||||
aesenclast xmm2,xmm11
|
||||
aesenclast xmm3,xmm11
|
||||
aesenclast xmm4,xmm11
|
||||
movdqu [rsi],xmm1
|
||||
movdqu 16[rsi],xmm2
|
||||
movdqu 32[rsi],xmm3
|
||||
movdqu 48[rsi],xmm4
|
||||
jne EECB_LOOP_4
|
||||
add rsi,64
|
||||
EECB_REMAINDER_4:
|
||||
cmp r10,0
|
||||
je EECB_END_4
|
||||
EECB_LOOP_4_2:
|
||||
movdqu xmm1,[rdi]
|
||||
add rdi,16
|
||||
pxor xmm1,[rcx]
|
||||
movdqu xmm2,160[rcx]
|
||||
aesenc xmm1,16[rcx]
|
||||
aesenc xmm1,32[rcx]
|
||||
aesenc xmm1,48[rcx]
|
||||
aesenc xmm1,64[rcx]
|
||||
aesenc xmm1,80[rcx]
|
||||
aesenc xmm1,96[rcx]
|
||||
aesenc xmm1,112[rcx]
|
||||
aesenc xmm1,128[rcx]
|
||||
aesenc xmm1,144[rcx]
|
||||
cmp r8d,12
|
||||
jb EECB_LAST_4_2
|
||||
movdqu xmm2,192[rcx]
|
||||
aesenc xmm1,160[rcx]
|
||||
aesenc xmm1,176[rcx]
|
||||
cmp r8d,14
|
||||
jb EECB_LAST_4_2
|
||||
movdqu xmm2,224[rcx]
|
||||
aesenc xmm1,192[rcx]
|
||||
aesenc xmm1,208[rcx]
|
||||
EECB_LAST_4_2:
|
||||
aesenclast xmm1,xmm2
|
||||
movdqu [rsi],xmm1
|
||||
add rsi,16
|
||||
dec r10
|
||||
jne EECB_LOOP_4_2
|
||||
EECB_END_4:
|
||||
; restore non volatile rdi,rsi
|
||||
mov rdi,rax
|
||||
mov rsi,r11
|
||||
; restore non volatile xmms from stack
|
||||
movdqa xmm9, [rsp+0]
|
||||
movdqa xmm10, [rsp+16]
|
||||
movdqa xmm11, [rsp+32]
|
||||
movdqa xmm12, [rsp+48]
|
||||
add rsp,8+4*16 ; 8 = align stack , 4 xmm9-12 16 bytes each
|
||||
ret
|
||||
AES_ECB_encrypt ENDP
|
||||
|
||||
; /*
|
||||
; AES_ECB_decrypt[const ,unsigned char*in
|
||||
; unsigned ,char*out
|
||||
; unsigned ,long length
|
||||
; const ,unsigned char*KS
|
||||
; int nr]
|
||||
; */
|
||||
; . globl AES_ECB_decrypt
|
||||
AES_ECB_decrypt PROC
|
||||
;# parameter 1: rdi
|
||||
;# parameter 2: rsi
|
||||
;# parameter 3: rdx
|
||||
;# parameter 4: rcx
|
||||
;# parameter 5: r8d
|
||||
|
||||
; save rdi and rsi to rax and r11, restore before ret
|
||||
mov rax,rdi
|
||||
mov r11,rsi
|
||||
|
||||
; convert to what we had for att&t convention
|
||||
mov rdi,rcx
|
||||
mov rsi,rdx
|
||||
mov rdx,r8
|
||||
mov rcx,r9
|
||||
mov r8d,[rsp+40]
|
||||
|
||||
; on microsoft xmm6-xmm15 are non volaitle, let's save on stack and restore at end
|
||||
sub rsp,8+4*16 ; 8 = align stack , 4 xmm9-12, 16 bytes each
|
||||
movdqa [rsp+0], xmm9
|
||||
movdqa [rsp+16], xmm10
|
||||
movdqa [rsp+32], xmm11
|
||||
movdqa [rsp+48], xmm12
|
||||
|
||||
mov r10,rdx
|
||||
shr rdx,4
|
||||
shl r10,60
|
||||
je DECB_NO_PARTS_4
|
||||
add rdx,1
|
||||
DECB_NO_PARTS_4:
|
||||
mov r10,rdx
|
||||
shl r10,62
|
||||
shr r10,62
|
||||
shr rdx,2
|
||||
je DECB_REMAINDER_4
|
||||
sub rsi,64
|
||||
DECB_LOOP_4:
|
||||
movdqu xmm1,[rdi]
|
||||
movdqu xmm2,16[rdi]
|
||||
movdqu xmm3,32[rdi]
|
||||
movdqu xmm4,48[rdi]
|
||||
movdqa xmm9,[rcx]
|
||||
movdqa xmm10,16[rcx]
|
||||
movdqa xmm11,32[rcx]
|
||||
movdqa xmm12,48[rcx]
|
||||
pxor xmm1,xmm9
|
||||
pxor xmm2,xmm9
|
||||
pxor xmm3,xmm9
|
||||
pxor xmm4,xmm9
|
||||
aesdec xmm1,xmm10
|
||||
aesdec xmm2,xmm10
|
||||
aesdec xmm3,xmm10
|
||||
aesdec xmm4,xmm10
|
||||
aesdec xmm1,xmm11
|
||||
aesdec xmm2,xmm11
|
||||
aesdec xmm3,xmm11
|
||||
aesdec xmm4,xmm11
|
||||
aesdec xmm1,xmm12
|
||||
aesdec xmm2,xmm12
|
||||
aesdec xmm3,xmm12
|
||||
aesdec xmm4,xmm12
|
||||
movdqa xmm9,64[rcx]
|
||||
movdqa xmm10,80[rcx]
|
||||
movdqa xmm11,96[rcx]
|
||||
movdqa xmm12,112[rcx]
|
||||
aesdec xmm1,xmm9
|
||||
aesdec xmm2,xmm9
|
||||
aesdec xmm3,xmm9
|
||||
aesdec xmm4,xmm9
|
||||
aesdec xmm1,xmm10
|
||||
aesdec xmm2,xmm10
|
||||
aesdec xmm3,xmm10
|
||||
aesdec xmm4,xmm10
|
||||
aesdec xmm1,xmm11
|
||||
aesdec xmm2,xmm11
|
||||
aesdec xmm3,xmm11
|
||||
aesdec xmm4,xmm11
|
||||
aesdec xmm1,xmm12
|
||||
aesdec xmm2,xmm12
|
||||
aesdec xmm3,xmm12
|
||||
aesdec xmm4,xmm12
|
||||
movdqa xmm9,128[rcx]
|
||||
movdqa xmm10,144[rcx]
|
||||
movdqa xmm11,160[rcx]
|
||||
cmp r8d,12
|
||||
aesdec xmm1,xmm9
|
||||
aesdec xmm2,xmm9
|
||||
aesdec xmm3,xmm9
|
||||
aesdec xmm4,xmm9
|
||||
aesdec xmm1,xmm10
|
||||
aesdec xmm2,xmm10
|
||||
aesdec xmm3,xmm10
|
||||
aesdec xmm4,xmm10
|
||||
jb DECB_LAST_4
|
||||
movdqa xmm9,160[rcx]
|
||||
movdqa xmm10,176[rcx]
|
||||
movdqa xmm11,192[rcx]
|
||||
cmp r8d,14
|
||||
aesdec xmm1,xmm9
|
||||
aesdec xmm2,xmm9
|
||||
aesdec xmm3,xmm9
|
||||
aesdec xmm4,xmm9
|
||||
aesdec xmm1,xmm10
|
||||
aesdec xmm2,xmm10
|
||||
aesdec xmm3,xmm10
|
||||
aesdec xmm4,xmm10
|
||||
jb DECB_LAST_4
|
||||
movdqa xmm9,192[rcx]
|
||||
movdqa xmm10,208[rcx]
|
||||
movdqa xmm11,224[rcx]
|
||||
aesdec xmm1,xmm9
|
||||
aesdec xmm2,xmm9
|
||||
aesdec xmm3,xmm9
|
||||
aesdec xmm4,xmm9
|
||||
aesdec xmm1,xmm10
|
||||
aesdec xmm2,xmm10
|
||||
aesdec xmm3,xmm10
|
||||
aesdec xmm4,xmm10
|
||||
DECB_LAST_4:
|
||||
add rdi,64
|
||||
add rsi,64
|
||||
dec rdx
|
||||
aesdeclast xmm1,xmm11
|
||||
aesdeclast xmm2,xmm11
|
||||
aesdeclast xmm3,xmm11
|
||||
aesdeclast xmm4,xmm11
|
||||
movdqu [rsi],xmm1
|
||||
movdqu 16[rsi],xmm2
|
||||
movdqu 32[rsi],xmm3
|
||||
movdqu 48[rsi],xmm4
|
||||
jne DECB_LOOP_4
|
||||
add rsi,64
|
||||
DECB_REMAINDER_4:
|
||||
cmp r10,0
|
||||
je DECB_END_4
|
||||
DECB_LOOP_4_2:
|
||||
movdqu xmm1,[rdi]
|
||||
add rdi,16
|
||||
pxor xmm1,[rcx]
|
||||
movdqu xmm2,160[rcx]
|
||||
cmp r8d,12
|
||||
aesdec xmm1,16[rcx]
|
||||
aesdec xmm1,32[rcx]
|
||||
aesdec xmm1,48[rcx]
|
||||
aesdec xmm1,64[rcx]
|
||||
aesdec xmm1,80[rcx]
|
||||
aesdec xmm1,96[rcx]
|
||||
aesdec xmm1,112[rcx]
|
||||
aesdec xmm1,128[rcx]
|
||||
aesdec xmm1,144[rcx]
|
||||
jb DECB_LAST_4_2
|
||||
cmp r8d,14
|
||||
movdqu xmm2,192[rcx]
|
||||
aesdec xmm1,160[rcx]
|
||||
aesdec xmm1,176[rcx]
|
||||
jb DECB_LAST_4_2
|
||||
movdqu xmm2,224[rcx]
|
||||
aesdec xmm1,192[rcx]
|
||||
aesdec xmm1,208[rcx]
|
||||
DECB_LAST_4_2:
|
||||
aesdeclast xmm1,xmm2
|
||||
movdqu [rsi],xmm1
|
||||
add rsi,16
|
||||
dec r10
|
||||
jne DECB_LOOP_4_2
|
||||
DECB_END_4:
|
||||
; restore non volatile rdi,rsi
|
||||
mov rdi,rax
|
||||
mov rsi,r11
|
||||
; restore non volatile xmms from stack
|
||||
movdqa xmm9, [rsp+0]
|
||||
movdqa xmm10, [rsp+16]
|
||||
movdqa xmm11, [rsp+32]
|
||||
movdqa xmm12, [rsp+48]
|
||||
add rsp,8+4*16 ; 8 = align stack , 4 xmm9-12 16 bytes each
|
||||
ret
|
||||
AES_ECB_decrypt ENDP
|
||||
|
||||
|
||||
|
||||
; /*
|
||||
; void ,AES_128_Key_Expansion[const unsigned char*userkey
|
||||
; unsigned char*key_schedule]/
|
||||
; */
|
||||
; . align 16,0x90
|
||||
; . globl AES_128_Key_Expansion
|
||||
AES_128_Key_Expansion PROC
|
||||
;# parameter 1: rdi
|
||||
;# parameter 2: rsi
|
||||
|
||||
; save rdi and rsi to rax and r11, restore before ret
|
||||
mov rax,rdi
|
||||
mov r11,rsi
|
||||
|
||||
; convert to what we had for att&t convention
|
||||
mov rdi,rcx
|
||||
mov rsi,rdx
|
||||
|
||||
mov dword ptr 240[rsi],10
|
||||
|
||||
movdqu xmm1,[rdi]
|
||||
movdqa [rsi],xmm1
|
||||
|
||||
|
||||
ASSISTS:
|
||||
aeskeygenassist xmm2,xmm1,1
|
||||
call PREPARE_ROUNDKEY_128
|
||||
movdqa 16[rsi],xmm1
|
||||
|
||||
aeskeygenassist xmm2,xmm1,2
|
||||
call PREPARE_ROUNDKEY_128
|
||||
movdqa 32[rsi],xmm1
|
||||
|
||||
aeskeygenassist xmm2,xmm1,4
|
||||
call PREPARE_ROUNDKEY_128
|
||||
movdqa 48[rsi],xmm1
|
||||
|
||||
aeskeygenassist xmm2,xmm1,8
|
||||
call PREPARE_ROUNDKEY_128
|
||||
movdqa 64[rsi],xmm1
|
||||
|
||||
aeskeygenassist xmm2,xmm1,16
|
||||
call PREPARE_ROUNDKEY_128
|
||||
movdqa 80[rsi],xmm1
|
||||
|
||||
aeskeygenassist xmm2,xmm1,32
|
||||
call PREPARE_ROUNDKEY_128
|
||||
movdqa 96[rsi],xmm1
|
||||
|
||||
aeskeygenassist xmm2,xmm1,64
|
||||
call PREPARE_ROUNDKEY_128
|
||||
movdqa 112[rsi],xmm1
|
||||
aeskeygenassist xmm2,xmm1,80h
|
||||
call PREPARE_ROUNDKEY_128
|
||||
movdqa 128[rsi],xmm1
|
||||
aeskeygenassist xmm2,xmm1,1bh
|
||||
call PREPARE_ROUNDKEY_128
|
||||
movdqa 144[rsi],xmm1
|
||||
aeskeygenassist xmm2,xmm1,36h
|
||||
call PREPARE_ROUNDKEY_128
|
||||
movdqa 160[rsi],xmm1
|
||||
; restore non volatile rdi,rsi
|
||||
mov rdi,rax
|
||||
mov rsi,r11
|
||||
ret
|
||||
|
||||
PREPARE_ROUNDKEY_128:
|
||||
pshufd xmm2,xmm2,255
|
||||
movdqa xmm3,xmm1
|
||||
pslldq xmm3,4
|
||||
pxor xmm1,xmm3
|
||||
pslldq xmm3,4
|
||||
pxor xmm1,xmm3
|
||||
pslldq xmm3,4
|
||||
pxor xmm1,xmm3
|
||||
pxor xmm1,xmm2
|
||||
ret
|
||||
AES_128_Key_Expansion ENDP
|
||||
|
||||
; /*
|
||||
; void ,AES_192_Key_Expansion[const unsigned char*userkey
|
||||
; unsigned char*key]
|
||||
; */
|
||||
; . globl AES_192_Key_Expansion
|
||||
AES_192_Key_Expansion PROC
|
||||
;# parameter 1: rdi
|
||||
;# parameter 2: rsi
|
||||
|
||||
; save rdi and rsi to rax and r11, restore before ret
|
||||
mov rax,rdi
|
||||
mov r11,rsi
|
||||
|
||||
; convert to what we had for att&t convention
|
||||
mov rdi,rcx
|
||||
mov rsi,rdx
|
||||
|
||||
; on microsoft xmm6-xmm15 are non volaitle, let's save on stack and restore at end
|
||||
sub rsp,8+1*16 ; 8 = align stack , 1 xmm6, 16 bytes each
|
||||
movdqa [rsp+0], xmm6
|
||||
|
||||
movdqu xmm1,[rdi]
|
||||
movdqu xmm3,16[rdi]
|
||||
movdqa [rsi],xmm1
|
||||
movdqa xmm5,xmm3
|
||||
|
||||
aeskeygenassist xmm2,xmm3,1h
|
||||
call PREPARE_ROUNDKEY_192
|
||||
shufpd xmm5,xmm1,0
|
||||
movdqa 16[rsi],xmm5
|
||||
movdqa xmm6,xmm1
|
||||
shufpd xmm6,xmm3,1
|
||||
movdqa 32[rsi],xmm6
|
||||
|
||||
aeskeygenassist xmm2,xmm3,2h
|
||||
call PREPARE_ROUNDKEY_192
|
||||
movdqa 48[rsi],xmm1
|
||||
movdqa xmm5,xmm3
|
||||
|
||||
aeskeygenassist xmm2,xmm3,4h
|
||||
call PREPARE_ROUNDKEY_192
|
||||
shufpd xmm5,xmm1,0
|
||||
movdqa 64[rsi],xmm5
|
||||
movdqa xmm6,xmm1
|
||||
shufpd xmm6,xmm3,1
|
||||
movdqa 80[rsi],xmm6
|
||||
|
||||
aeskeygenassist xmm2,xmm3,8h
|
||||
call PREPARE_ROUNDKEY_192
|
||||
movdqa 96[rsi],xmm1
|
||||
movdqa xmm5,xmm3
|
||||
|
||||
aeskeygenassist xmm2,xmm3,10h
|
||||
call PREPARE_ROUNDKEY_192
|
||||
shufpd xmm5,xmm1,0
|
||||
movdqa 112[rsi],xmm5
|
||||
movdqa xmm6,xmm1
|
||||
shufpd xmm6,xmm3,1
|
||||
movdqa 128[rsi],xmm6
|
||||
|
||||
aeskeygenassist xmm2,xmm3,20h
|
||||
call PREPARE_ROUNDKEY_192
|
||||
movdqa 144[rsi],xmm1
|
||||
movdqa xmm5,xmm3
|
||||
|
||||
aeskeygenassist xmm2,xmm3,40h
|
||||
call PREPARE_ROUNDKEY_192
|
||||
shufpd xmm5,xmm1,0
|
||||
movdqa 160[rsi],xmm5
|
||||
movdqa xmm6,xmm1
|
||||
shufpd xmm6,xmm3,1
|
||||
movdqa 176[rsi],xmm6
|
||||
|
||||
aeskeygenassist xmm2,xmm3,80h
|
||||
call PREPARE_ROUNDKEY_192
|
||||
movdqa 192[rsi],xmm1
|
||||
movdqa 208[rsi],xmm3
|
||||
; restore non volatile rdi,rsi
|
||||
mov rdi,rax
|
||||
mov rsi,r11
|
||||
; restore non volatile xmms from stack
|
||||
movdqa xmm6, [rsp+0]
|
||||
add rsp,8+1*16 ; 8 = align stack , 1 xmm6 16 bytes each
|
||||
ret
|
||||
|
||||
PREPARE_ROUNDKEY_192:
|
||||
pshufd xmm2,xmm2,55h
|
||||
movdqu xmm4,xmm1
|
||||
pslldq xmm4,4
|
||||
pxor xmm1,xmm4
|
||||
|
||||
pslldq xmm4,4
|
||||
pxor xmm1,xmm4
|
||||
pslldq xmm4,4
|
||||
pxor xmm1,xmm4
|
||||
pxor xmm1,xmm2
|
||||
pshufd xmm2,xmm1,0ffh
|
||||
movdqu xmm4,xmm3
|
||||
pslldq xmm4,4
|
||||
pxor xmm3,xmm4
|
||||
pxor xmm3,xmm2
|
||||
ret
|
||||
AES_192_Key_Expansion ENDP
|
||||
|
||||
; /*
|
||||
; void ,AES_256_Key_Expansion[const unsigned char*userkey
|
||||
; unsigned char*key]
|
||||
; */
|
||||
; . globl AES_256_Key_Expansion
|
||||
AES_256_Key_Expansion PROC
|
||||
;# parameter 1: rdi
|
||||
;# parameter 2: rsi
|
||||
|
||||
; save rdi and rsi to rax and r11, restore before ret
|
||||
mov rax,rdi
|
||||
mov r11,rsi
|
||||
|
||||
; convert to what we had for att&t convention
|
||||
mov rdi,rcx
|
||||
mov rsi,rdx
|
||||
|
||||
movdqu xmm1,[rdi]
|
||||
movdqu xmm3,16[rdi]
|
||||
movdqa [rsi],xmm1
|
||||
movdqa 16[rsi],xmm3
|
||||
|
||||
aeskeygenassist xmm2,xmm3,1h
|
||||
call MAKE_RK256_a
|
||||
movdqa 32[rsi],xmm1
|
||||
aeskeygenassist xmm2,xmm1,0h
|
||||
call MAKE_RK256_b
|
||||
movdqa 48[rsi],xmm3
|
||||
aeskeygenassist xmm2,xmm3,2h
|
||||
call MAKE_RK256_a
|
||||
movdqa 64[rsi],xmm1
|
||||
aeskeygenassist xmm2,xmm1,0h
|
||||
call MAKE_RK256_b
|
||||
movdqa 80[rsi],xmm3
|
||||
aeskeygenassist xmm2,xmm3,4h
|
||||
call MAKE_RK256_a
|
||||
movdqa 96[rsi],xmm1
|
||||
aeskeygenassist xmm2,xmm1,0h
|
||||
call MAKE_RK256_b
|
||||
movdqa 112[rsi],xmm3
|
||||
aeskeygenassist xmm2,xmm3,8h
|
||||
call MAKE_RK256_a
|
||||
movdqa 128[rsi],xmm1
|
||||
aeskeygenassist xmm2,xmm1,0h
|
||||
call MAKE_RK256_b
|
||||
movdqa 144[rsi],xmm3
|
||||
aeskeygenassist xmm2,xmm3,10h
|
||||
call MAKE_RK256_a
|
||||
movdqa 160[rsi],xmm1
|
||||
aeskeygenassist xmm2,xmm1,0h
|
||||
call MAKE_RK256_b
|
||||
movdqa 176[rsi],xmm3
|
||||
aeskeygenassist xmm2,xmm3,20h
|
||||
call MAKE_RK256_a
|
||||
movdqa 192[rsi],xmm1
|
||||
|
||||
aeskeygenassist xmm2,xmm1,0h
|
||||
call MAKE_RK256_b
|
||||
movdqa 208[rsi],xmm3
|
||||
aeskeygenassist xmm2,xmm3,40h
|
||||
call MAKE_RK256_a
|
||||
movdqa 224[rsi],xmm1
|
||||
|
||||
; restore non volatile rdi,rsi
|
||||
mov rdi,rax
|
||||
mov rsi,r11
|
||||
ret
|
||||
AES_256_Key_Expansion ENDP
|
||||
|
||||
MAKE_RK256_a:
|
||||
pshufd xmm2,xmm2,0ffh
|
||||
movdqa xmm4,xmm1
|
||||
pslldq xmm4,4
|
||||
pxor xmm1,xmm4
|
||||
pslldq xmm4,4
|
||||
pxor xmm1,xmm4
|
||||
pslldq xmm4,4
|
||||
pxor xmm1,xmm4
|
||||
pxor xmm1,xmm2
|
||||
ret
|
||||
|
||||
MAKE_RK256_b:
|
||||
pshufd xmm2,xmm2,0aah
|
||||
movdqa xmm4,xmm3
|
||||
pslldq xmm4,4
|
||||
pxor xmm3,xmm4
|
||||
pslldq xmm4,4
|
||||
pxor xmm3,xmm4
|
||||
pslldq xmm4,4
|
||||
pxor xmm3,xmm4
|
||||
pxor xmm3,xmm2
|
||||
ret
|
||||
|
||||
END
|
||||
816
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/aes_asm.s
Normal file
816
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/aes_asm.s
Normal file
|
|
@ -0,0 +1,816 @@
|
|||
/* aes_asm.s
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
|
||||
/* See Intel® Advanced Encryption Standard (AES) Instructions Set White Paper
|
||||
* by Intel Mobility Group, Israel Development Center, Israel Shay Gueron
|
||||
*/
|
||||
|
||||
/* This file is in at&t asm syntax, see .asm for intel syntax */
|
||||
|
||||
|
||||
/*
|
||||
AES_CBC_encrypt (const unsigned char *in,
|
||||
unsigned char *out,
|
||||
unsigned char ivec[16],
|
||||
unsigned long length,
|
||||
const unsigned char *KS,
|
||||
int nr)
|
||||
*/
|
||||
.globl AES_CBC_encrypt
|
||||
AES_CBC_encrypt:
|
||||
# parameter 1: %rdi
|
||||
# parameter 2: %rsi
|
||||
# parameter 3: %rdx
|
||||
# parameter 4: %rcx
|
||||
# parameter 5: %r8
|
||||
# parameter 6: %r9d
|
||||
movq %rcx, %r10
|
||||
shrq $4, %rcx
|
||||
shlq $60, %r10
|
||||
je NO_PARTS
|
||||
addq $1, %rcx
|
||||
NO_PARTS:
|
||||
subq $16, %rsi
|
||||
movdqa (%rdx), %xmm1
|
||||
LOOP:
|
||||
pxor (%rdi), %xmm1
|
||||
pxor (%r8), %xmm1
|
||||
addq $16,%rsi
|
||||
addq $16,%rdi
|
||||
cmpl $12, %r9d
|
||||
aesenc 16(%r8),%xmm1
|
||||
aesenc 32(%r8),%xmm1
|
||||
aesenc 48(%r8),%xmm1
|
||||
aesenc 64(%r8),%xmm1
|
||||
aesenc 80(%r8),%xmm1
|
||||
aesenc 96(%r8),%xmm1
|
||||
aesenc 112(%r8),%xmm1
|
||||
aesenc 128(%r8),%xmm1
|
||||
aesenc 144(%r8),%xmm1
|
||||
movdqa 160(%r8),%xmm2
|
||||
jb LAST
|
||||
cmpl $14, %r9d
|
||||
|
||||
aesenc 160(%r8),%xmm1
|
||||
aesenc 176(%r8),%xmm1
|
||||
movdqa 192(%r8),%xmm2
|
||||
jb LAST
|
||||
aesenc 192(%r8),%xmm1
|
||||
aesenc 208(%r8),%xmm1
|
||||
movdqa 224(%r8),%xmm2
|
||||
LAST:
|
||||
decq %rcx
|
||||
aesenclast %xmm2,%xmm1
|
||||
movdqu %xmm1,(%rsi)
|
||||
jne LOOP
|
||||
ret
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
AES_CBC_decrypt (const unsigned char *in,
|
||||
unsigned char *out,
|
||||
unsigned char ivec[16],
|
||||
unsigned long length,
|
||||
const unsigned char *KS,
|
||||
int nr)
|
||||
*/
|
||||
.globl AES_CBC_decrypt
|
||||
AES_CBC_decrypt:
|
||||
# parameter 1: %rdi
|
||||
# parameter 2: %rsi
|
||||
# parameter 3: %rdx
|
||||
# parameter 4: %rcx
|
||||
# parameter 5: %r8
|
||||
# parameter 6: %r9d
|
||||
|
||||
movq %rcx, %r10
|
||||
shrq $4, %rcx
|
||||
shlq $60, %r10
|
||||
je DNO_PARTS_4
|
||||
addq $1, %rcx
|
||||
DNO_PARTS_4:
|
||||
movq %rcx, %r10
|
||||
shlq $62, %r10
|
||||
shrq $62, %r10
|
||||
shrq $2, %rcx
|
||||
movdqu (%rdx),%xmm5
|
||||
je DREMAINDER_4
|
||||
subq $64, %rsi
|
||||
DLOOP_4:
|
||||
movdqu (%rdi), %xmm1
|
||||
movdqu 16(%rdi), %xmm2
|
||||
movdqu 32(%rdi), %xmm3
|
||||
movdqu 48(%rdi), %xmm4
|
||||
movdqa %xmm1, %xmm6
|
||||
movdqa %xmm2, %xmm7
|
||||
movdqa %xmm3, %xmm8
|
||||
movdqa %xmm4, %xmm15
|
||||
movdqa (%r8), %xmm9
|
||||
movdqa 16(%r8), %xmm10
|
||||
movdqa 32(%r8), %xmm11
|
||||
movdqa 48(%r8), %xmm12
|
||||
pxor %xmm9, %xmm1
|
||||
pxor %xmm9, %xmm2
|
||||
pxor %xmm9, %xmm3
|
||||
|
||||
pxor %xmm9, %xmm4
|
||||
aesdec %xmm10, %xmm1
|
||||
aesdec %xmm10, %xmm2
|
||||
aesdec %xmm10, %xmm3
|
||||
aesdec %xmm10, %xmm4
|
||||
aesdec %xmm11, %xmm1
|
||||
aesdec %xmm11, %xmm2
|
||||
aesdec %xmm11, %xmm3
|
||||
aesdec %xmm11, %xmm4
|
||||
aesdec %xmm12, %xmm1
|
||||
aesdec %xmm12, %xmm2
|
||||
aesdec %xmm12, %xmm3
|
||||
aesdec %xmm12, %xmm4
|
||||
movdqa 64(%r8), %xmm9
|
||||
movdqa 80(%r8), %xmm10
|
||||
movdqa 96(%r8), %xmm11
|
||||
movdqa 112(%r8), %xmm12
|
||||
aesdec %xmm9, %xmm1
|
||||
aesdec %xmm9, %xmm2
|
||||
aesdec %xmm9, %xmm3
|
||||
aesdec %xmm9, %xmm4
|
||||
aesdec %xmm10, %xmm1
|
||||
aesdec %xmm10, %xmm2
|
||||
aesdec %xmm10, %xmm3
|
||||
aesdec %xmm10, %xmm4
|
||||
aesdec %xmm11, %xmm1
|
||||
aesdec %xmm11, %xmm2
|
||||
aesdec %xmm11, %xmm3
|
||||
aesdec %xmm11, %xmm4
|
||||
aesdec %xmm12, %xmm1
|
||||
aesdec %xmm12, %xmm2
|
||||
aesdec %xmm12, %xmm3
|
||||
aesdec %xmm12, %xmm4
|
||||
movdqa 128(%r8), %xmm9
|
||||
movdqa 144(%r8), %xmm10
|
||||
movdqa 160(%r8), %xmm11
|
||||
cmpl $12, %r9d
|
||||
aesdec %xmm9, %xmm1
|
||||
aesdec %xmm9, %xmm2
|
||||
aesdec %xmm9, %xmm3
|
||||
aesdec %xmm9, %xmm4
|
||||
aesdec %xmm10, %xmm1
|
||||
aesdec %xmm10, %xmm2
|
||||
aesdec %xmm10, %xmm3
|
||||
aesdec %xmm10, %xmm4
|
||||
jb DLAST_4
|
||||
movdqa 160(%r8), %xmm9
|
||||
movdqa 176(%r8), %xmm10
|
||||
movdqa 192(%r8), %xmm11
|
||||
cmpl $14, %r9d
|
||||
aesdec %xmm9, %xmm1
|
||||
aesdec %xmm9, %xmm2
|
||||
aesdec %xmm9, %xmm3
|
||||
aesdec %xmm9, %xmm4
|
||||
aesdec %xmm10, %xmm1
|
||||
aesdec %xmm10, %xmm2
|
||||
aesdec %xmm10, %xmm3
|
||||
aesdec %xmm10, %xmm4
|
||||
jb DLAST_4
|
||||
|
||||
movdqa 192(%r8), %xmm9
|
||||
movdqa 208(%r8), %xmm10
|
||||
movdqa 224(%r8), %xmm11
|
||||
aesdec %xmm9, %xmm1
|
||||
aesdec %xmm9, %xmm2
|
||||
aesdec %xmm9, %xmm3
|
||||
aesdec %xmm9, %xmm4
|
||||
aesdec %xmm10, %xmm1
|
||||
aesdec %xmm10, %xmm2
|
||||
aesdec %xmm10, %xmm3
|
||||
aesdec %xmm10, %xmm4
|
||||
DLAST_4:
|
||||
addq $64, %rdi
|
||||
addq $64, %rsi
|
||||
decq %rcx
|
||||
aesdeclast %xmm11, %xmm1
|
||||
aesdeclast %xmm11, %xmm2
|
||||
aesdeclast %xmm11, %xmm3
|
||||
aesdeclast %xmm11, %xmm4
|
||||
pxor %xmm5 ,%xmm1
|
||||
pxor %xmm6 ,%xmm2
|
||||
pxor %xmm7 ,%xmm3
|
||||
pxor %xmm8 ,%xmm4
|
||||
movdqu %xmm1, (%rsi)
|
||||
movdqu %xmm2, 16(%rsi)
|
||||
movdqu %xmm3, 32(%rsi)
|
||||
movdqu %xmm4, 48(%rsi)
|
||||
movdqa %xmm15,%xmm5
|
||||
jne DLOOP_4
|
||||
addq $64, %rsi
|
||||
DREMAINDER_4:
|
||||
cmpq $0, %r10
|
||||
je DEND_4
|
||||
DLOOP_4_2:
|
||||
movdqu (%rdi), %xmm1
|
||||
movdqa %xmm1 ,%xmm15
|
||||
addq $16, %rdi
|
||||
pxor (%r8), %xmm1
|
||||
movdqu 160(%r8), %xmm2
|
||||
cmpl $12, %r9d
|
||||
aesdec 16(%r8), %xmm1
|
||||
aesdec 32(%r8), %xmm1
|
||||
aesdec 48(%r8), %xmm1
|
||||
aesdec 64(%r8), %xmm1
|
||||
aesdec 80(%r8), %xmm1
|
||||
aesdec 96(%r8), %xmm1
|
||||
aesdec 112(%r8), %xmm1
|
||||
aesdec 128(%r8), %xmm1
|
||||
aesdec 144(%r8), %xmm1
|
||||
jb DLAST_4_2
|
||||
movdqu 192(%r8), %xmm2
|
||||
cmpl $14, %r9d
|
||||
aesdec 160(%r8), %xmm1
|
||||
aesdec 176(%r8), %xmm1
|
||||
jb DLAST_4_2
|
||||
movdqu 224(%r8), %xmm2
|
||||
aesdec 192(%r8), %xmm1
|
||||
aesdec 208(%r8), %xmm1
|
||||
DLAST_4_2:
|
||||
aesdeclast %xmm2, %xmm1
|
||||
pxor %xmm5, %xmm1
|
||||
movdqa %xmm15, %xmm5
|
||||
movdqu %xmm1, (%rsi)
|
||||
|
||||
addq $16, %rsi
|
||||
decq %r10
|
||||
jne DLOOP_4_2
|
||||
DEND_4:
|
||||
ret
|
||||
|
||||
|
||||
/*
|
||||
AES_ECB_encrypt (const unsigned char *in,
|
||||
unsigned char *out,
|
||||
unsigned long length,
|
||||
const unsigned char *KS,
|
||||
int nr)
|
||||
*/
|
||||
.globl AES_ECB_encrypt
|
||||
AES_ECB_encrypt:
|
||||
# parameter 1: %rdi
|
||||
# parameter 2: %rsi
|
||||
# parameter 3: %rdx
|
||||
# parameter 4: %rcx
|
||||
# parameter 5: %r8d
|
||||
movq %rdx, %r10
|
||||
shrq $4, %rdx
|
||||
shlq $60, %r10
|
||||
je EECB_NO_PARTS_4
|
||||
addq $1, %rdx
|
||||
EECB_NO_PARTS_4:
|
||||
movq %rdx, %r10
|
||||
shlq $62, %r10
|
||||
shrq $62, %r10
|
||||
shrq $2, %rdx
|
||||
je EECB_REMAINDER_4
|
||||
subq $64, %rsi
|
||||
EECB_LOOP_4:
|
||||
movdqu (%rdi), %xmm1
|
||||
movdqu 16(%rdi), %xmm2
|
||||
movdqu 32(%rdi), %xmm3
|
||||
movdqu 48(%rdi), %xmm4
|
||||
movdqa (%rcx), %xmm9
|
||||
movdqa 16(%rcx), %xmm10
|
||||
movdqa 32(%rcx), %xmm11
|
||||
movdqa 48(%rcx), %xmm12
|
||||
pxor %xmm9, %xmm1
|
||||
pxor %xmm9, %xmm2
|
||||
pxor %xmm9, %xmm3
|
||||
pxor %xmm9, %xmm4
|
||||
aesenc %xmm10, %xmm1
|
||||
aesenc %xmm10, %xmm2
|
||||
aesenc %xmm10, %xmm3
|
||||
aesenc %xmm10, %xmm4
|
||||
aesenc %xmm11, %xmm1
|
||||
aesenc %xmm11, %xmm2
|
||||
aesenc %xmm11, %xmm3
|
||||
aesenc %xmm11, %xmm4
|
||||
aesenc %xmm12, %xmm1
|
||||
aesenc %xmm12, %xmm2
|
||||
aesenc %xmm12, %xmm3
|
||||
aesenc %xmm12, %xmm4
|
||||
movdqa 64(%rcx), %xmm9
|
||||
movdqa 80(%rcx), %xmm10
|
||||
movdqa 96(%rcx), %xmm11
|
||||
movdqa 112(%rcx), %xmm12
|
||||
aesenc %xmm9, %xmm1
|
||||
aesenc %xmm9, %xmm2
|
||||
aesenc %xmm9, %xmm3
|
||||
aesenc %xmm9, %xmm4
|
||||
aesenc %xmm10, %xmm1
|
||||
aesenc %xmm10, %xmm2
|
||||
aesenc %xmm10, %xmm3
|
||||
aesenc %xmm10, %xmm4
|
||||
aesenc %xmm11, %xmm1
|
||||
aesenc %xmm11, %xmm2
|
||||
aesenc %xmm11, %xmm3
|
||||
aesenc %xmm11, %xmm4
|
||||
aesenc %xmm12, %xmm1
|
||||
aesenc %xmm12, %xmm2
|
||||
aesenc %xmm12, %xmm3
|
||||
aesenc %xmm12, %xmm4
|
||||
movdqa 128(%rcx), %xmm9
|
||||
movdqa 144(%rcx), %xmm10
|
||||
movdqa 160(%rcx), %xmm11
|
||||
cmpl $12, %r8d
|
||||
aesenc %xmm9, %xmm1
|
||||
aesenc %xmm9, %xmm2
|
||||
aesenc %xmm9, %xmm3
|
||||
aesenc %xmm9, %xmm4
|
||||
aesenc %xmm10, %xmm1
|
||||
aesenc %xmm10, %xmm2
|
||||
aesenc %xmm10, %xmm3
|
||||
aesenc %xmm10, %xmm4
|
||||
jb EECB_LAST_4
|
||||
movdqa 160(%rcx), %xmm9
|
||||
movdqa 176(%rcx), %xmm10
|
||||
movdqa 192(%rcx), %xmm11
|
||||
cmpl $14, %r8d
|
||||
aesenc %xmm9, %xmm1
|
||||
aesenc %xmm9, %xmm2
|
||||
aesenc %xmm9, %xmm3
|
||||
aesenc %xmm9, %xmm4
|
||||
aesenc %xmm10, %xmm1
|
||||
aesenc %xmm10, %xmm2
|
||||
aesenc %xmm10, %xmm3
|
||||
aesenc %xmm10, %xmm4
|
||||
jb EECB_LAST_4
|
||||
movdqa 192(%rcx), %xmm9
|
||||
movdqa 208(%rcx), %xmm10
|
||||
movdqa 224(%rcx), %xmm11
|
||||
aesenc %xmm9, %xmm1
|
||||
aesenc %xmm9, %xmm2
|
||||
aesenc %xmm9, %xmm3
|
||||
aesenc %xmm9, %xmm4
|
||||
aesenc %xmm10, %xmm1
|
||||
aesenc %xmm10, %xmm2
|
||||
aesenc %xmm10, %xmm3
|
||||
aesenc %xmm10, %xmm4
|
||||
EECB_LAST_4:
|
||||
addq $64, %rdi
|
||||
addq $64, %rsi
|
||||
decq %rdx
|
||||
aesenclast %xmm11, %xmm1
|
||||
aesenclast %xmm11, %xmm2
|
||||
aesenclast %xmm11, %xmm3
|
||||
aesenclast %xmm11, %xmm4
|
||||
movdqu %xmm1, (%rsi)
|
||||
movdqu %xmm2, 16(%rsi)
|
||||
movdqu %xmm3, 32(%rsi)
|
||||
movdqu %xmm4, 48(%rsi)
|
||||
jne EECB_LOOP_4
|
||||
addq $64, %rsi
|
||||
EECB_REMAINDER_4:
|
||||
cmpq $0, %r10
|
||||
je EECB_END_4
|
||||
EECB_LOOP_4_2:
|
||||
movdqu (%rdi), %xmm1
|
||||
addq $16, %rdi
|
||||
pxor (%rcx), %xmm1
|
||||
movdqu 160(%rcx), %xmm2
|
||||
aesenc 16(%rcx), %xmm1
|
||||
aesenc 32(%rcx), %xmm1
|
||||
aesenc 48(%rcx), %xmm1
|
||||
aesenc 64(%rcx), %xmm1
|
||||
aesenc 80(%rcx), %xmm1
|
||||
aesenc 96(%rcx), %xmm1
|
||||
aesenc 112(%rcx), %xmm1
|
||||
aesenc 128(%rcx), %xmm1
|
||||
aesenc 144(%rcx), %xmm1
|
||||
cmpl $12, %r8d
|
||||
jb EECB_LAST_4_2
|
||||
movdqu 192(%rcx), %xmm2
|
||||
aesenc 160(%rcx), %xmm1
|
||||
aesenc 176(%rcx), %xmm1
|
||||
cmpl $14, %r8d
|
||||
jb EECB_LAST_4_2
|
||||
movdqu 224(%rcx), %xmm2
|
||||
aesenc 192(%rcx), %xmm1
|
||||
aesenc 208(%rcx), %xmm1
|
||||
EECB_LAST_4_2:
|
||||
aesenclast %xmm2, %xmm1
|
||||
movdqu %xmm1, (%rsi)
|
||||
addq $16, %rsi
|
||||
decq %r10
|
||||
jne EECB_LOOP_4_2
|
||||
EECB_END_4:
|
||||
ret
|
||||
|
||||
|
||||
/*
|
||||
AES_ECB_decrypt (const unsigned char *in,
|
||||
unsigned char *out,
|
||||
unsigned long length,
|
||||
const unsigned char *KS,
|
||||
int nr)
|
||||
*/
|
||||
.globl AES_ECB_decrypt
|
||||
AES_ECB_decrypt:
|
||||
# parameter 1: %rdi
|
||||
# parameter 2: %rsi
|
||||
# parameter 3: %rdx
|
||||
# parameter 4: %rcx
|
||||
# parameter 5: %r8d
|
||||
|
||||
movq %rdx, %r10
|
||||
shrq $4, %rdx
|
||||
shlq $60, %r10
|
||||
je DECB_NO_PARTS_4
|
||||
addq $1, %rdx
|
||||
DECB_NO_PARTS_4:
|
||||
movq %rdx, %r10
|
||||
shlq $62, %r10
|
||||
shrq $62, %r10
|
||||
shrq $2, %rdx
|
||||
je DECB_REMAINDER_4
|
||||
subq $64, %rsi
|
||||
DECB_LOOP_4:
|
||||
movdqu (%rdi), %xmm1
|
||||
movdqu 16(%rdi), %xmm2
|
||||
movdqu 32(%rdi), %xmm3
|
||||
movdqu 48(%rdi), %xmm4
|
||||
movdqa (%rcx), %xmm9
|
||||
movdqa 16(%rcx), %xmm10
|
||||
movdqa 32(%rcx), %xmm11
|
||||
movdqa 48(%rcx), %xmm12
|
||||
pxor %xmm9, %xmm1
|
||||
pxor %xmm9, %xmm2
|
||||
pxor %xmm9, %xmm3
|
||||
pxor %xmm9, %xmm4
|
||||
aesdec %xmm10, %xmm1
|
||||
aesdec %xmm10, %xmm2
|
||||
aesdec %xmm10, %xmm3
|
||||
aesdec %xmm10, %xmm4
|
||||
aesdec %xmm11, %xmm1
|
||||
aesdec %xmm11, %xmm2
|
||||
aesdec %xmm11, %xmm3
|
||||
aesdec %xmm11, %xmm4
|
||||
aesdec %xmm12, %xmm1
|
||||
aesdec %xmm12, %xmm2
|
||||
aesdec %xmm12, %xmm3
|
||||
aesdec %xmm12, %xmm4
|
||||
movdqa 64(%rcx), %xmm9
|
||||
movdqa 80(%rcx), %xmm10
|
||||
movdqa 96(%rcx), %xmm11
|
||||
movdqa 112(%rcx), %xmm12
|
||||
aesdec %xmm9, %xmm1
|
||||
aesdec %xmm9, %xmm2
|
||||
aesdec %xmm9, %xmm3
|
||||
aesdec %xmm9, %xmm4
|
||||
aesdec %xmm10, %xmm1
|
||||
aesdec %xmm10, %xmm2
|
||||
aesdec %xmm10, %xmm3
|
||||
aesdec %xmm10, %xmm4
|
||||
aesdec %xmm11, %xmm1
|
||||
aesdec %xmm11, %xmm2
|
||||
aesdec %xmm11, %xmm3
|
||||
aesdec %xmm11, %xmm4
|
||||
aesdec %xmm12, %xmm1
|
||||
aesdec %xmm12, %xmm2
|
||||
aesdec %xmm12, %xmm3
|
||||
aesdec %xmm12, %xmm4
|
||||
movdqa 128(%rcx), %xmm9
|
||||
movdqa 144(%rcx), %xmm10
|
||||
movdqa 160(%rcx), %xmm11
|
||||
cmpl $12, %r8d
|
||||
aesdec %xmm9, %xmm1
|
||||
aesdec %xmm9, %xmm2
|
||||
aesdec %xmm9, %xmm3
|
||||
aesdec %xmm9, %xmm4
|
||||
aesdec %xmm10, %xmm1
|
||||
aesdec %xmm10, %xmm2
|
||||
aesdec %xmm10, %xmm3
|
||||
aesdec %xmm10, %xmm4
|
||||
jb DECB_LAST_4
|
||||
movdqa 160(%rcx), %xmm9
|
||||
movdqa 176(%rcx), %xmm10
|
||||
movdqa 192(%rcx), %xmm11
|
||||
cmpl $14, %r8d
|
||||
aesdec %xmm9, %xmm1
|
||||
aesdec %xmm9, %xmm2
|
||||
aesdec %xmm9, %xmm3
|
||||
aesdec %xmm9, %xmm4
|
||||
aesdec %xmm10, %xmm1
|
||||
aesdec %xmm10, %xmm2
|
||||
aesdec %xmm10, %xmm3
|
||||
aesdec %xmm10, %xmm4
|
||||
jb DECB_LAST_4
|
||||
movdqa 192(%rcx), %xmm9
|
||||
movdqa 208(%rcx), %xmm10
|
||||
movdqa 224(%rcx), %xmm11
|
||||
aesdec %xmm9, %xmm1
|
||||
aesdec %xmm9, %xmm2
|
||||
aesdec %xmm9, %xmm3
|
||||
aesdec %xmm9, %xmm4
|
||||
aesdec %xmm10, %xmm1
|
||||
aesdec %xmm10, %xmm2
|
||||
aesdec %xmm10, %xmm3
|
||||
aesdec %xmm10, %xmm4
|
||||
DECB_LAST_4:
|
||||
addq $64, %rdi
|
||||
addq $64, %rsi
|
||||
decq %rdx
|
||||
aesdeclast %xmm11, %xmm1
|
||||
aesdeclast %xmm11, %xmm2
|
||||
aesdeclast %xmm11, %xmm3
|
||||
aesdeclast %xmm11, %xmm4
|
||||
movdqu %xmm1, (%rsi)
|
||||
movdqu %xmm2, 16(%rsi)
|
||||
movdqu %xmm3, 32(%rsi)
|
||||
movdqu %xmm4, 48(%rsi)
|
||||
jne DECB_LOOP_4
|
||||
addq $64, %rsi
|
||||
DECB_REMAINDER_4:
|
||||
cmpq $0, %r10
|
||||
je DECB_END_4
|
||||
DECB_LOOP_4_2:
|
||||
movdqu (%rdi), %xmm1
|
||||
addq $16, %rdi
|
||||
pxor (%rcx), %xmm1
|
||||
movdqu 160(%rcx), %xmm2
|
||||
cmpl $12, %r8d
|
||||
aesdec 16(%rcx), %xmm1
|
||||
aesdec 32(%rcx), %xmm1
|
||||
aesdec 48(%rcx), %xmm1
|
||||
aesdec 64(%rcx), %xmm1
|
||||
aesdec 80(%rcx), %xmm1
|
||||
aesdec 96(%rcx), %xmm1
|
||||
aesdec 112(%rcx), %xmm1
|
||||
aesdec 128(%rcx), %xmm1
|
||||
aesdec 144(%rcx), %xmm1
|
||||
jb DECB_LAST_4_2
|
||||
cmpl $14, %r8d
|
||||
movdqu 192(%rcx), %xmm2
|
||||
aesdec 160(%rcx), %xmm1
|
||||
aesdec 176(%rcx), %xmm1
|
||||
jb DECB_LAST_4_2
|
||||
movdqu 224(%rcx), %xmm2
|
||||
aesdec 192(%rcx), %xmm1
|
||||
aesdec 208(%rcx), %xmm1
|
||||
DECB_LAST_4_2:
|
||||
aesdeclast %xmm2, %xmm1
|
||||
movdqu %xmm1, (%rsi)
|
||||
addq $16, %rsi
|
||||
decq %r10
|
||||
jne DECB_LOOP_4_2
|
||||
DECB_END_4:
|
||||
ret
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
void AES_128_Key_Expansion(const unsigned char* userkey,
|
||||
unsigned char* key_schedule);
|
||||
*/
|
||||
.align 16,0x90
|
||||
.globl AES_128_Key_Expansion
|
||||
AES_128_Key_Expansion:
|
||||
# parameter 1: %rdi
|
||||
# parameter 2: %rsi
|
||||
movl $10, 240(%rsi)
|
||||
|
||||
movdqu (%rdi), %xmm1
|
||||
movdqa %xmm1, (%rsi)
|
||||
|
||||
|
||||
ASSISTS:
|
||||
aeskeygenassist $1, %xmm1, %xmm2
|
||||
call PREPARE_ROUNDKEY_128
|
||||
movdqa %xmm1, 16(%rsi)
|
||||
aeskeygenassist $2, %xmm1, %xmm2
|
||||
call PREPARE_ROUNDKEY_128
|
||||
movdqa %xmm1, 32(%rsi)
|
||||
aeskeygenassist $4, %xmm1, %xmm2
|
||||
call PREPARE_ROUNDKEY_128
|
||||
movdqa %xmm1, 48(%rsi)
|
||||
aeskeygenassist $8, %xmm1, %xmm2
|
||||
call PREPARE_ROUNDKEY_128
|
||||
movdqa %xmm1, 64(%rsi)
|
||||
aeskeygenassist $16, %xmm1, %xmm2
|
||||
call PREPARE_ROUNDKEY_128
|
||||
movdqa %xmm1, 80(%rsi)
|
||||
aeskeygenassist $32, %xmm1, %xmm2
|
||||
call PREPARE_ROUNDKEY_128
|
||||
movdqa %xmm1, 96(%rsi)
|
||||
aeskeygenassist $64, %xmm1, %xmm2
|
||||
call PREPARE_ROUNDKEY_128
|
||||
movdqa %xmm1, 112(%rsi)
|
||||
aeskeygenassist $0x80, %xmm1, %xmm2
|
||||
call PREPARE_ROUNDKEY_128
|
||||
movdqa %xmm1, 128(%rsi)
|
||||
aeskeygenassist $0x1b, %xmm1, %xmm2
|
||||
call PREPARE_ROUNDKEY_128
|
||||
movdqa %xmm1, 144(%rsi)
|
||||
aeskeygenassist $0x36, %xmm1, %xmm2
|
||||
call PREPARE_ROUNDKEY_128
|
||||
movdqa %xmm1, 160(%rsi)
|
||||
ret
|
||||
|
||||
PREPARE_ROUNDKEY_128:
|
||||
pshufd $255, %xmm2, %xmm2
|
||||
movdqa %xmm1, %xmm3
|
||||
pslldq $4, %xmm3
|
||||
pxor %xmm3, %xmm1
|
||||
pslldq $4, %xmm3
|
||||
pxor %xmm3, %xmm1
|
||||
pslldq $4, %xmm3
|
||||
pxor %xmm3, %xmm1
|
||||
pxor %xmm2, %xmm1
|
||||
ret
|
||||
|
||||
|
||||
/*
|
||||
void AES_192_Key_Expansion (const unsigned char *userkey,
|
||||
unsigned char *key)
|
||||
*/
|
||||
.globl AES_192_Key_Expansion
|
||||
AES_192_Key_Expansion:
|
||||
# parameter 1: %rdi
|
||||
# parameter 2: %rsi
|
||||
|
||||
movdqu (%rdi), %xmm1
|
||||
movdqu 16(%rdi), %xmm3
|
||||
movdqa %xmm1, (%rsi)
|
||||
movdqa %xmm3, %xmm5
|
||||
|
||||
aeskeygenassist $0x1, %xmm3, %xmm2
|
||||
call PREPARE_ROUNDKEY_192
|
||||
shufpd $0, %xmm1, %xmm5
|
||||
movdqa %xmm5, 16(%rsi)
|
||||
movdqa %xmm1, %xmm6
|
||||
shufpd $1, %xmm3, %xmm6
|
||||
movdqa %xmm6, 32(%rsi)
|
||||
|
||||
aeskeygenassist $0x2, %xmm3, %xmm2
|
||||
call PREPARE_ROUNDKEY_192
|
||||
movdqa %xmm1, 48(%rsi)
|
||||
movdqa %xmm3, %xmm5
|
||||
|
||||
aeskeygenassist $0x4, %xmm3, %xmm2
|
||||
call PREPARE_ROUNDKEY_192
|
||||
shufpd $0, %xmm1, %xmm5
|
||||
movdqa %xmm5, 64(%rsi)
|
||||
movdqa %xmm1, %xmm6
|
||||
shufpd $1, %xmm3, %xmm6
|
||||
movdqa %xmm6, 80(%rsi)
|
||||
|
||||
aeskeygenassist $0x8, %xmm3, %xmm2
|
||||
call PREPARE_ROUNDKEY_192
|
||||
movdqa %xmm1, 96(%rsi)
|
||||
movdqa %xmm3, %xmm5
|
||||
|
||||
aeskeygenassist $0x10, %xmm3, %xmm2
|
||||
call PREPARE_ROUNDKEY_192
|
||||
shufpd $0, %xmm1, %xmm5
|
||||
movdqa %xmm5, 112(%rsi)
|
||||
movdqa %xmm1, %xmm6
|
||||
shufpd $1, %xmm3, %xmm6
|
||||
movdqa %xmm6, 128(%rsi)
|
||||
|
||||
aeskeygenassist $0x20, %xmm3, %xmm2
|
||||
call PREPARE_ROUNDKEY_192
|
||||
movdqa %xmm1, 144(%rsi)
|
||||
movdqa %xmm3, %xmm5
|
||||
|
||||
aeskeygenassist $0x40, %xmm3, %xmm2
|
||||
call PREPARE_ROUNDKEY_192
|
||||
shufpd $0, %xmm1, %xmm5
|
||||
movdqa %xmm5, 160(%rsi)
|
||||
movdqa %xmm1, %xmm6
|
||||
shufpd $1, %xmm3, %xmm6
|
||||
movdqa %xmm6, 176(%rsi)
|
||||
|
||||
aeskeygenassist $0x80, %xmm3, %xmm2
|
||||
call PREPARE_ROUNDKEY_192
|
||||
movdqa %xmm1, 192(%rsi)
|
||||
movdqa %xmm3, 208(%rsi)
|
||||
ret
|
||||
|
||||
PREPARE_ROUNDKEY_192:
|
||||
pshufd $0x55, %xmm2, %xmm2
|
||||
movdqu %xmm1, %xmm4
|
||||
pslldq $4, %xmm4
|
||||
pxor %xmm4, %xmm1
|
||||
|
||||
pslldq $4, %xmm4
|
||||
pxor %xmm4, %xmm1
|
||||
pslldq $4, %xmm4
|
||||
pxor %xmm4, %xmm1
|
||||
pxor %xmm2, %xmm1
|
||||
pshufd $0xff, %xmm1, %xmm2
|
||||
movdqu %xmm3, %xmm4
|
||||
pslldq $4, %xmm4
|
||||
pxor %xmm4, %xmm3
|
||||
pxor %xmm2, %xmm3
|
||||
ret
|
||||
|
||||
|
||||
/*
|
||||
void AES_256_Key_Expansion (const unsigned char *userkey,
|
||||
unsigned char *key)
|
||||
*/
|
||||
.globl AES_256_Key_Expansion
|
||||
AES_256_Key_Expansion:
|
||||
# parameter 1: %rdi
|
||||
# parameter 2: %rsi
|
||||
|
||||
movdqu (%rdi), %xmm1
|
||||
movdqu 16(%rdi), %xmm3
|
||||
movdqa %xmm1, (%rsi)
|
||||
movdqa %xmm3, 16(%rsi)
|
||||
|
||||
aeskeygenassist $0x1, %xmm3, %xmm2
|
||||
call MAKE_RK256_a
|
||||
movdqa %xmm1, 32(%rsi)
|
||||
aeskeygenassist $0x0, %xmm1, %xmm2
|
||||
call MAKE_RK256_b
|
||||
movdqa %xmm3, 48(%rsi)
|
||||
aeskeygenassist $0x2, %xmm3, %xmm2
|
||||
call MAKE_RK256_a
|
||||
movdqa %xmm1, 64(%rsi)
|
||||
aeskeygenassist $0x0, %xmm1, %xmm2
|
||||
call MAKE_RK256_b
|
||||
movdqa %xmm3, 80(%rsi)
|
||||
aeskeygenassist $0x4, %xmm3, %xmm2
|
||||
call MAKE_RK256_a
|
||||
movdqa %xmm1, 96(%rsi)
|
||||
aeskeygenassist $0x0, %xmm1, %xmm2
|
||||
call MAKE_RK256_b
|
||||
movdqa %xmm3, 112(%rsi)
|
||||
aeskeygenassist $0x8, %xmm3, %xmm2
|
||||
call MAKE_RK256_a
|
||||
movdqa %xmm1, 128(%rsi)
|
||||
aeskeygenassist $0x0, %xmm1, %xmm2
|
||||
call MAKE_RK256_b
|
||||
movdqa %xmm3, 144(%rsi)
|
||||
aeskeygenassist $0x10, %xmm3, %xmm2
|
||||
call MAKE_RK256_a
|
||||
movdqa %xmm1, 160(%rsi)
|
||||
aeskeygenassist $0x0, %xmm1, %xmm2
|
||||
call MAKE_RK256_b
|
||||
movdqa %xmm3, 176(%rsi)
|
||||
aeskeygenassist $0x20, %xmm3, %xmm2
|
||||
call MAKE_RK256_a
|
||||
movdqa %xmm1, 192(%rsi)
|
||||
|
||||
aeskeygenassist $0x0, %xmm1, %xmm2
|
||||
call MAKE_RK256_b
|
||||
movdqa %xmm3, 208(%rsi)
|
||||
aeskeygenassist $0x40, %xmm3, %xmm2
|
||||
call MAKE_RK256_a
|
||||
movdqa %xmm1, 224(%rsi)
|
||||
|
||||
ret
|
||||
|
||||
MAKE_RK256_a:
|
||||
pshufd $0xff, %xmm2, %xmm2
|
||||
movdqa %xmm1, %xmm4
|
||||
pslldq $4, %xmm4
|
||||
pxor %xmm4, %xmm1
|
||||
pslldq $4, %xmm4
|
||||
pxor %xmm4, %xmm1
|
||||
pslldq $4, %xmm4
|
||||
pxor %xmm4, %xmm1
|
||||
pxor %xmm2, %xmm1
|
||||
ret
|
||||
|
||||
MAKE_RK256_b:
|
||||
pshufd $0xaa, %xmm2, %xmm2
|
||||
movdqa %xmm3, %xmm4
|
||||
pslldq $4, %xmm4
|
||||
pxor %xmm4, %xmm3
|
||||
pslldq $4, %xmm4
|
||||
pxor %xmm4, %xmm3
|
||||
pslldq $4, %xmm4
|
||||
pxor %xmm4, %xmm3
|
||||
pxor %xmm2, %xmm3
|
||||
ret
|
||||
|
||||
179
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/arc4.c
Normal file
179
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/arc4.c
Normal file
|
|
@ -0,0 +1,179 @@
|
|||
/* arc4.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>
|
||||
|
||||
#ifndef NO_RC4
|
||||
|
||||
#include <cyassl/ctaocrypt/arc4.h>
|
||||
|
||||
|
||||
#ifdef HAVE_CAVIUM
|
||||
static void Arc4CaviumSetKey(Arc4* arc4, const byte* key, word32 length);
|
||||
static void Arc4CaviumProcess(Arc4* arc4, byte* out, const byte* in,
|
||||
word32 length);
|
||||
#endif
|
||||
|
||||
|
||||
void Arc4SetKey(Arc4* arc4, const byte* key, word32 length)
|
||||
{
|
||||
word32 i;
|
||||
word32 keyIndex = 0, stateIndex = 0;
|
||||
|
||||
#ifdef HAVE_CAVIUM
|
||||
if (arc4->magic == CYASSL_ARC4_CAVIUM_MAGIC)
|
||||
return Arc4CaviumSetKey(arc4, key, length);
|
||||
#endif
|
||||
|
||||
arc4->x = 1;
|
||||
arc4->y = 0;
|
||||
|
||||
for (i = 0; i < ARC4_STATE_SIZE; i++)
|
||||
arc4->state[i] = (byte)i;
|
||||
|
||||
for (i = 0; i < ARC4_STATE_SIZE; i++) {
|
||||
word32 a = arc4->state[i];
|
||||
stateIndex += key[keyIndex] + a;
|
||||
stateIndex &= 0xFF;
|
||||
arc4->state[i] = arc4->state[stateIndex];
|
||||
arc4->state[stateIndex] = (byte)a;
|
||||
|
||||
if (++keyIndex >= length)
|
||||
keyIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static INLINE byte MakeByte(word32* x, word32* y, byte* s)
|
||||
{
|
||||
word32 a = s[*x], b;
|
||||
*y = (*y+a) & 0xff;
|
||||
|
||||
b = s[*y];
|
||||
s[*x] = (byte)b;
|
||||
s[*y] = (byte)a;
|
||||
*x = (*x+1) & 0xff;
|
||||
|
||||
return s[(a+b) & 0xff];
|
||||
}
|
||||
|
||||
|
||||
void Arc4Process(Arc4* arc4, byte* out, const byte* in, word32 length)
|
||||
{
|
||||
word32 x;
|
||||
word32 y;
|
||||
|
||||
#ifdef HAVE_CAVIUM
|
||||
if (arc4->magic == CYASSL_ARC4_CAVIUM_MAGIC)
|
||||
return Arc4CaviumProcess(arc4, out, in, length);
|
||||
#endif
|
||||
|
||||
x = arc4->x;
|
||||
y = arc4->y;
|
||||
|
||||
while(length--)
|
||||
*out++ = *in++ ^ MakeByte(&x, &y, arc4->state);
|
||||
|
||||
arc4->x = (byte)x;
|
||||
arc4->y = (byte)y;
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_CAVIUM
|
||||
|
||||
#include <cyassl/ctaocrypt/logging.h>
|
||||
#include "cavium_common.h"
|
||||
|
||||
/* Initiliaze Arc4 for use with Nitrox device */
|
||||
int Arc4InitCavium(Arc4* arc4, int devId)
|
||||
{
|
||||
if (arc4 == NULL)
|
||||
return -1;
|
||||
|
||||
if (CspAllocContext(CONTEXT_SSL, &arc4->contextHandle, devId) != 0)
|
||||
return -1;
|
||||
|
||||
arc4->devId = devId;
|
||||
arc4->magic = CYASSL_ARC4_CAVIUM_MAGIC;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Free Arc4 from use with Nitrox device */
|
||||
void Arc4FreeCavium(Arc4* arc4)
|
||||
{
|
||||
if (arc4 == NULL)
|
||||
return;
|
||||
|
||||
if (arc4->magic != CYASSL_ARC4_CAVIUM_MAGIC)
|
||||
return;
|
||||
|
||||
CspFreeContext(CONTEXT_SSL, arc4->contextHandle, arc4->devId);
|
||||
arc4->magic = 0;
|
||||
}
|
||||
|
||||
|
||||
static void Arc4CaviumSetKey(Arc4* arc4, const byte* key, word32 length)
|
||||
{
|
||||
word32 requestId;
|
||||
|
||||
if (CspInitializeRc4(CAVIUM_BLOCKING, arc4->contextHandle, length,
|
||||
(byte*)key, &requestId, arc4->devId) != 0) {
|
||||
CYASSL_MSG("Bad Cavium Arc4 Init");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void Arc4CaviumProcess(Arc4* arc4, byte* out, const byte* in,
|
||||
word32 length)
|
||||
{
|
||||
word offset = 0;
|
||||
word32 requestId;
|
||||
|
||||
while (length > CYASSL_MAX_16BIT) {
|
||||
word16 slen = (word16)CYASSL_MAX_16BIT;
|
||||
if (CspEncryptRc4(CAVIUM_BLOCKING, arc4->contextHandle,CAVIUM_UPDATE,
|
||||
slen, (byte*)in + offset, out + offset, &requestId,
|
||||
arc4->devId) != 0) {
|
||||
CYASSL_MSG("Bad Cavium Arc4 Encrypt");
|
||||
}
|
||||
length -= CYASSL_MAX_16BIT;
|
||||
offset += CYASSL_MAX_16BIT;
|
||||
}
|
||||
if (length) {
|
||||
word16 slen = (word16)length;
|
||||
if (CspEncryptRc4(CAVIUM_BLOCKING, arc4->contextHandle,CAVIUM_UPDATE,
|
||||
slen, (byte*)in + offset, out + offset, &requestId,
|
||||
arc4->devId) != 0) {
|
||||
CYASSL_MSG("Bad Cavium Arc4 Encrypt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* HAVE_CAVIUM */
|
||||
|
||||
#endif /* NO_ARC4 */
|
||||
|
||||
1406
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/asm.c
Normal file
1406
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/asm.c
Normal file
File diff suppressed because it is too large
Load diff
7504
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/asn.c
Normal file
7504
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/asn.c
Normal file
File diff suppressed because it is too large
Load diff
433
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/blake2b.c
Normal file
433
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/blake2b.c
Normal file
|
|
@ -0,0 +1,433 @@
|
|||
/*
|
||||
BLAKE2 reference source code package - reference C implementations
|
||||
|
||||
Written in 2012 by Samuel Neves <sneves@dei.uc.pt>
|
||||
|
||||
To the extent possible under law, the author(s) have dedicated all copyright
|
||||
and related and neighboring rights to this software to the public domain
|
||||
worldwide. This software is distributed without any warranty.
|
||||
|
||||
You should have received a copy of the CC0 Public Domain Dedication along with
|
||||
this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
*/
|
||||
/* blake2b.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>
|
||||
|
||||
#ifdef HAVE_BLAKE2
|
||||
|
||||
#include <cyassl/ctaocrypt/blake2.h>
|
||||
#include <cyassl/ctaocrypt/blake2-impl.h>
|
||||
|
||||
|
||||
static const word64 blake2b_IV[8] =
|
||||
{
|
||||
0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL,
|
||||
0x3c6ef372fe94f82bULL, 0xa54ff53a5f1d36f1ULL,
|
||||
0x510e527fade682d1ULL, 0x9b05688c2b3e6c1fULL,
|
||||
0x1f83d9abfb41bd6bULL, 0x5be0cd19137e2179ULL
|
||||
};
|
||||
|
||||
static const byte blake2b_sigma[12][16] =
|
||||
{
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } ,
|
||||
{ 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 } ,
|
||||
{ 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4 } ,
|
||||
{ 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8 } ,
|
||||
{ 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13 } ,
|
||||
{ 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9 } ,
|
||||
{ 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11 } ,
|
||||
{ 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10 } ,
|
||||
{ 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5 } ,
|
||||
{ 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13 , 0 } ,
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 } ,
|
||||
{ 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3 }
|
||||
};
|
||||
|
||||
|
||||
static INLINE int blake2b_set_lastnode( blake2b_state *S )
|
||||
{
|
||||
S->f[1] = ~0ULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Some helper functions, not necessarily useful */
|
||||
static INLINE int blake2b_set_lastblock( blake2b_state *S )
|
||||
{
|
||||
if( S->last_node ) blake2b_set_lastnode( S );
|
||||
|
||||
S->f[0] = ~0ULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static INLINE int blake2b_increment_counter( blake2b_state *S, const word64
|
||||
inc )
|
||||
{
|
||||
S->t[0] += inc;
|
||||
S->t[1] += ( S->t[0] < inc );
|
||||
return 0;
|
||||
}
|
||||
|
||||
static INLINE int blake2b_init0( blake2b_state *S )
|
||||
{
|
||||
int i;
|
||||
XMEMSET( S, 0, sizeof( blake2b_state ) );
|
||||
|
||||
for( i = 0; i < 8; ++i ) S->h[i] = blake2b_IV[i];
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* init xors IV with input parameter block */
|
||||
int blake2b_init_param( blake2b_state *S, const blake2b_param *P )
|
||||
{
|
||||
word32 i;
|
||||
blake2b_init0( S );
|
||||
byte *p = ( byte * )( P );
|
||||
|
||||
/* IV XOR ParamBlock */
|
||||
for( i = 0; i < 8; ++i )
|
||||
S->h[i] ^= load64( p + sizeof( S->h[i] ) * i );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int blake2b_init( blake2b_state *S, const byte outlen )
|
||||
{
|
||||
blake2b_param P[1];
|
||||
|
||||
if ( ( !outlen ) || ( outlen > BLAKE2B_OUTBYTES ) ) return -1;
|
||||
|
||||
P->digest_length = outlen;
|
||||
P->key_length = 0;
|
||||
P->fanout = 1;
|
||||
P->depth = 1;
|
||||
store32( &P->leaf_length, 0 );
|
||||
store64( &P->node_offset, 0 );
|
||||
P->node_depth = 0;
|
||||
P->inner_length = 0;
|
||||
XMEMSET( P->reserved, 0, sizeof( P->reserved ) );
|
||||
XMEMSET( P->salt, 0, sizeof( P->salt ) );
|
||||
XMEMSET( P->personal, 0, sizeof( P->personal ) );
|
||||
return blake2b_init_param( S, P );
|
||||
}
|
||||
|
||||
|
||||
int blake2b_init_key( blake2b_state *S, const byte outlen, const void *key,
|
||||
const byte keylen )
|
||||
{
|
||||
blake2b_param P[1];
|
||||
|
||||
if ( ( !outlen ) || ( outlen > BLAKE2B_OUTBYTES ) ) return -1;
|
||||
|
||||
if ( !key || !keylen || keylen > BLAKE2B_KEYBYTES ) return -1;
|
||||
|
||||
P->digest_length = outlen;
|
||||
P->key_length = keylen;
|
||||
P->fanout = 1;
|
||||
P->depth = 1;
|
||||
store32( &P->leaf_length, 0 );
|
||||
store64( &P->node_offset, 0 );
|
||||
P->node_depth = 0;
|
||||
P->inner_length = 0;
|
||||
XMEMSET( P->reserved, 0, sizeof( P->reserved ) );
|
||||
XMEMSET( P->salt, 0, sizeof( P->salt ) );
|
||||
XMEMSET( P->personal, 0, sizeof( P->personal ) );
|
||||
|
||||
if( blake2b_init_param( S, P ) < 0 ) return -1;
|
||||
|
||||
{
|
||||
#ifdef CYASSL_SMALL_STACK
|
||||
byte* block;
|
||||
|
||||
block = (byte*)XMALLOC(BLAKE2B_BLOCKBYTES, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
|
||||
if ( block == NULL ) return -1;
|
||||
#else
|
||||
byte block[BLAKE2B_BLOCKBYTES];
|
||||
#endif
|
||||
|
||||
XMEMSET( block, 0, BLAKE2B_BLOCKBYTES );
|
||||
XMEMCPY( block, key, keylen );
|
||||
blake2b_update( S, block, BLAKE2B_BLOCKBYTES );
|
||||
secure_zero_memory( block, BLAKE2B_BLOCKBYTES ); /* Burn the key from */
|
||||
/* memory */
|
||||
|
||||
#ifdef CYASSL_SMALL_STACK
|
||||
XFREE(block, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int blake2b_compress( blake2b_state *S,
|
||||
const byte block[BLAKE2B_BLOCKBYTES] )
|
||||
{
|
||||
int i;
|
||||
|
||||
#ifdef CYASSL_SMALL_STACK
|
||||
word64* m;
|
||||
word64* v;
|
||||
|
||||
m = (word64*)XMALLOC(sizeof(word64) * 16, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
|
||||
if ( m == NULL ) return -1;
|
||||
|
||||
v = (word64*)XMALLOC(sizeof(word64) * 16, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
|
||||
if ( v == NULL )
|
||||
{
|
||||
XFREE(m, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
return -1;
|
||||
}
|
||||
#else
|
||||
word64 m[16];
|
||||
word64 v[16];
|
||||
#endif
|
||||
|
||||
for( i = 0; i < 16; ++i )
|
||||
m[i] = load64( block + i * sizeof( m[i] ) );
|
||||
|
||||
for( i = 0; i < 8; ++i )
|
||||
v[i] = S->h[i];
|
||||
|
||||
v[ 8] = blake2b_IV[0];
|
||||
v[ 9] = blake2b_IV[1];
|
||||
v[10] = blake2b_IV[2];
|
||||
v[11] = blake2b_IV[3];
|
||||
v[12] = S->t[0] ^ blake2b_IV[4];
|
||||
v[13] = S->t[1] ^ blake2b_IV[5];
|
||||
v[14] = S->f[0] ^ blake2b_IV[6];
|
||||
v[15] = S->f[1] ^ blake2b_IV[7];
|
||||
#define G(r,i,a,b,c,d) \
|
||||
do { \
|
||||
a = a + b + m[blake2b_sigma[r][2*i+0]]; \
|
||||
d = rotr64(d ^ a, 32); \
|
||||
c = c + d; \
|
||||
b = rotr64(b ^ c, 24); \
|
||||
a = a + b + m[blake2b_sigma[r][2*i+1]]; \
|
||||
d = rotr64(d ^ a, 16); \
|
||||
c = c + d; \
|
||||
b = rotr64(b ^ c, 63); \
|
||||
} while(0)
|
||||
#define ROUND(r) \
|
||||
do { \
|
||||
G(r,0,v[ 0],v[ 4],v[ 8],v[12]); \
|
||||
G(r,1,v[ 1],v[ 5],v[ 9],v[13]); \
|
||||
G(r,2,v[ 2],v[ 6],v[10],v[14]); \
|
||||
G(r,3,v[ 3],v[ 7],v[11],v[15]); \
|
||||
G(r,4,v[ 0],v[ 5],v[10],v[15]); \
|
||||
G(r,5,v[ 1],v[ 6],v[11],v[12]); \
|
||||
G(r,6,v[ 2],v[ 7],v[ 8],v[13]); \
|
||||
G(r,7,v[ 3],v[ 4],v[ 9],v[14]); \
|
||||
} while(0)
|
||||
ROUND( 0 );
|
||||
ROUND( 1 );
|
||||
ROUND( 2 );
|
||||
ROUND( 3 );
|
||||
ROUND( 4 );
|
||||
ROUND( 5 );
|
||||
ROUND( 6 );
|
||||
ROUND( 7 );
|
||||
ROUND( 8 );
|
||||
ROUND( 9 );
|
||||
ROUND( 10 );
|
||||
ROUND( 11 );
|
||||
|
||||
for( i = 0; i < 8; ++i )
|
||||
S->h[i] = S->h[i] ^ v[i] ^ v[i + 8];
|
||||
|
||||
#undef G
|
||||
#undef ROUND
|
||||
|
||||
#ifdef CYASSL_SMALL_STACK
|
||||
XFREE(m, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
XFREE(v, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* inlen now in bytes */
|
||||
int blake2b_update( blake2b_state *S, const byte *in, word64 inlen )
|
||||
{
|
||||
while( inlen > 0 )
|
||||
{
|
||||
word64 left = S->buflen;
|
||||
word64 fill = 2 * BLAKE2B_BLOCKBYTES - left;
|
||||
|
||||
if( inlen > fill )
|
||||
{
|
||||
XMEMCPY( S->buf + left, in, (word)fill ); /* Fill buffer */
|
||||
S->buflen += fill;
|
||||
blake2b_increment_counter( S, BLAKE2B_BLOCKBYTES );
|
||||
|
||||
if ( blake2b_compress( S, S->buf ) < 0 ) return -1; /* Compress */
|
||||
|
||||
XMEMCPY( S->buf, S->buf + BLAKE2B_BLOCKBYTES, BLAKE2B_BLOCKBYTES );
|
||||
/* Shift buffer left */
|
||||
S->buflen -= BLAKE2B_BLOCKBYTES;
|
||||
in += fill;
|
||||
inlen -= fill;
|
||||
}
|
||||
else /* inlen <= fill */
|
||||
{
|
||||
XMEMCPY( S->buf + left, in, (word)inlen );
|
||||
S->buflen += inlen; /* Be lazy, do not compress */
|
||||
in += inlen;
|
||||
inlen -= inlen;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Is this correct? */
|
||||
int blake2b_final( blake2b_state *S, byte *out, byte outlen )
|
||||
{
|
||||
byte buffer[BLAKE2B_OUTBYTES];
|
||||
int i;
|
||||
|
||||
if( S->buflen > BLAKE2B_BLOCKBYTES )
|
||||
{
|
||||
blake2b_increment_counter( S, BLAKE2B_BLOCKBYTES );
|
||||
|
||||
if ( blake2b_compress( S, S->buf ) < 0 ) return -1;
|
||||
|
||||
S->buflen -= BLAKE2B_BLOCKBYTES;
|
||||
XMEMCPY( S->buf, S->buf + BLAKE2B_BLOCKBYTES, (word)S->buflen );
|
||||
}
|
||||
|
||||
blake2b_increment_counter( S, S->buflen );
|
||||
blake2b_set_lastblock( S );
|
||||
XMEMSET( S->buf + S->buflen, 0, (word)(2 * BLAKE2B_BLOCKBYTES - S->buflen) );
|
||||
/* Padding */
|
||||
if ( blake2b_compress( S, S->buf ) < 0 ) return -1;
|
||||
|
||||
for( i = 0; i < 8; ++i ) /* Output full hash to temp buffer */
|
||||
store64( buffer + sizeof( S->h[i] ) * i, S->h[i] );
|
||||
|
||||
XMEMCPY( out, buffer, outlen );
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* inlen, at least, should be word64. Others can be size_t. */
|
||||
int blake2b( byte *out, const void *in, const void *key, const byte outlen,
|
||||
const word64 inlen, byte keylen )
|
||||
{
|
||||
blake2b_state S[1];
|
||||
|
||||
/* Verify parameters */
|
||||
if ( NULL == in ) return -1;
|
||||
|
||||
if ( NULL == out ) return -1;
|
||||
|
||||
if( NULL == key ) keylen = 0;
|
||||
|
||||
if( keylen > 0 )
|
||||
{
|
||||
if( blake2b_init_key( S, outlen, key, keylen ) < 0 ) return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( blake2b_init( S, outlen ) < 0 ) return -1;
|
||||
}
|
||||
|
||||
if ( blake2b_update( S, ( byte * )in, inlen ) < 0) return -1;
|
||||
|
||||
return blake2b_final( S, out, outlen );
|
||||
}
|
||||
|
||||
#if defined(BLAKE2B_SELFTEST)
|
||||
#include <string.h>
|
||||
#include "blake2-kat.h"
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
byte key[BLAKE2B_KEYBYTES];
|
||||
byte buf[KAT_LENGTH];
|
||||
|
||||
for( word32 i = 0; i < BLAKE2B_KEYBYTES; ++i )
|
||||
key[i] = ( byte )i;
|
||||
|
||||
for( word32 i = 0; i < KAT_LENGTH; ++i )
|
||||
buf[i] = ( byte )i;
|
||||
|
||||
for( word32 i = 0; i < KAT_LENGTH; ++i )
|
||||
{
|
||||
byte hash[BLAKE2B_OUTBYTES];
|
||||
if ( blake2b( hash, buf, key, BLAKE2B_OUTBYTES, i, BLAKE2B_KEYBYTES ) < 0 )
|
||||
{
|
||||
puts( "error" );
|
||||
return -1;
|
||||
}
|
||||
|
||||
if( 0 != memcmp( hash, blake2b_keyed_kat[i], BLAKE2B_OUTBYTES ) )
|
||||
{
|
||||
puts( "error" );
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
puts( "ok" );
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/* CTaoCrypt API */
|
||||
|
||||
/* Init Blake2b digest, track size incase final doesn't want to "remember" */
|
||||
int InitBlake2b(Blake2b* b2b, word32 digestSz)
|
||||
{
|
||||
b2b->digestSz = digestSz;
|
||||
|
||||
return blake2b_init(b2b->S, (byte)digestSz);
|
||||
}
|
||||
|
||||
|
||||
/* Blake2b Update */
|
||||
int Blake2bUpdate(Blake2b* b2b, const byte* data, word32 sz)
|
||||
{
|
||||
return blake2b_update(b2b->S, data, sz);
|
||||
}
|
||||
|
||||
|
||||
/* Blake2b Final, if pass in zero size we use init digestSz */
|
||||
int Blake2bFinal(Blake2b* b2b, byte* final, word32 requestSz)
|
||||
{
|
||||
word32 sz = requestSz ? requestSz : b2b->digestSz;
|
||||
|
||||
return blake2b_final(b2b->S, final, (byte)sz);
|
||||
}
|
||||
|
||||
|
||||
/* end CTaoCrypt API */
|
||||
|
||||
#endif /* HAVE_BLAKE2 */
|
||||
|
||||
1621
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/camellia.c
Normal file
1621
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/camellia.c
Normal file
File diff suppressed because it is too large
Load diff
399
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/coding.c
Normal file
399
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/coding.c
Normal file
|
|
@ -0,0 +1,399 @@
|
|||
/* coding.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>
|
||||
|
||||
#ifndef NO_CODING
|
||||
|
||||
#include <cyassl/ctaocrypt/coding.h>
|
||||
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||
#include <cyassl/ctaocrypt/logging.h>
|
||||
|
||||
|
||||
enum {
|
||||
BAD = 0xFF, /* invalid encoding */
|
||||
PAD = '=',
|
||||
PEM_LINE_SZ = 64
|
||||
};
|
||||
|
||||
|
||||
static
|
||||
const byte base64Decode[] = { 62, BAD, BAD, BAD, 63, /* + starts at 0x2B */
|
||||
52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
|
||||
BAD, BAD, BAD, BAD, BAD, BAD, BAD,
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
||||
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
|
||||
20, 21, 22, 23, 24, 25,
|
||||
BAD, BAD, BAD, BAD, BAD, BAD,
|
||||
26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
|
||||
36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
|
||||
46, 47, 48, 49, 50, 51
|
||||
};
|
||||
|
||||
|
||||
int Base64_Decode(const byte* in, word32 inLen, byte* out, word32* outLen)
|
||||
{
|
||||
word32 i = 0;
|
||||
word32 j = 0;
|
||||
word32 plainSz = inLen - ((inLen + (PEM_LINE_SZ - 1)) / PEM_LINE_SZ );
|
||||
const byte maxIdx = (byte)sizeof(base64Decode) + 0x2B - 1;
|
||||
|
||||
plainSz = (plainSz * 3 + 3) / 4;
|
||||
if (plainSz > *outLen) return BAD_FUNC_ARG;
|
||||
|
||||
while (inLen > 3) {
|
||||
byte b1, b2, b3;
|
||||
byte e1 = in[j++];
|
||||
byte e2 = in[j++];
|
||||
byte e3 = in[j++];
|
||||
byte e4 = in[j++];
|
||||
|
||||
int pad3 = 0;
|
||||
int pad4 = 0;
|
||||
|
||||
if (e1 == 0) /* end file 0's */
|
||||
break;
|
||||
if (e3 == PAD)
|
||||
pad3 = 1;
|
||||
if (e4 == PAD)
|
||||
pad4 = 1;
|
||||
|
||||
if (e1 < 0x2B || e2 < 0x2B || e3 < 0x2B || e4 < 0x2B) {
|
||||
CYASSL_MSG("Bad Base64 Decode data, too small");
|
||||
return ASN_INPUT_E;
|
||||
}
|
||||
|
||||
if (e1 > maxIdx || e2 > maxIdx || e3 > maxIdx || e4 > maxIdx) {
|
||||
CYASSL_MSG("Bad Base64 Decode data, too big");
|
||||
return ASN_INPUT_E;
|
||||
}
|
||||
|
||||
e1 = base64Decode[e1 - 0x2B];
|
||||
e2 = base64Decode[e2 - 0x2B];
|
||||
e3 = (e3 == PAD) ? 0 : base64Decode[e3 - 0x2B];
|
||||
e4 = (e4 == PAD) ? 0 : base64Decode[e4 - 0x2B];
|
||||
|
||||
b1 = (byte)((e1 << 2) | (e2 >> 4));
|
||||
b2 = (byte)(((e2 & 0xF) << 4) | (e3 >> 2));
|
||||
b3 = (byte)(((e3 & 0x3) << 6) | e4);
|
||||
|
||||
out[i++] = b1;
|
||||
if (!pad3)
|
||||
out[i++] = b2;
|
||||
if (!pad4)
|
||||
out[i++] = b3;
|
||||
else
|
||||
break;
|
||||
|
||||
inLen -= 4;
|
||||
if (inLen && (in[j] == ' ' || in[j] == '\r' || in[j] == '\n')) {
|
||||
byte endLine = in[j++];
|
||||
inLen--;
|
||||
while (inLen && endLine == ' ') { /* allow trailing whitespace */
|
||||
endLine = in[j++];
|
||||
inLen--;
|
||||
}
|
||||
if (endLine == '\r') {
|
||||
if (inLen) {
|
||||
endLine = in[j++];
|
||||
inLen--;
|
||||
}
|
||||
}
|
||||
if (endLine != '\n') {
|
||||
CYASSL_MSG("Bad end of line in Base64 Decode");
|
||||
return ASN_INPUT_E;
|
||||
}
|
||||
}
|
||||
}
|
||||
*outLen = i;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#if defined(OPENSSL_EXTRA) || defined (SESSION_CERTS) || defined(CYASSL_KEY_GEN) || defined(CYASSL_CERT_GEN) || defined(HAVE_WEBSERVER)
|
||||
|
||||
static
|
||||
const byte base64Encode[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
|
||||
'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
|
||||
'U', 'V', 'W', 'X', 'Y', 'Z',
|
||||
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
|
||||
'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
|
||||
'u', 'v', 'w', 'x', 'y', 'z',
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
|
||||
'+', '/'
|
||||
};
|
||||
|
||||
|
||||
/* make sure *i (idx) won't exceed max, store and possibly escape to out,
|
||||
* raw means use e w/o decode, 0 on success */
|
||||
static int CEscape(int escaped, byte e, byte* out, word32* i, word32 max,
|
||||
int raw)
|
||||
{
|
||||
int doEscape = 0;
|
||||
word32 needed = 1;
|
||||
word32 idx = *i;
|
||||
|
||||
byte basic;
|
||||
byte plus = 0;
|
||||
byte equals = 0;
|
||||
byte newline = 0;
|
||||
|
||||
if (raw)
|
||||
basic = e;
|
||||
else
|
||||
basic = base64Encode[e];
|
||||
|
||||
/* check whether to escape */
|
||||
if (escaped) {
|
||||
switch ((char)basic) {
|
||||
case '+' :
|
||||
plus = 1;
|
||||
doEscape = 1;
|
||||
needed += 2;
|
||||
break;
|
||||
case '=' :
|
||||
equals = 1;
|
||||
doEscape = 1;
|
||||
needed += 2;
|
||||
break;
|
||||
case '\n' :
|
||||
newline = 1;
|
||||
doEscape = 1;
|
||||
needed += 2;
|
||||
break;
|
||||
default:
|
||||
/* do nothing */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* check size */
|
||||
if ( (idx+needed) > max) {
|
||||
CYASSL_MSG("Escape buffer max too small");
|
||||
return BUFFER_E;
|
||||
}
|
||||
|
||||
/* store it */
|
||||
if (doEscape == 0) {
|
||||
out[idx++] = basic;
|
||||
}
|
||||
else {
|
||||
out[idx++] = '%'; /* start escape */
|
||||
|
||||
if (plus) {
|
||||
out[idx++] = '2';
|
||||
out[idx++] = 'B';
|
||||
}
|
||||
else if (equals) {
|
||||
out[idx++] = '3';
|
||||
out[idx++] = 'D';
|
||||
}
|
||||
else if (newline) {
|
||||
out[idx++] = '0';
|
||||
out[idx++] = 'A';
|
||||
}
|
||||
|
||||
}
|
||||
*i = idx;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* internal worker, handles both escaped and normal line endings */
|
||||
static int DoBase64_Encode(const byte* in, word32 inLen, byte* out,
|
||||
word32* outLen, int escaped)
|
||||
{
|
||||
int ret = 0;
|
||||
word32 i = 0,
|
||||
j = 0,
|
||||
n = 0; /* new line counter */
|
||||
|
||||
word32 outSz = (inLen + 3 - 1) / 3 * 4;
|
||||
word32 addSz = (outSz + PEM_LINE_SZ - 1) / PEM_LINE_SZ; /* new lines */
|
||||
|
||||
if (escaped)
|
||||
addSz *= 3; /* instead of just \n, we're doing %0A triplet */
|
||||
|
||||
outSz += addSz;
|
||||
|
||||
/* if escaped we can't predetermine size for one pass encoding, but
|
||||
* make sure we have enough if no escapes are in input */
|
||||
if (outSz > *outLen) return BAD_FUNC_ARG;
|
||||
|
||||
while (inLen > 2) {
|
||||
byte b1 = in[j++];
|
||||
byte b2 = in[j++];
|
||||
byte b3 = in[j++];
|
||||
|
||||
/* encoded idx */
|
||||
byte e1 = b1 >> 2;
|
||||
byte e2 = (byte)(((b1 & 0x3) << 4) | (b2 >> 4));
|
||||
byte e3 = (byte)(((b2 & 0xF) << 2) | (b3 >> 6));
|
||||
byte e4 = b3 & 0x3F;
|
||||
|
||||
/* store */
|
||||
ret = CEscape(escaped, e1, out, &i, *outLen, 0);
|
||||
if (ret != 0) break;
|
||||
ret = CEscape(escaped, e2, out, &i, *outLen, 0);
|
||||
if (ret != 0) break;
|
||||
ret = CEscape(escaped, e3, out, &i, *outLen, 0);
|
||||
if (ret != 0) break;
|
||||
ret = CEscape(escaped, e4, out, &i, *outLen, 0);
|
||||
if (ret != 0) break;
|
||||
|
||||
inLen -= 3;
|
||||
|
||||
if ((++n % (PEM_LINE_SZ / 4)) == 0 && inLen) {
|
||||
ret = CEscape(escaped, '\n', out, &i, *outLen, 1);
|
||||
if (ret != 0) break;
|
||||
}
|
||||
}
|
||||
|
||||
/* last integral */
|
||||
if (inLen && ret == 0) {
|
||||
int twoBytes = (inLen == 2);
|
||||
|
||||
byte b1 = in[j++];
|
||||
byte b2 = (twoBytes) ? in[j++] : 0;
|
||||
|
||||
byte e1 = b1 >> 2;
|
||||
byte e2 = (byte)(((b1 & 0x3) << 4) | (b2 >> 4));
|
||||
byte e3 = (byte)((b2 & 0xF) << 2);
|
||||
|
||||
ret = CEscape(escaped, e1, out, &i, *outLen, 0);
|
||||
if (ret == 0)
|
||||
ret = CEscape(escaped, e2, out, &i, *outLen, 0);
|
||||
if (ret == 0) {
|
||||
/* third */
|
||||
if (twoBytes)
|
||||
ret = CEscape(escaped, e3, out, &i, *outLen, 0);
|
||||
else
|
||||
ret = CEscape(escaped, '=', out, &i, *outLen, 1);
|
||||
}
|
||||
/* fourth always pad */
|
||||
if (ret == 0)
|
||||
ret = CEscape(escaped, '=', out, &i, *outLen, 1);
|
||||
}
|
||||
|
||||
if (ret == 0)
|
||||
ret = CEscape(escaped, '\n', out, &i, *outLen, 1);
|
||||
|
||||
if (i != outSz && escaped == 0 && ret == 0)
|
||||
return ASN_INPUT_E;
|
||||
|
||||
*outLen = i;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/* Base64 Encode, PEM style, with \n line endings */
|
||||
int Base64_Encode(const byte* in, word32 inLen, byte* out, word32* outLen)
|
||||
{
|
||||
return DoBase64_Encode(in, inLen, out, outLen, 0);
|
||||
}
|
||||
|
||||
|
||||
/* Base64 Encode, with %0A esacped line endings instead of \n */
|
||||
int Base64_EncodeEsc(const byte* in, word32 inLen, byte* out, word32* outLen)
|
||||
{
|
||||
return DoBase64_Encode(in, inLen, out, outLen, 1);
|
||||
}
|
||||
|
||||
|
||||
#endif /* defined(OPENSSL_EXTRA) || defined (SESSION_CERTS) || defined(CYASSL_KEY_GEN) || defined(CYASSL_CERT_GEN) || defined(HAVE_WEBSERVER) */
|
||||
|
||||
|
||||
#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) || defined(HAVE_FIPS)
|
||||
|
||||
static
|
||||
const byte hexDecode[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
||||
BAD, BAD, BAD, BAD, BAD, BAD, BAD,
|
||||
10, 11, 12, 13, 14, 15, /* upper case A-F */
|
||||
BAD, BAD, BAD, BAD, BAD, BAD, BAD, BAD,
|
||||
BAD, BAD, BAD, BAD, BAD, BAD, BAD, BAD,
|
||||
BAD, BAD, BAD, BAD, BAD, BAD, BAD, BAD,
|
||||
BAD, BAD, /* G - ` */
|
||||
10, 11, 12, 13, 14, 15 /* lower case a-f */
|
||||
}; /* A starts at 0x41 not 0x3A */
|
||||
|
||||
int Base16_Decode(const byte* in, word32 inLen, byte* out, word32* outLen)
|
||||
{
|
||||
word32 inIdx = 0;
|
||||
word32 outIdx = 0;
|
||||
|
||||
if (inLen == 1 && *outLen && in) {
|
||||
byte b = in[inIdx++] - 0x30; /* 0 starts at 0x30 */
|
||||
|
||||
/* sanity check */
|
||||
if (b >= sizeof(hexDecode)/sizeof(hexDecode[0]))
|
||||
return ASN_INPUT_E;
|
||||
|
||||
b = hexDecode[b];
|
||||
|
||||
if (b == BAD)
|
||||
return ASN_INPUT_E;
|
||||
|
||||
out[outIdx++] = b;
|
||||
|
||||
*outLen = outIdx;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (inLen % 2)
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
if (*outLen < (inLen / 2))
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
while (inLen) {
|
||||
byte b = in[inIdx++] - 0x30; /* 0 starts at 0x30 */
|
||||
byte b2 = in[inIdx++] - 0x30;
|
||||
|
||||
/* sanity checks */
|
||||
if (b >= sizeof(hexDecode)/sizeof(hexDecode[0]))
|
||||
return ASN_INPUT_E;
|
||||
if (b2 >= sizeof(hexDecode)/sizeof(hexDecode[0]))
|
||||
return ASN_INPUT_E;
|
||||
|
||||
b = hexDecode[b];
|
||||
b2 = hexDecode[b2];
|
||||
|
||||
if (b == BAD || b2 == BAD)
|
||||
return ASN_INPUT_E;
|
||||
|
||||
out[outIdx++] = (byte)((b << 4) | b2);
|
||||
inLen -= 2;
|
||||
}
|
||||
|
||||
*outLen = outIdx;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#endif /* (OPENSSL_EXTRA) || (HAVE_WEBSERVER) || (HAVE_FIPS) */
|
||||
|
||||
#endif /* NO_CODING */
|
||||
169
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/compress.c
Normal file
169
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/compress.c
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
/* compress.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>
|
||||
|
||||
#ifdef HAVE_LIBZ
|
||||
|
||||
|
||||
#include <cyassl/ctaocrypt/compress.h>
|
||||
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||
#include <cyassl/ctaocrypt/logging.h>
|
||||
#ifdef NO_INLINE
|
||||
#include <cyassl/ctaocrypt/misc.h>
|
||||
#else
|
||||
#include <ctaocrypt/src/misc.c>
|
||||
#endif
|
||||
|
||||
#include <zlib.h>
|
||||
|
||||
|
||||
/* alloc user allocs to work with zlib */
|
||||
static void* myAlloc(void* opaque, unsigned int item, unsigned int size)
|
||||
{
|
||||
(void)opaque;
|
||||
return XMALLOC(item * size, opaque, DYNAMIC_TYPE_LIBZ);
|
||||
}
|
||||
|
||||
|
||||
static void myFree(void* opaque, void* memory)
|
||||
{
|
||||
(void)opaque;
|
||||
XFREE(memory, opaque, DYNAMIC_TYPE_LIBZ);
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_MCAPI
|
||||
#define DEFLATE_DEFAULT_WINDOWBITS 11
|
||||
#define DEFLATE_DEFAULT_MEMLEVEL 1
|
||||
#else
|
||||
#define DEFLATE_DEFAULT_WINDOWBITS 15
|
||||
#define DEFLATE_DEFAULT_MEMLEVEL 8
|
||||
#endif
|
||||
|
||||
|
||||
int Compress(byte* out, word32 outSz, const byte* in, word32 inSz, word32 flags)
|
||||
/*
|
||||
* out - pointer to destination buffer
|
||||
* outSz - size of destination buffer
|
||||
* in - pointer to source buffer to compress
|
||||
* inSz - size of source to compress
|
||||
* flags - flags to control how compress operates
|
||||
*
|
||||
* return:
|
||||
* negative - error code
|
||||
* positive - bytes stored in out buffer
|
||||
*
|
||||
* Note, the output buffer still needs to be larger than the input buffer.
|
||||
* The right chunk of data won't compress at all, and the lookup table will
|
||||
* add to the size of the output. The libz code says the compressed
|
||||
* buffer should be srcSz + 0.1% + 12.
|
||||
*/
|
||||
{
|
||||
z_stream stream;
|
||||
int result = 0;
|
||||
|
||||
stream.next_in = (Bytef*)in;
|
||||
stream.avail_in = (uInt)inSz;
|
||||
#ifdef MAXSEG_64K
|
||||
/* Check for source > 64K on 16-bit machine: */
|
||||
if ((uLong)stream.avail_in != inSz) return COMPRESS_INIT_E;
|
||||
#endif
|
||||
stream.next_out = out;
|
||||
stream.avail_out = (uInt)outSz;
|
||||
if ((uLong)stream.avail_out != outSz) return COMPRESS_INIT_E;
|
||||
|
||||
stream.zalloc = (alloc_func)myAlloc;
|
||||
stream.zfree = (free_func)myFree;
|
||||
stream.opaque = (voidpf)0;
|
||||
|
||||
if (deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED,
|
||||
DEFLATE_DEFAULT_WINDOWBITS, DEFLATE_DEFAULT_MEMLEVEL,
|
||||
flags ? Z_FIXED : Z_DEFAULT_STRATEGY) != Z_OK)
|
||||
return COMPRESS_INIT_E;
|
||||
|
||||
if (deflate(&stream, Z_FINISH) != Z_STREAM_END) {
|
||||
deflateEnd(&stream);
|
||||
return COMPRESS_E;
|
||||
}
|
||||
|
||||
result = (int)stream.total_out;
|
||||
|
||||
if (deflateEnd(&stream) != Z_OK)
|
||||
result = COMPRESS_E;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
int DeCompress(byte* out, word32 outSz, const byte* in, word32 inSz)
|
||||
/*
|
||||
* out - pointer to destination buffer
|
||||
* outSz - size of destination buffer
|
||||
* in - pointer to source buffer to compress
|
||||
* inSz - size of source to compress
|
||||
* flags - flags to control how compress operates
|
||||
*
|
||||
* return:
|
||||
* negative - error code
|
||||
* positive - bytes stored in out buffer
|
||||
*/
|
||||
{
|
||||
z_stream stream;
|
||||
int result = 0;
|
||||
|
||||
stream.next_in = (Bytef*)in;
|
||||
stream.avail_in = (uInt)inSz;
|
||||
/* Check for source > 64K on 16-bit machine: */
|
||||
if ((uLong)stream.avail_in != inSz) return DECOMPRESS_INIT_E;
|
||||
|
||||
stream.next_out = out;
|
||||
stream.avail_out = (uInt)outSz;
|
||||
if ((uLong)stream.avail_out != outSz) return DECOMPRESS_INIT_E;
|
||||
|
||||
stream.zalloc = (alloc_func)myAlloc;
|
||||
stream.zfree = (free_func)myFree;
|
||||
stream.opaque = (voidpf)0;
|
||||
|
||||
if (inflateInit2(&stream, DEFLATE_DEFAULT_WINDOWBITS) != Z_OK)
|
||||
return DECOMPRESS_INIT_E;
|
||||
|
||||
if (inflate(&stream, Z_FINISH) != Z_STREAM_END) {
|
||||
inflateEnd(&stream);
|
||||
return DECOMPRESS_E;
|
||||
}
|
||||
|
||||
result = (int)stream.total_out;
|
||||
|
||||
if (inflateEnd(&stream) != Z_OK)
|
||||
result = DECOMPRESS_E;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
#endif /* HAVE_LIBZ */
|
||||
|
||||
1519
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/des3.c
Normal file
1519
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/des3.c
Normal file
File diff suppressed because it is too large
Load diff
178
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/dh.c
Normal file
178
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/dh.c
Normal file
|
|
@ -0,0 +1,178 @@
|
|||
/* dh.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>
|
||||
|
||||
#ifndef NO_DH
|
||||
|
||||
#include <cyassl/ctaocrypt/dh.h>
|
||||
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||
|
||||
#ifndef USER_MATH_LIB
|
||||
#include <math.h>
|
||||
#define XPOW(x,y) pow((x),(y))
|
||||
#define XLOG(x) log((x))
|
||||
#else
|
||||
/* user's own math lib */
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef min
|
||||
|
||||
static INLINE word32 min(word32 a, word32 b)
|
||||
{
|
||||
return a > b ? b : a;
|
||||
}
|
||||
|
||||
#endif /* min */
|
||||
|
||||
|
||||
void InitDhKey(DhKey* key)
|
||||
{
|
||||
(void)key;
|
||||
/* TomsFastMath doesn't use memory allocation */
|
||||
#ifndef USE_FAST_MATH
|
||||
key->p.dp = 0;
|
||||
key->g.dp = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void FreeDhKey(DhKey* key)
|
||||
{
|
||||
(void)key;
|
||||
/* TomsFastMath doesn't use memory allocation */
|
||||
#ifndef USE_FAST_MATH
|
||||
mp_clear(&key->p);
|
||||
mp_clear(&key->g);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
static word32 DiscreteLogWorkFactor(word32 n)
|
||||
{
|
||||
/* assuming discrete log takes about the same time as factoring */
|
||||
if (n<5)
|
||||
return 0;
|
||||
else
|
||||
return (word32)(2.4 * XPOW((double)n, 1.0/3.0) *
|
||||
XPOW(XLOG((double)n), 2.0/3.0) - 5);
|
||||
}
|
||||
|
||||
|
||||
static int GeneratePrivate(DhKey* key, RNG* rng, byte* priv, word32* privSz)
|
||||
{
|
||||
int ret;
|
||||
word32 sz = mp_unsigned_bin_size(&key->p);
|
||||
sz = min(sz, 2 * DiscreteLogWorkFactor(sz * CYASSL_BIT_SIZE) /
|
||||
CYASSL_BIT_SIZE + 1);
|
||||
|
||||
ret = RNG_GenerateBlock(rng, priv, sz);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
|
||||
priv[0] |= 0x0C;
|
||||
|
||||
*privSz = sz;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int GeneratePublic(DhKey* key, const byte* priv, word32 privSz,
|
||||
byte* pub, word32* pubSz)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
mp_int x;
|
||||
mp_int y;
|
||||
|
||||
if (mp_init_multi(&x, &y, 0, 0, 0, 0) != MP_OKAY)
|
||||
return MP_INIT_E;
|
||||
|
||||
if (mp_read_unsigned_bin(&x, priv, privSz) != MP_OKAY)
|
||||
ret = MP_READ_E;
|
||||
|
||||
if (ret == 0 && mp_exptmod(&key->g, &x, &key->p, &y) != MP_OKAY)
|
||||
ret = MP_EXPTMOD_E;
|
||||
|
||||
if (ret == 0 && mp_to_unsigned_bin(&y, pub) != MP_OKAY)
|
||||
ret = MP_TO_E;
|
||||
|
||||
if (ret == 0)
|
||||
*pubSz = mp_unsigned_bin_size(&y);
|
||||
|
||||
mp_clear(&y);
|
||||
mp_clear(&x);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int DhGenerateKeyPair(DhKey* key, RNG* rng, byte* priv, word32* privSz,
|
||||
byte* pub, word32* pubSz)
|
||||
{
|
||||
int ret = GeneratePrivate(key, rng, priv, privSz);
|
||||
|
||||
return (ret != 0) ? ret : GeneratePublic(key, priv, *privSz, pub, pubSz);
|
||||
}
|
||||
|
||||
int DhAgree(DhKey* key, byte* agree, word32* agreeSz, const byte* priv,
|
||||
word32 privSz, const byte* otherPub, word32 pubSz)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
mp_int x;
|
||||
mp_int y;
|
||||
mp_int z;
|
||||
|
||||
if (mp_init_multi(&x, &y, &z, 0, 0, 0) != MP_OKAY)
|
||||
return MP_INIT_E;
|
||||
|
||||
if (mp_read_unsigned_bin(&x, priv, privSz) != MP_OKAY)
|
||||
ret = MP_READ_E;
|
||||
|
||||
if (ret == 0 && mp_read_unsigned_bin(&y, otherPub, pubSz) != MP_OKAY)
|
||||
ret = MP_READ_E;
|
||||
|
||||
if (ret == 0 && mp_exptmod(&y, &x, &key->p, &z) != MP_OKAY)
|
||||
ret = MP_EXPTMOD_E;
|
||||
|
||||
if (ret == 0 && mp_to_unsigned_bin(&z, agree) != MP_OKAY)
|
||||
ret = MP_TO_E;
|
||||
|
||||
if (ret == 0)
|
||||
*agreeSz = mp_unsigned_bin_size(&z);
|
||||
|
||||
mp_clear(&z);
|
||||
mp_clear(&y);
|
||||
mp_clear(&x);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
#endif /* NO_DH */
|
||||
|
||||
226
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/dsa.c
Normal file
226
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/dsa.c
Normal file
|
|
@ -0,0 +1,226 @@
|
|||
/* dsa.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>
|
||||
|
||||
#ifndef NO_DSA
|
||||
|
||||
#include <cyassl/ctaocrypt/dsa.h>
|
||||
#include <cyassl/ctaocrypt/sha.h>
|
||||
#include <cyassl/ctaocrypt/random.h>
|
||||
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||
|
||||
|
||||
enum {
|
||||
DSA_HALF_SIZE = 20, /* r and s size */
|
||||
DSA_SIG_SIZE = 40 /* signature size */
|
||||
};
|
||||
|
||||
|
||||
#ifndef min
|
||||
|
||||
static INLINE word32 min(word32 a, word32 b)
|
||||
{
|
||||
return a > b ? b : a;
|
||||
}
|
||||
|
||||
#endif /* min */
|
||||
|
||||
|
||||
void InitDsaKey(DsaKey* key)
|
||||
{
|
||||
key->type = -1; /* haven't decided yet */
|
||||
|
||||
/* TomsFastMath doesn't use memory allocation */
|
||||
#ifndef USE_FAST_MATH
|
||||
key->p.dp = 0; /* public alloc parts */
|
||||
key->q.dp = 0;
|
||||
key->g.dp = 0;
|
||||
key->y.dp = 0;
|
||||
|
||||
key->x.dp = 0; /* private alloc parts */
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void FreeDsaKey(DsaKey* key)
|
||||
{
|
||||
(void)key;
|
||||
/* TomsFastMath doesn't use memory allocation */
|
||||
#ifndef USE_FAST_MATH
|
||||
if (key->type == DSA_PRIVATE)
|
||||
mp_clear(&key->x);
|
||||
mp_clear(&key->y);
|
||||
mp_clear(&key->g);
|
||||
mp_clear(&key->q);
|
||||
mp_clear(&key->p);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
int DsaSign(const byte* digest, byte* out, DsaKey* key, RNG* rng)
|
||||
{
|
||||
mp_int k, kInv, r, s, H;
|
||||
int ret, sz;
|
||||
byte buffer[DSA_HALF_SIZE];
|
||||
|
||||
sz = min(sizeof(buffer), mp_unsigned_bin_size(&key->q));
|
||||
|
||||
/* generate k */
|
||||
ret = RNG_GenerateBlock(rng, buffer, sz);
|
||||
if (ret != 0)
|
||||
return ret;
|
||||
|
||||
buffer[0] |= 0x0C;
|
||||
|
||||
if (mp_init_multi(&k, &kInv, &r, &s, &H, 0) != MP_OKAY)
|
||||
return MP_INIT_E;
|
||||
|
||||
if (mp_read_unsigned_bin(&k, buffer, sz) != MP_OKAY)
|
||||
ret = MP_READ_E;
|
||||
|
||||
if (ret == 0 && mp_cmp_d(&k, 1) != MP_GT)
|
||||
ret = MP_CMP_E;
|
||||
|
||||
/* inverse k mod q */
|
||||
if (ret == 0 && mp_invmod(&k, &key->q, &kInv) != MP_OKAY)
|
||||
ret = MP_INVMOD_E;
|
||||
|
||||
/* generate r, r = (g exp k mod p) mod q */
|
||||
if (ret == 0 && mp_exptmod(&key->g, &k, &key->p, &r) != MP_OKAY)
|
||||
ret = MP_EXPTMOD_E;
|
||||
|
||||
if (ret == 0 && mp_mod(&r, &key->q, &r) != MP_OKAY)
|
||||
ret = MP_MOD_E;
|
||||
|
||||
/* generate H from sha digest */
|
||||
if (ret == 0 && mp_read_unsigned_bin(&H, digest,SHA_DIGEST_SIZE) != MP_OKAY)
|
||||
ret = MP_READ_E;
|
||||
|
||||
/* generate s, s = (kInv * (H + x*r)) % q */
|
||||
if (ret == 0 && mp_mul(&key->x, &r, &s) != MP_OKAY)
|
||||
ret = MP_MUL_E;
|
||||
|
||||
if (ret == 0 && mp_add(&s, &H, &s) != MP_OKAY)
|
||||
ret = MP_ADD_E;
|
||||
|
||||
if (ret == 0 && mp_mulmod(&s, &kInv, &key->q, &s) != MP_OKAY)
|
||||
ret = MP_MULMOD_E;
|
||||
|
||||
/* write out */
|
||||
if (ret == 0) {
|
||||
int rSz = mp_unsigned_bin_size(&r);
|
||||
int sSz = mp_unsigned_bin_size(&s);
|
||||
|
||||
if (rSz == DSA_HALF_SIZE - 1) {
|
||||
out[0] = 0;
|
||||
out++;
|
||||
}
|
||||
|
||||
if (mp_to_unsigned_bin(&r, out) != MP_OKAY)
|
||||
ret = MP_TO_E;
|
||||
else {
|
||||
if (sSz == DSA_HALF_SIZE - 1) {
|
||||
out[rSz] = 0;
|
||||
out++;
|
||||
}
|
||||
ret = mp_to_unsigned_bin(&s, out + rSz);
|
||||
}
|
||||
}
|
||||
|
||||
mp_clear(&H);
|
||||
mp_clear(&s);
|
||||
mp_clear(&r);
|
||||
mp_clear(&kInv);
|
||||
mp_clear(&k);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int DsaVerify(const byte* digest, const byte* sig, DsaKey* key, int* answer)
|
||||
{
|
||||
mp_int w, u1, u2, v, r, s;
|
||||
int ret = 0;
|
||||
|
||||
if (mp_init_multi(&w, &u1, &u2, &v, &r, &s) != MP_OKAY)
|
||||
return MP_INIT_E;
|
||||
|
||||
/* set r and s from signature */
|
||||
if (mp_read_unsigned_bin(&r, sig, DSA_HALF_SIZE) != MP_OKAY ||
|
||||
mp_read_unsigned_bin(&s, sig + DSA_HALF_SIZE, DSA_HALF_SIZE) != MP_OKAY)
|
||||
ret = MP_READ_E;
|
||||
|
||||
/* sanity checks */
|
||||
|
||||
|
||||
/* put H into u1 from sha digest */
|
||||
if (ret == 0 && mp_read_unsigned_bin(&u1,digest,SHA_DIGEST_SIZE) != MP_OKAY)
|
||||
ret = MP_READ_E;
|
||||
|
||||
/* w = s invmod q */
|
||||
if (ret == 0 && mp_invmod(&s, &key->q, &w) != MP_OKAY)
|
||||
ret = MP_INVMOD_E;
|
||||
|
||||
/* u1 = (H * w) % q */
|
||||
if (ret == 0 && mp_mulmod(&u1, &w, &key->q, &u1) != MP_OKAY)
|
||||
ret = MP_MULMOD_E;
|
||||
|
||||
/* u2 = (r * w) % q */
|
||||
if (ret == 0 && mp_mulmod(&r, &w, &key->q, &u2) != MP_OKAY)
|
||||
ret = MP_MULMOD_E;
|
||||
|
||||
/* verify v = ((g^u1 * y^u2) mod p) mod q */
|
||||
if (ret == 0 && mp_exptmod(&key->g, &u1, &key->p, &u1) != MP_OKAY)
|
||||
ret = MP_EXPTMOD_E;
|
||||
|
||||
if (ret == 0 && mp_exptmod(&key->y, &u2, &key->p, &u2) != MP_OKAY)
|
||||
ret = MP_EXPTMOD_E;
|
||||
|
||||
if (ret == 0 && mp_mulmod(&u1, &u2, &key->p, &v) != MP_OKAY)
|
||||
ret = MP_MULMOD_E;
|
||||
|
||||
if (ret == 0 && mp_mod(&v, &key->q, &v) != MP_OKAY)
|
||||
ret = MP_MULMOD_E;
|
||||
|
||||
/* do they match */
|
||||
if (ret == 0 && mp_cmp(&r, &v) == MP_EQ)
|
||||
*answer = 1;
|
||||
else
|
||||
*answer = 0;
|
||||
|
||||
mp_clear(&s);
|
||||
mp_clear(&r);
|
||||
mp_clear(&u1);
|
||||
mp_clear(&u2);
|
||||
mp_clear(&w);
|
||||
mp_clear(&v);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
#endif /* NO_DSA */
|
||||
|
||||
4156
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/ecc.c
Normal file
4156
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/ecc.c
Normal file
File diff suppressed because it is too large
Load diff
1
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/ecc_fp.c
Normal file
1
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/ecc_fp.c
Normal file
|
|
@ -0,0 +1 @@
|
|||
/* dummy ecc_fp.c for dist */
|
||||
295
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/error.c
Normal file
295
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/error.c
Normal file
|
|
@ -0,0 +1,295 @@
|
|||
/* error.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>
|
||||
|
||||
#include <cyassl/ctaocrypt/error-crypt.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* 4996 warning to use MS extensions e.g., strcpy_s instead of XSTRNCPY */
|
||||
#pragma warning(disable: 4996)
|
||||
#endif
|
||||
|
||||
const char* CTaoCryptGetErrorString(int error)
|
||||
{
|
||||
#ifdef NO_ERROR_STRINGS
|
||||
|
||||
(void)error;
|
||||
return "no support for error strings built in";
|
||||
|
||||
#else
|
||||
|
||||
switch (error) {
|
||||
|
||||
case OPEN_RAN_E :
|
||||
return "opening random device error";
|
||||
|
||||
case READ_RAN_E :
|
||||
return "reading random device error";
|
||||
|
||||
case WINCRYPT_E :
|
||||
return "windows crypt init error";
|
||||
|
||||
case CRYPTGEN_E :
|
||||
return "windows crypt generation error";
|
||||
|
||||
case RAN_BLOCK_E :
|
||||
return "random device read would block error";
|
||||
|
||||
case BAD_MUTEX_E :
|
||||
return "Bad mutex, operation failed";
|
||||
|
||||
case MP_INIT_E :
|
||||
return "mp_init error state";
|
||||
|
||||
case MP_READ_E :
|
||||
return "mp_read error state";
|
||||
|
||||
case MP_EXPTMOD_E :
|
||||
return "mp_exptmod error state";
|
||||
|
||||
case MP_TO_E :
|
||||
return "mp_to_xxx error state, can't convert";
|
||||
|
||||
case MP_SUB_E :
|
||||
return "mp_sub error state, can't subtract";
|
||||
|
||||
case MP_ADD_E :
|
||||
return "mp_add error state, can't add";
|
||||
|
||||
case MP_MUL_E :
|
||||
return "mp_mul error state, can't multiply";
|
||||
|
||||
case MP_MULMOD_E :
|
||||
return "mp_mulmod error state, can't multiply mod";
|
||||
|
||||
case MP_MOD_E :
|
||||
return "mp_mod error state, can't mod";
|
||||
|
||||
case MP_INVMOD_E :
|
||||
return "mp_invmod error state, can't inv mod";
|
||||
|
||||
case MP_CMP_E :
|
||||
return "mp_cmp error state";
|
||||
|
||||
case MP_ZERO_E :
|
||||
return "mp zero result, not expected";
|
||||
|
||||
case MEMORY_E :
|
||||
return "out of memory error";
|
||||
|
||||
case RSA_WRONG_TYPE_E :
|
||||
return "RSA wrong block type for RSA function";
|
||||
|
||||
case RSA_BUFFER_E :
|
||||
return "RSA buffer error, output too small or input too big";
|
||||
|
||||
case BUFFER_E :
|
||||
return "Buffer error, output too small or input too big";
|
||||
|
||||
case ALGO_ID_E :
|
||||
return "Setting Cert AlogID error";
|
||||
|
||||
case PUBLIC_KEY_E :
|
||||
return "Setting Cert Public Key error";
|
||||
|
||||
case DATE_E :
|
||||
return "Setting Cert Date validity error";
|
||||
|
||||
case SUBJECT_E :
|
||||
return "Setting Cert Subject name error";
|
||||
|
||||
case ISSUER_E :
|
||||
return "Setting Cert Issuer name error";
|
||||
|
||||
case CA_TRUE_E :
|
||||
return "Setting basic constraint CA true error";
|
||||
|
||||
case EXTENSIONS_E :
|
||||
return "Setting extensions error";
|
||||
|
||||
case ASN_PARSE_E :
|
||||
return "ASN parsing error, invalid input";
|
||||
|
||||
case ASN_VERSION_E :
|
||||
return "ASN version error, invalid number";
|
||||
|
||||
case ASN_GETINT_E :
|
||||
return "ASN get big int error, invalid data";
|
||||
|
||||
case ASN_RSA_KEY_E :
|
||||
return "ASN key init error, invalid input";
|
||||
|
||||
case ASN_OBJECT_ID_E :
|
||||
return "ASN object id error, invalid id";
|
||||
|
||||
case ASN_TAG_NULL_E :
|
||||
return "ASN tag error, not null";
|
||||
|
||||
case ASN_EXPECT_0_E :
|
||||
return "ASN expect error, not zero";
|
||||
|
||||
case ASN_BITSTR_E :
|
||||
return "ASN bit string error, wrong id";
|
||||
|
||||
case ASN_UNKNOWN_OID_E :
|
||||
return "ASN oid error, unknown sum id";
|
||||
|
||||
case ASN_DATE_SZ_E :
|
||||
return "ASN date error, bad size";
|
||||
|
||||
case ASN_BEFORE_DATE_E :
|
||||
return "ASN date error, current date before";
|
||||
|
||||
case ASN_AFTER_DATE_E :
|
||||
return "ASN date error, current date after";
|
||||
|
||||
case ASN_SIG_OID_E :
|
||||
return "ASN signature error, mismatched oid";
|
||||
|
||||
case ASN_TIME_E :
|
||||
return "ASN time error, unkown time type";
|
||||
|
||||
case ASN_INPUT_E :
|
||||
return "ASN input error, not enough data";
|
||||
|
||||
case ASN_SIG_CONFIRM_E :
|
||||
return "ASN sig error, confirm failure";
|
||||
|
||||
case ASN_SIG_HASH_E :
|
||||
return "ASN sig error, unsupported hash type";
|
||||
|
||||
case ASN_SIG_KEY_E :
|
||||
return "ASN sig error, unsupported key type";
|
||||
|
||||
case ASN_DH_KEY_E :
|
||||
return "ASN key init error, invalid input";
|
||||
|
||||
case ASN_NTRU_KEY_E :
|
||||
return "ASN NTRU key decode error, invalid input";
|
||||
|
||||
case ASN_CRIT_EXT_E:
|
||||
return "X.509 Critical extension ignored";
|
||||
|
||||
case ECC_BAD_ARG_E :
|
||||
return "ECC input argument wrong type, invalid input";
|
||||
|
||||
case ASN_ECC_KEY_E :
|
||||
return "ECC ASN1 bad key data, invalid input";
|
||||
|
||||
case ECC_CURVE_OID_E :
|
||||
return "ECC curve sum OID unsupported, invalid input";
|
||||
|
||||
case BAD_FUNC_ARG :
|
||||
return "Bad function argument";
|
||||
|
||||
case NOT_COMPILED_IN :
|
||||
return "Feature not compiled in";
|
||||
|
||||
case UNICODE_SIZE_E :
|
||||
return "Unicode password too big";
|
||||
|
||||
case NO_PASSWORD :
|
||||
return "No password provided by user";
|
||||
|
||||
case ALT_NAME_E :
|
||||
return "Alt Name problem, too big";
|
||||
|
||||
case AES_GCM_AUTH_E:
|
||||
return "AES-GCM Authentication check fail";
|
||||
|
||||
case AES_CCM_AUTH_E:
|
||||
return "AES-CCM Authentication check fail";
|
||||
|
||||
case CAVIUM_INIT_E:
|
||||
return "Cavium Init type error";
|
||||
|
||||
case COMPRESS_INIT_E:
|
||||
return "Compress Init error";
|
||||
|
||||
case COMPRESS_E:
|
||||
return "Compress error";
|
||||
|
||||
case DECOMPRESS_INIT_E:
|
||||
return "DeCompress Init error";
|
||||
|
||||
case DECOMPRESS_E:
|
||||
return "DeCompress error";
|
||||
|
||||
case BAD_ALIGN_E:
|
||||
return "Bad alignment error, no alloc help";
|
||||
|
||||
case ASN_NO_SIGNER_E :
|
||||
return "ASN no signer error to confirm failure";
|
||||
|
||||
case ASN_CRL_CONFIRM_E :
|
||||
return "ASN CRL sig error, confirm failure";
|
||||
|
||||
case ASN_CRL_NO_SIGNER_E :
|
||||
return "ASN CRL no signer error to confirm failure";
|
||||
|
||||
case ASN_OCSP_CONFIRM_E :
|
||||
return "ASN OCSP sig error, confirm failure";
|
||||
|
||||
case BAD_ENC_STATE_E:
|
||||
return "Bad ecc encrypt state operation";
|
||||
|
||||
case BAD_PADDING_E:
|
||||
return "Bad padding, message wrong length";
|
||||
|
||||
case REQ_ATTRIBUTE_E:
|
||||
return "Setting cert request attributes error";
|
||||
|
||||
case PKCS7_OID_E:
|
||||
return "PKCS#7 error: mismatched OID value";
|
||||
|
||||
case PKCS7_RECIP_E:
|
||||
return "PKCS#7 error: no matching recipient found";
|
||||
|
||||
case FIPS_NOT_ALLOWED_E:
|
||||
return "FIPS mode not allowed error";
|
||||
|
||||
case ASN_NAME_INVALID_E:
|
||||
return "Name Constraint error";
|
||||
|
||||
case RNG_FAILURE_E:
|
||||
return "Random Number Generator failed";
|
||||
|
||||
case HMAC_MIN_KEYLEN_E:
|
||||
return "FIPS Mode HMAC Minimum Key Length error";
|
||||
|
||||
default:
|
||||
return "unknown error number";
|
||||
|
||||
}
|
||||
|
||||
#endif /* NO_ERROR_STRINGS */
|
||||
|
||||
}
|
||||
|
||||
void CTaoCryptErrorString(int error, char* buffer)
|
||||
{
|
||||
XSTRNCPY(buffer, CTaoCryptGetErrorString(error), CYASSL_MAX_ERROR_SZ);
|
||||
}
|
||||
0
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/fips.c
Normal file
0
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/fips.c
Normal file
0
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/fips_test.c
Normal file
0
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/fips_test.c
Normal file
3860
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/fp_mont_small.i
Normal file
3860
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/fp_mont_small.i
Normal file
File diff suppressed because it is too large
Load diff
130
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/fp_mul_comba_12.i
Normal file
130
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/fp_mul_comba_12.i
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
/* fp_mul_comba_12.i
|
||||
*
|
||||
* 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 TFM_MUL12
|
||||
void fp_mul_comba12(fp_int *A, fp_int *B, fp_int *C)
|
||||
{
|
||||
fp_digit c0, c1, c2, at[24];
|
||||
|
||||
memcpy(at, A->dp, 12 * sizeof(fp_digit));
|
||||
memcpy(at+12, B->dp, 12 * sizeof(fp_digit));
|
||||
COMBA_START;
|
||||
|
||||
COMBA_CLEAR;
|
||||
/* 0 */
|
||||
MULADD(at[0], at[12]);
|
||||
COMBA_STORE(C->dp[0]);
|
||||
/* 1 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[13]); MULADD(at[1], at[12]);
|
||||
COMBA_STORE(C->dp[1]);
|
||||
/* 2 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[14]); MULADD(at[1], at[13]); MULADD(at[2], at[12]);
|
||||
COMBA_STORE(C->dp[2]);
|
||||
/* 3 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[15]); MULADD(at[1], at[14]); MULADD(at[2], at[13]); MULADD(at[3], at[12]);
|
||||
COMBA_STORE(C->dp[3]);
|
||||
/* 4 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[16]); MULADD(at[1], at[15]); MULADD(at[2], at[14]); MULADD(at[3], at[13]); MULADD(at[4], at[12]);
|
||||
COMBA_STORE(C->dp[4]);
|
||||
/* 5 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[17]); MULADD(at[1], at[16]); MULADD(at[2], at[15]); MULADD(at[3], at[14]); MULADD(at[4], at[13]); MULADD(at[5], at[12]);
|
||||
COMBA_STORE(C->dp[5]);
|
||||
/* 6 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[18]); MULADD(at[1], at[17]); MULADD(at[2], at[16]); MULADD(at[3], at[15]); MULADD(at[4], at[14]); MULADD(at[5], at[13]); MULADD(at[6], at[12]);
|
||||
COMBA_STORE(C->dp[6]);
|
||||
/* 7 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[19]); MULADD(at[1], at[18]); MULADD(at[2], at[17]); MULADD(at[3], at[16]); MULADD(at[4], at[15]); MULADD(at[5], at[14]); MULADD(at[6], at[13]); MULADD(at[7], at[12]);
|
||||
COMBA_STORE(C->dp[7]);
|
||||
/* 8 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[20]); MULADD(at[1], at[19]); MULADD(at[2], at[18]); MULADD(at[3], at[17]); MULADD(at[4], at[16]); MULADD(at[5], at[15]); MULADD(at[6], at[14]); MULADD(at[7], at[13]); MULADD(at[8], at[12]);
|
||||
COMBA_STORE(C->dp[8]);
|
||||
/* 9 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[21]); MULADD(at[1], at[20]); MULADD(at[2], at[19]); MULADD(at[3], at[18]); MULADD(at[4], at[17]); MULADD(at[5], at[16]); MULADD(at[6], at[15]); MULADD(at[7], at[14]); MULADD(at[8], at[13]); MULADD(at[9], at[12]);
|
||||
COMBA_STORE(C->dp[9]);
|
||||
/* 10 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[22]); MULADD(at[1], at[21]); MULADD(at[2], at[20]); MULADD(at[3], at[19]); MULADD(at[4], at[18]); MULADD(at[5], at[17]); MULADD(at[6], at[16]); MULADD(at[7], at[15]); MULADD(at[8], at[14]); MULADD(at[9], at[13]); MULADD(at[10], at[12]);
|
||||
COMBA_STORE(C->dp[10]);
|
||||
/* 11 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[23]); MULADD(at[1], at[22]); MULADD(at[2], at[21]); MULADD(at[3], at[20]); MULADD(at[4], at[19]); MULADD(at[5], at[18]); MULADD(at[6], at[17]); MULADD(at[7], at[16]); MULADD(at[8], at[15]); MULADD(at[9], at[14]); MULADD(at[10], at[13]); MULADD(at[11], at[12]);
|
||||
COMBA_STORE(C->dp[11]);
|
||||
/* 12 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[1], at[23]); MULADD(at[2], at[22]); MULADD(at[3], at[21]); MULADD(at[4], at[20]); MULADD(at[5], at[19]); MULADD(at[6], at[18]); MULADD(at[7], at[17]); MULADD(at[8], at[16]); MULADD(at[9], at[15]); MULADD(at[10], at[14]); MULADD(at[11], at[13]);
|
||||
COMBA_STORE(C->dp[12]);
|
||||
/* 13 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[2], at[23]); MULADD(at[3], at[22]); MULADD(at[4], at[21]); MULADD(at[5], at[20]); MULADD(at[6], at[19]); MULADD(at[7], at[18]); MULADD(at[8], at[17]); MULADD(at[9], at[16]); MULADD(at[10], at[15]); MULADD(at[11], at[14]);
|
||||
COMBA_STORE(C->dp[13]);
|
||||
/* 14 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[3], at[23]); MULADD(at[4], at[22]); MULADD(at[5], at[21]); MULADD(at[6], at[20]); MULADD(at[7], at[19]); MULADD(at[8], at[18]); MULADD(at[9], at[17]); MULADD(at[10], at[16]); MULADD(at[11], at[15]);
|
||||
COMBA_STORE(C->dp[14]);
|
||||
/* 15 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[4], at[23]); MULADD(at[5], at[22]); MULADD(at[6], at[21]); MULADD(at[7], at[20]); MULADD(at[8], at[19]); MULADD(at[9], at[18]); MULADD(at[10], at[17]); MULADD(at[11], at[16]);
|
||||
COMBA_STORE(C->dp[15]);
|
||||
/* 16 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[5], at[23]); MULADD(at[6], at[22]); MULADD(at[7], at[21]); MULADD(at[8], at[20]); MULADD(at[9], at[19]); MULADD(at[10], at[18]); MULADD(at[11], at[17]);
|
||||
COMBA_STORE(C->dp[16]);
|
||||
/* 17 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[6], at[23]); MULADD(at[7], at[22]); MULADD(at[8], at[21]); MULADD(at[9], at[20]); MULADD(at[10], at[19]); MULADD(at[11], at[18]);
|
||||
COMBA_STORE(C->dp[17]);
|
||||
/* 18 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[7], at[23]); MULADD(at[8], at[22]); MULADD(at[9], at[21]); MULADD(at[10], at[20]); MULADD(at[11], at[19]);
|
||||
COMBA_STORE(C->dp[18]);
|
||||
/* 19 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[8], at[23]); MULADD(at[9], at[22]); MULADD(at[10], at[21]); MULADD(at[11], at[20]);
|
||||
COMBA_STORE(C->dp[19]);
|
||||
/* 20 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[9], at[23]); MULADD(at[10], at[22]); MULADD(at[11], at[21]);
|
||||
COMBA_STORE(C->dp[20]);
|
||||
/* 21 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[10], at[23]); MULADD(at[11], at[22]);
|
||||
COMBA_STORE(C->dp[21]);
|
||||
/* 22 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[11], at[23]);
|
||||
COMBA_STORE(C->dp[22]);
|
||||
COMBA_STORE2(C->dp[23]);
|
||||
C->used = 24;
|
||||
C->sign = A->sign ^ B->sign;
|
||||
fp_clamp(C);
|
||||
COMBA_FINI;
|
||||
}
|
||||
#endif
|
||||
170
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/fp_mul_comba_17.i
Normal file
170
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/fp_mul_comba_17.i
Normal file
|
|
@ -0,0 +1,170 @@
|
|||
/* fp_mul_comba_17.i
|
||||
*
|
||||
* 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 TFM_MUL17
|
||||
void fp_mul_comba17(fp_int *A, fp_int *B, fp_int *C)
|
||||
{
|
||||
fp_digit c0, c1, c2, at[34];
|
||||
|
||||
memcpy(at, A->dp, 17 * sizeof(fp_digit));
|
||||
memcpy(at+17, B->dp, 17 * sizeof(fp_digit));
|
||||
COMBA_START;
|
||||
|
||||
COMBA_CLEAR;
|
||||
/* 0 */
|
||||
MULADD(at[0], at[17]);
|
||||
COMBA_STORE(C->dp[0]);
|
||||
/* 1 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[18]); MULADD(at[1], at[17]);
|
||||
COMBA_STORE(C->dp[1]);
|
||||
/* 2 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[19]); MULADD(at[1], at[18]); MULADD(at[2], at[17]);
|
||||
COMBA_STORE(C->dp[2]);
|
||||
/* 3 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[20]); MULADD(at[1], at[19]); MULADD(at[2], at[18]); MULADD(at[3], at[17]);
|
||||
COMBA_STORE(C->dp[3]);
|
||||
/* 4 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[21]); MULADD(at[1], at[20]); MULADD(at[2], at[19]); MULADD(at[3], at[18]); MULADD(at[4], at[17]);
|
||||
COMBA_STORE(C->dp[4]);
|
||||
/* 5 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[22]); MULADD(at[1], at[21]); MULADD(at[2], at[20]); MULADD(at[3], at[19]); MULADD(at[4], at[18]); MULADD(at[5], at[17]);
|
||||
COMBA_STORE(C->dp[5]);
|
||||
/* 6 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[23]); MULADD(at[1], at[22]); MULADD(at[2], at[21]); MULADD(at[3], at[20]); MULADD(at[4], at[19]); MULADD(at[5], at[18]); MULADD(at[6], at[17]);
|
||||
COMBA_STORE(C->dp[6]);
|
||||
/* 7 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[24]); MULADD(at[1], at[23]); MULADD(at[2], at[22]); MULADD(at[3], at[21]); MULADD(at[4], at[20]); MULADD(at[5], at[19]); MULADD(at[6], at[18]); MULADD(at[7], at[17]);
|
||||
COMBA_STORE(C->dp[7]);
|
||||
/* 8 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[25]); MULADD(at[1], at[24]); MULADD(at[2], at[23]); MULADD(at[3], at[22]); MULADD(at[4], at[21]); MULADD(at[5], at[20]); MULADD(at[6], at[19]); MULADD(at[7], at[18]); MULADD(at[8], at[17]);
|
||||
COMBA_STORE(C->dp[8]);
|
||||
/* 9 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[26]); MULADD(at[1], at[25]); MULADD(at[2], at[24]); MULADD(at[3], at[23]); MULADD(at[4], at[22]); MULADD(at[5], at[21]); MULADD(at[6], at[20]); MULADD(at[7], at[19]); MULADD(at[8], at[18]); MULADD(at[9], at[17]);
|
||||
COMBA_STORE(C->dp[9]);
|
||||
/* 10 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[27]); MULADD(at[1], at[26]); MULADD(at[2], at[25]); MULADD(at[3], at[24]); MULADD(at[4], at[23]); MULADD(at[5], at[22]); MULADD(at[6], at[21]); MULADD(at[7], at[20]); MULADD(at[8], at[19]); MULADD(at[9], at[18]); MULADD(at[10], at[17]);
|
||||
COMBA_STORE(C->dp[10]);
|
||||
/* 11 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[28]); MULADD(at[1], at[27]); MULADD(at[2], at[26]); MULADD(at[3], at[25]); MULADD(at[4], at[24]); MULADD(at[5], at[23]); MULADD(at[6], at[22]); MULADD(at[7], at[21]); MULADD(at[8], at[20]); MULADD(at[9], at[19]); MULADD(at[10], at[18]); MULADD(at[11], at[17]);
|
||||
COMBA_STORE(C->dp[11]);
|
||||
/* 12 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[29]); MULADD(at[1], at[28]); MULADD(at[2], at[27]); MULADD(at[3], at[26]); MULADD(at[4], at[25]); MULADD(at[5], at[24]); MULADD(at[6], at[23]); MULADD(at[7], at[22]); MULADD(at[8], at[21]); MULADD(at[9], at[20]); MULADD(at[10], at[19]); MULADD(at[11], at[18]); MULADD(at[12], at[17]);
|
||||
COMBA_STORE(C->dp[12]);
|
||||
/* 13 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[30]); MULADD(at[1], at[29]); MULADD(at[2], at[28]); MULADD(at[3], at[27]); MULADD(at[4], at[26]); MULADD(at[5], at[25]); MULADD(at[6], at[24]); MULADD(at[7], at[23]); MULADD(at[8], at[22]); MULADD(at[9], at[21]); MULADD(at[10], at[20]); MULADD(at[11], at[19]); MULADD(at[12], at[18]); MULADD(at[13], at[17]);
|
||||
COMBA_STORE(C->dp[13]);
|
||||
/* 14 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[31]); MULADD(at[1], at[30]); MULADD(at[2], at[29]); MULADD(at[3], at[28]); MULADD(at[4], at[27]); MULADD(at[5], at[26]); MULADD(at[6], at[25]); MULADD(at[7], at[24]); MULADD(at[8], at[23]); MULADD(at[9], at[22]); MULADD(at[10], at[21]); MULADD(at[11], at[20]); MULADD(at[12], at[19]); MULADD(at[13], at[18]); MULADD(at[14], at[17]);
|
||||
COMBA_STORE(C->dp[14]);
|
||||
/* 15 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[32]); MULADD(at[1], at[31]); MULADD(at[2], at[30]); MULADD(at[3], at[29]); MULADD(at[4], at[28]); MULADD(at[5], at[27]); MULADD(at[6], at[26]); MULADD(at[7], at[25]); MULADD(at[8], at[24]); MULADD(at[9], at[23]); MULADD(at[10], at[22]); MULADD(at[11], at[21]); MULADD(at[12], at[20]); MULADD(at[13], at[19]); MULADD(at[14], at[18]); MULADD(at[15], at[17]);
|
||||
COMBA_STORE(C->dp[15]);
|
||||
/* 16 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[33]); MULADD(at[1], at[32]); MULADD(at[2], at[31]); MULADD(at[3], at[30]); MULADD(at[4], at[29]); MULADD(at[5], at[28]); MULADD(at[6], at[27]); MULADD(at[7], at[26]); MULADD(at[8], at[25]); MULADD(at[9], at[24]); MULADD(at[10], at[23]); MULADD(at[11], at[22]); MULADD(at[12], at[21]); MULADD(at[13], at[20]); MULADD(at[14], at[19]); MULADD(at[15], at[18]); MULADD(at[16], at[17]);
|
||||
COMBA_STORE(C->dp[16]);
|
||||
/* 17 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[1], at[33]); MULADD(at[2], at[32]); MULADD(at[3], at[31]); MULADD(at[4], at[30]); MULADD(at[5], at[29]); MULADD(at[6], at[28]); MULADD(at[7], at[27]); MULADD(at[8], at[26]); MULADD(at[9], at[25]); MULADD(at[10], at[24]); MULADD(at[11], at[23]); MULADD(at[12], at[22]); MULADD(at[13], at[21]); MULADD(at[14], at[20]); MULADD(at[15], at[19]); MULADD(at[16], at[18]);
|
||||
COMBA_STORE(C->dp[17]);
|
||||
/* 18 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[2], at[33]); MULADD(at[3], at[32]); MULADD(at[4], at[31]); MULADD(at[5], at[30]); MULADD(at[6], at[29]); MULADD(at[7], at[28]); MULADD(at[8], at[27]); MULADD(at[9], at[26]); MULADD(at[10], at[25]); MULADD(at[11], at[24]); MULADD(at[12], at[23]); MULADD(at[13], at[22]); MULADD(at[14], at[21]); MULADD(at[15], at[20]); MULADD(at[16], at[19]);
|
||||
COMBA_STORE(C->dp[18]);
|
||||
/* 19 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[3], at[33]); MULADD(at[4], at[32]); MULADD(at[5], at[31]); MULADD(at[6], at[30]); MULADD(at[7], at[29]); MULADD(at[8], at[28]); MULADD(at[9], at[27]); MULADD(at[10], at[26]); MULADD(at[11], at[25]); MULADD(at[12], at[24]); MULADD(at[13], at[23]); MULADD(at[14], at[22]); MULADD(at[15], at[21]); MULADD(at[16], at[20]);
|
||||
COMBA_STORE(C->dp[19]);
|
||||
/* 20 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[4], at[33]); MULADD(at[5], at[32]); MULADD(at[6], at[31]); MULADD(at[7], at[30]); MULADD(at[8], at[29]); MULADD(at[9], at[28]); MULADD(at[10], at[27]); MULADD(at[11], at[26]); MULADD(at[12], at[25]); MULADD(at[13], at[24]); MULADD(at[14], at[23]); MULADD(at[15], at[22]); MULADD(at[16], at[21]);
|
||||
COMBA_STORE(C->dp[20]);
|
||||
/* 21 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[5], at[33]); MULADD(at[6], at[32]); MULADD(at[7], at[31]); MULADD(at[8], at[30]); MULADD(at[9], at[29]); MULADD(at[10], at[28]); MULADD(at[11], at[27]); MULADD(at[12], at[26]); MULADD(at[13], at[25]); MULADD(at[14], at[24]); MULADD(at[15], at[23]); MULADD(at[16], at[22]);
|
||||
COMBA_STORE(C->dp[21]);
|
||||
/* 22 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[6], at[33]); MULADD(at[7], at[32]); MULADD(at[8], at[31]); MULADD(at[9], at[30]); MULADD(at[10], at[29]); MULADD(at[11], at[28]); MULADD(at[12], at[27]); MULADD(at[13], at[26]); MULADD(at[14], at[25]); MULADD(at[15], at[24]); MULADD(at[16], at[23]);
|
||||
COMBA_STORE(C->dp[22]);
|
||||
/* 23 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[7], at[33]); MULADD(at[8], at[32]); MULADD(at[9], at[31]); MULADD(at[10], at[30]); MULADD(at[11], at[29]); MULADD(at[12], at[28]); MULADD(at[13], at[27]); MULADD(at[14], at[26]); MULADD(at[15], at[25]); MULADD(at[16], at[24]);
|
||||
COMBA_STORE(C->dp[23]);
|
||||
/* 24 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[8], at[33]); MULADD(at[9], at[32]); MULADD(at[10], at[31]); MULADD(at[11], at[30]); MULADD(at[12], at[29]); MULADD(at[13], at[28]); MULADD(at[14], at[27]); MULADD(at[15], at[26]); MULADD(at[16], at[25]);
|
||||
COMBA_STORE(C->dp[24]);
|
||||
/* 25 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[9], at[33]); MULADD(at[10], at[32]); MULADD(at[11], at[31]); MULADD(at[12], at[30]); MULADD(at[13], at[29]); MULADD(at[14], at[28]); MULADD(at[15], at[27]); MULADD(at[16], at[26]);
|
||||
COMBA_STORE(C->dp[25]);
|
||||
/* 26 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[10], at[33]); MULADD(at[11], at[32]); MULADD(at[12], at[31]); MULADD(at[13], at[30]); MULADD(at[14], at[29]); MULADD(at[15], at[28]); MULADD(at[16], at[27]);
|
||||
COMBA_STORE(C->dp[26]);
|
||||
/* 27 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[11], at[33]); MULADD(at[12], at[32]); MULADD(at[13], at[31]); MULADD(at[14], at[30]); MULADD(at[15], at[29]); MULADD(at[16], at[28]);
|
||||
COMBA_STORE(C->dp[27]);
|
||||
/* 28 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[12], at[33]); MULADD(at[13], at[32]); MULADD(at[14], at[31]); MULADD(at[15], at[30]); MULADD(at[16], at[29]);
|
||||
COMBA_STORE(C->dp[28]);
|
||||
/* 29 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[13], at[33]); MULADD(at[14], at[32]); MULADD(at[15], at[31]); MULADD(at[16], at[30]);
|
||||
COMBA_STORE(C->dp[29]);
|
||||
/* 30 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[14], at[33]); MULADD(at[15], at[32]); MULADD(at[16], at[31]);
|
||||
COMBA_STORE(C->dp[30]);
|
||||
/* 31 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[15], at[33]); MULADD(at[16], at[32]);
|
||||
COMBA_STORE(C->dp[31]);
|
||||
/* 32 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[16], at[33]);
|
||||
COMBA_STORE(C->dp[32]);
|
||||
COMBA_STORE2(C->dp[33]);
|
||||
C->used = 34;
|
||||
C->sign = A->sign ^ B->sign;
|
||||
fp_clamp(C);
|
||||
COMBA_FINI;
|
||||
}
|
||||
#endif
|
||||
193
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/fp_mul_comba_20.i
Normal file
193
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/fp_mul_comba_20.i
Normal file
|
|
@ -0,0 +1,193 @@
|
|||
/* fp_mul_comba_20.i
|
||||
*
|
||||
* 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 TFM_MUL20
|
||||
void fp_mul_comba20(fp_int *A, fp_int *B, fp_int *C)
|
||||
{
|
||||
fp_digit c0, c1, c2, at[40];
|
||||
|
||||
memcpy(at, A->dp, 20 * sizeof(fp_digit));
|
||||
memcpy(at+20, B->dp, 20 * sizeof(fp_digit));
|
||||
COMBA_START;
|
||||
|
||||
COMBA_CLEAR;
|
||||
/* 0 */
|
||||
MULADD(at[0], at[20]);
|
||||
COMBA_STORE(C->dp[0]);
|
||||
/* 1 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[21]); MULADD(at[1], at[20]);
|
||||
COMBA_STORE(C->dp[1]);
|
||||
/* 2 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[22]); MULADD(at[1], at[21]); MULADD(at[2], at[20]);
|
||||
COMBA_STORE(C->dp[2]);
|
||||
/* 3 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[23]); MULADD(at[1], at[22]); MULADD(at[2], at[21]); MULADD(at[3], at[20]);
|
||||
COMBA_STORE(C->dp[3]);
|
||||
/* 4 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[24]); MULADD(at[1], at[23]); MULADD(at[2], at[22]); MULADD(at[3], at[21]); MULADD(at[4], at[20]);
|
||||
COMBA_STORE(C->dp[4]);
|
||||
/* 5 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[25]); MULADD(at[1], at[24]); MULADD(at[2], at[23]); MULADD(at[3], at[22]); MULADD(at[4], at[21]); MULADD(at[5], at[20]);
|
||||
COMBA_STORE(C->dp[5]);
|
||||
/* 6 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[26]); MULADD(at[1], at[25]); MULADD(at[2], at[24]); MULADD(at[3], at[23]); MULADD(at[4], at[22]); MULADD(at[5], at[21]); MULADD(at[6], at[20]);
|
||||
COMBA_STORE(C->dp[6]);
|
||||
/* 7 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[27]); MULADD(at[1], at[26]); MULADD(at[2], at[25]); MULADD(at[3], at[24]); MULADD(at[4], at[23]); MULADD(at[5], at[22]); MULADD(at[6], at[21]); MULADD(at[7], at[20]);
|
||||
COMBA_STORE(C->dp[7]);
|
||||
/* 8 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[28]); MULADD(at[1], at[27]); MULADD(at[2], at[26]); MULADD(at[3], at[25]); MULADD(at[4], at[24]); MULADD(at[5], at[23]); MULADD(at[6], at[22]); MULADD(at[7], at[21]); MULADD(at[8], at[20]);
|
||||
COMBA_STORE(C->dp[8]);
|
||||
/* 9 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[29]); MULADD(at[1], at[28]); MULADD(at[2], at[27]); MULADD(at[3], at[26]); MULADD(at[4], at[25]); MULADD(at[5], at[24]); MULADD(at[6], at[23]); MULADD(at[7], at[22]); MULADD(at[8], at[21]); MULADD(at[9], at[20]);
|
||||
COMBA_STORE(C->dp[9]);
|
||||
/* 10 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[30]); MULADD(at[1], at[29]); MULADD(at[2], at[28]); MULADD(at[3], at[27]); MULADD(at[4], at[26]); MULADD(at[5], at[25]); MULADD(at[6], at[24]); MULADD(at[7], at[23]); MULADD(at[8], at[22]); MULADD(at[9], at[21]); MULADD(at[10], at[20]);
|
||||
COMBA_STORE(C->dp[10]);
|
||||
/* 11 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[31]); MULADD(at[1], at[30]); MULADD(at[2], at[29]); MULADD(at[3], at[28]); MULADD(at[4], at[27]); MULADD(at[5], at[26]); MULADD(at[6], at[25]); MULADD(at[7], at[24]); MULADD(at[8], at[23]); MULADD(at[9], at[22]); MULADD(at[10], at[21]); MULADD(at[11], at[20]);
|
||||
COMBA_STORE(C->dp[11]);
|
||||
/* 12 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[32]); MULADD(at[1], at[31]); MULADD(at[2], at[30]); MULADD(at[3], at[29]); MULADD(at[4], at[28]); MULADD(at[5], at[27]); MULADD(at[6], at[26]); MULADD(at[7], at[25]); MULADD(at[8], at[24]); MULADD(at[9], at[23]); MULADD(at[10], at[22]); MULADD(at[11], at[21]); MULADD(at[12], at[20]);
|
||||
COMBA_STORE(C->dp[12]);
|
||||
/* 13 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[33]); MULADD(at[1], at[32]); MULADD(at[2], at[31]); MULADD(at[3], at[30]); MULADD(at[4], at[29]); MULADD(at[5], at[28]); MULADD(at[6], at[27]); MULADD(at[7], at[26]); MULADD(at[8], at[25]); MULADD(at[9], at[24]); MULADD(at[10], at[23]); MULADD(at[11], at[22]); MULADD(at[12], at[21]); MULADD(at[13], at[20]);
|
||||
COMBA_STORE(C->dp[13]);
|
||||
/* 14 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[34]); MULADD(at[1], at[33]); MULADD(at[2], at[32]); MULADD(at[3], at[31]); MULADD(at[4], at[30]); MULADD(at[5], at[29]); MULADD(at[6], at[28]); MULADD(at[7], at[27]); MULADD(at[8], at[26]); MULADD(at[9], at[25]); MULADD(at[10], at[24]); MULADD(at[11], at[23]); MULADD(at[12], at[22]); MULADD(at[13], at[21]); MULADD(at[14], at[20]);
|
||||
COMBA_STORE(C->dp[14]);
|
||||
/* 15 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[35]); MULADD(at[1], at[34]); MULADD(at[2], at[33]); MULADD(at[3], at[32]); MULADD(at[4], at[31]); MULADD(at[5], at[30]); MULADD(at[6], at[29]); MULADD(at[7], at[28]); MULADD(at[8], at[27]); MULADD(at[9], at[26]); MULADD(at[10], at[25]); MULADD(at[11], at[24]); MULADD(at[12], at[23]); MULADD(at[13], at[22]); MULADD(at[14], at[21]); MULADD(at[15], at[20]);
|
||||
COMBA_STORE(C->dp[15]);
|
||||
/* 16 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[36]); MULADD(at[1], at[35]); MULADD(at[2], at[34]); MULADD(at[3], at[33]); MULADD(at[4], at[32]); MULADD(at[5], at[31]); MULADD(at[6], at[30]); MULADD(at[7], at[29]); MULADD(at[8], at[28]); MULADD(at[9], at[27]); MULADD(at[10], at[26]); MULADD(at[11], at[25]); MULADD(at[12], at[24]); MULADD(at[13], at[23]); MULADD(at[14], at[22]); MULADD(at[15], at[21]); MULADD(at[16], at[20]);
|
||||
COMBA_STORE(C->dp[16]);
|
||||
/* 17 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[37]); MULADD(at[1], at[36]); MULADD(at[2], at[35]); MULADD(at[3], at[34]); MULADD(at[4], at[33]); MULADD(at[5], at[32]); MULADD(at[6], at[31]); MULADD(at[7], at[30]); MULADD(at[8], at[29]); MULADD(at[9], at[28]); MULADD(at[10], at[27]); MULADD(at[11], at[26]); MULADD(at[12], at[25]); MULADD(at[13], at[24]); MULADD(at[14], at[23]); MULADD(at[15], at[22]); MULADD(at[16], at[21]); MULADD(at[17], at[20]);
|
||||
COMBA_STORE(C->dp[17]);
|
||||
/* 18 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[38]); MULADD(at[1], at[37]); MULADD(at[2], at[36]); MULADD(at[3], at[35]); MULADD(at[4], at[34]); MULADD(at[5], at[33]); MULADD(at[6], at[32]); MULADD(at[7], at[31]); MULADD(at[8], at[30]); MULADD(at[9], at[29]); MULADD(at[10], at[28]); MULADD(at[11], at[27]); MULADD(at[12], at[26]); MULADD(at[13], at[25]); MULADD(at[14], at[24]); MULADD(at[15], at[23]); MULADD(at[16], at[22]); MULADD(at[17], at[21]); MULADD(at[18], at[20]);
|
||||
COMBA_STORE(C->dp[18]);
|
||||
/* 19 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[39]); MULADD(at[1], at[38]); MULADD(at[2], at[37]); MULADD(at[3], at[36]); MULADD(at[4], at[35]); MULADD(at[5], at[34]); MULADD(at[6], at[33]); MULADD(at[7], at[32]); MULADD(at[8], at[31]); MULADD(at[9], at[30]); MULADD(at[10], at[29]); MULADD(at[11], at[28]); MULADD(at[12], at[27]); MULADD(at[13], at[26]); MULADD(at[14], at[25]); MULADD(at[15], at[24]); MULADD(at[16], at[23]); MULADD(at[17], at[22]); MULADD(at[18], at[21]); MULADD(at[19], at[20]);
|
||||
COMBA_STORE(C->dp[19]);
|
||||
/* 20 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[1], at[39]); MULADD(at[2], at[38]); MULADD(at[3], at[37]); MULADD(at[4], at[36]); MULADD(at[5], at[35]); MULADD(at[6], at[34]); MULADD(at[7], at[33]); MULADD(at[8], at[32]); MULADD(at[9], at[31]); MULADD(at[10], at[30]); MULADD(at[11], at[29]); MULADD(at[12], at[28]); MULADD(at[13], at[27]); MULADD(at[14], at[26]); MULADD(at[15], at[25]); MULADD(at[16], at[24]); MULADD(at[17], at[23]); MULADD(at[18], at[22]); MULADD(at[19], at[21]);
|
||||
COMBA_STORE(C->dp[20]);
|
||||
/* 21 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[2], at[39]); MULADD(at[3], at[38]); MULADD(at[4], at[37]); MULADD(at[5], at[36]); MULADD(at[6], at[35]); MULADD(at[7], at[34]); MULADD(at[8], at[33]); MULADD(at[9], at[32]); MULADD(at[10], at[31]); MULADD(at[11], at[30]); MULADD(at[12], at[29]); MULADD(at[13], at[28]); MULADD(at[14], at[27]); MULADD(at[15], at[26]); MULADD(at[16], at[25]); MULADD(at[17], at[24]); MULADD(at[18], at[23]); MULADD(at[19], at[22]);
|
||||
COMBA_STORE(C->dp[21]);
|
||||
/* 22 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[3], at[39]); MULADD(at[4], at[38]); MULADD(at[5], at[37]); MULADD(at[6], at[36]); MULADD(at[7], at[35]); MULADD(at[8], at[34]); MULADD(at[9], at[33]); MULADD(at[10], at[32]); MULADD(at[11], at[31]); MULADD(at[12], at[30]); MULADD(at[13], at[29]); MULADD(at[14], at[28]); MULADD(at[15], at[27]); MULADD(at[16], at[26]); MULADD(at[17], at[25]); MULADD(at[18], at[24]); MULADD(at[19], at[23]);
|
||||
COMBA_STORE(C->dp[22]);
|
||||
/* 23 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[4], at[39]); MULADD(at[5], at[38]); MULADD(at[6], at[37]); MULADD(at[7], at[36]); MULADD(at[8], at[35]); MULADD(at[9], at[34]); MULADD(at[10], at[33]); MULADD(at[11], at[32]); MULADD(at[12], at[31]); MULADD(at[13], at[30]); MULADD(at[14], at[29]); MULADD(at[15], at[28]); MULADD(at[16], at[27]); MULADD(at[17], at[26]); MULADD(at[18], at[25]); MULADD(at[19], at[24]);
|
||||
COMBA_STORE(C->dp[23]);
|
||||
/* 24 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[5], at[39]); MULADD(at[6], at[38]); MULADD(at[7], at[37]); MULADD(at[8], at[36]); MULADD(at[9], at[35]); MULADD(at[10], at[34]); MULADD(at[11], at[33]); MULADD(at[12], at[32]); MULADD(at[13], at[31]); MULADD(at[14], at[30]); MULADD(at[15], at[29]); MULADD(at[16], at[28]); MULADD(at[17], at[27]); MULADD(at[18], at[26]); MULADD(at[19], at[25]);
|
||||
COMBA_STORE(C->dp[24]);
|
||||
/* 25 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[6], at[39]); MULADD(at[7], at[38]); MULADD(at[8], at[37]); MULADD(at[9], at[36]); MULADD(at[10], at[35]); MULADD(at[11], at[34]); MULADD(at[12], at[33]); MULADD(at[13], at[32]); MULADD(at[14], at[31]); MULADD(at[15], at[30]); MULADD(at[16], at[29]); MULADD(at[17], at[28]); MULADD(at[18], at[27]); MULADD(at[19], at[26]);
|
||||
COMBA_STORE(C->dp[25]);
|
||||
/* 26 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[7], at[39]); MULADD(at[8], at[38]); MULADD(at[9], at[37]); MULADD(at[10], at[36]); MULADD(at[11], at[35]); MULADD(at[12], at[34]); MULADD(at[13], at[33]); MULADD(at[14], at[32]); MULADD(at[15], at[31]); MULADD(at[16], at[30]); MULADD(at[17], at[29]); MULADD(at[18], at[28]); MULADD(at[19], at[27]);
|
||||
COMBA_STORE(C->dp[26]);
|
||||
/* 27 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[8], at[39]); MULADD(at[9], at[38]); MULADD(at[10], at[37]); MULADD(at[11], at[36]); MULADD(at[12], at[35]); MULADD(at[13], at[34]); MULADD(at[14], at[33]); MULADD(at[15], at[32]); MULADD(at[16], at[31]); MULADD(at[17], at[30]); MULADD(at[18], at[29]); MULADD(at[19], at[28]);
|
||||
COMBA_STORE(C->dp[27]);
|
||||
/* 28 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[9], at[39]); MULADD(at[10], at[38]); MULADD(at[11], at[37]); MULADD(at[12], at[36]); MULADD(at[13], at[35]); MULADD(at[14], at[34]); MULADD(at[15], at[33]); MULADD(at[16], at[32]); MULADD(at[17], at[31]); MULADD(at[18], at[30]); MULADD(at[19], at[29]);
|
||||
COMBA_STORE(C->dp[28]);
|
||||
/* 29 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[10], at[39]); MULADD(at[11], at[38]); MULADD(at[12], at[37]); MULADD(at[13], at[36]); MULADD(at[14], at[35]); MULADD(at[15], at[34]); MULADD(at[16], at[33]); MULADD(at[17], at[32]); MULADD(at[18], at[31]); MULADD(at[19], at[30]);
|
||||
COMBA_STORE(C->dp[29]);
|
||||
/* 30 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[11], at[39]); MULADD(at[12], at[38]); MULADD(at[13], at[37]); MULADD(at[14], at[36]); MULADD(at[15], at[35]); MULADD(at[16], at[34]); MULADD(at[17], at[33]); MULADD(at[18], at[32]); MULADD(at[19], at[31]);
|
||||
COMBA_STORE(C->dp[30]);
|
||||
/* 31 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[12], at[39]); MULADD(at[13], at[38]); MULADD(at[14], at[37]); MULADD(at[15], at[36]); MULADD(at[16], at[35]); MULADD(at[17], at[34]); MULADD(at[18], at[33]); MULADD(at[19], at[32]);
|
||||
COMBA_STORE(C->dp[31]);
|
||||
/* 32 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[13], at[39]); MULADD(at[14], at[38]); MULADD(at[15], at[37]); MULADD(at[16], at[36]); MULADD(at[17], at[35]); MULADD(at[18], at[34]); MULADD(at[19], at[33]);
|
||||
COMBA_STORE(C->dp[32]);
|
||||
/* 33 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[14], at[39]); MULADD(at[15], at[38]); MULADD(at[16], at[37]); MULADD(at[17], at[36]); MULADD(at[18], at[35]); MULADD(at[19], at[34]);
|
||||
COMBA_STORE(C->dp[33]);
|
||||
/* 34 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[15], at[39]); MULADD(at[16], at[38]); MULADD(at[17], at[37]); MULADD(at[18], at[36]); MULADD(at[19], at[35]);
|
||||
COMBA_STORE(C->dp[34]);
|
||||
/* 35 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[16], at[39]); MULADD(at[17], at[38]); MULADD(at[18], at[37]); MULADD(at[19], at[36]);
|
||||
COMBA_STORE(C->dp[35]);
|
||||
/* 36 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[17], at[39]); MULADD(at[18], at[38]); MULADD(at[19], at[37]);
|
||||
COMBA_STORE(C->dp[36]);
|
||||
/* 37 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[18], at[39]); MULADD(at[19], at[38]);
|
||||
COMBA_STORE(C->dp[37]);
|
||||
/* 38 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[19], at[39]);
|
||||
COMBA_STORE(C->dp[38]);
|
||||
COMBA_STORE2(C->dp[39]);
|
||||
C->used = 40;
|
||||
C->sign = A->sign ^ B->sign;
|
||||
fp_clamp(C);
|
||||
COMBA_FINI;
|
||||
}
|
||||
#endif
|
||||
226
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/fp_mul_comba_24.i
Normal file
226
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/fp_mul_comba_24.i
Normal file
|
|
@ -0,0 +1,226 @@
|
|||
/* fp_mul_comba_24.i
|
||||
*
|
||||
* 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 TFM_MUL24
|
||||
void fp_mul_comba24(fp_int *A, fp_int *B, fp_int *C)
|
||||
{
|
||||
fp_digit c0, c1, c2, at[48];
|
||||
|
||||
memcpy(at, A->dp, 24 * sizeof(fp_digit));
|
||||
memcpy(at+24, B->dp, 24 * sizeof(fp_digit));
|
||||
COMBA_START;
|
||||
|
||||
COMBA_CLEAR;
|
||||
/* 0 */
|
||||
MULADD(at[0], at[24]);
|
||||
COMBA_STORE(C->dp[0]);
|
||||
/* 1 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[25]); MULADD(at[1], at[24]);
|
||||
COMBA_STORE(C->dp[1]);
|
||||
/* 2 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[26]); MULADD(at[1], at[25]); MULADD(at[2], at[24]);
|
||||
COMBA_STORE(C->dp[2]);
|
||||
/* 3 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[27]); MULADD(at[1], at[26]); MULADD(at[2], at[25]); MULADD(at[3], at[24]);
|
||||
COMBA_STORE(C->dp[3]);
|
||||
/* 4 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[28]); MULADD(at[1], at[27]); MULADD(at[2], at[26]); MULADD(at[3], at[25]); MULADD(at[4], at[24]);
|
||||
COMBA_STORE(C->dp[4]);
|
||||
/* 5 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[29]); MULADD(at[1], at[28]); MULADD(at[2], at[27]); MULADD(at[3], at[26]); MULADD(at[4], at[25]); MULADD(at[5], at[24]);
|
||||
COMBA_STORE(C->dp[5]);
|
||||
/* 6 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[30]); MULADD(at[1], at[29]); MULADD(at[2], at[28]); MULADD(at[3], at[27]); MULADD(at[4], at[26]); MULADD(at[5], at[25]); MULADD(at[6], at[24]);
|
||||
COMBA_STORE(C->dp[6]);
|
||||
/* 7 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[31]); MULADD(at[1], at[30]); MULADD(at[2], at[29]); MULADD(at[3], at[28]); MULADD(at[4], at[27]); MULADD(at[5], at[26]); MULADD(at[6], at[25]); MULADD(at[7], at[24]);
|
||||
COMBA_STORE(C->dp[7]);
|
||||
/* 8 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[32]); MULADD(at[1], at[31]); MULADD(at[2], at[30]); MULADD(at[3], at[29]); MULADD(at[4], at[28]); MULADD(at[5], at[27]); MULADD(at[6], at[26]); MULADD(at[7], at[25]); MULADD(at[8], at[24]);
|
||||
COMBA_STORE(C->dp[8]);
|
||||
/* 9 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[33]); MULADD(at[1], at[32]); MULADD(at[2], at[31]); MULADD(at[3], at[30]); MULADD(at[4], at[29]); MULADD(at[5], at[28]); MULADD(at[6], at[27]); MULADD(at[7], at[26]); MULADD(at[8], at[25]); MULADD(at[9], at[24]);
|
||||
COMBA_STORE(C->dp[9]);
|
||||
/* 10 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[34]); MULADD(at[1], at[33]); MULADD(at[2], at[32]); MULADD(at[3], at[31]); MULADD(at[4], at[30]); MULADD(at[5], at[29]); MULADD(at[6], at[28]); MULADD(at[7], at[27]); MULADD(at[8], at[26]); MULADD(at[9], at[25]); MULADD(at[10], at[24]);
|
||||
COMBA_STORE(C->dp[10]);
|
||||
/* 11 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[35]); MULADD(at[1], at[34]); MULADD(at[2], at[33]); MULADD(at[3], at[32]); MULADD(at[4], at[31]); MULADD(at[5], at[30]); MULADD(at[6], at[29]); MULADD(at[7], at[28]); MULADD(at[8], at[27]); MULADD(at[9], at[26]); MULADD(at[10], at[25]); MULADD(at[11], at[24]);
|
||||
COMBA_STORE(C->dp[11]);
|
||||
/* 12 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[36]); MULADD(at[1], at[35]); MULADD(at[2], at[34]); MULADD(at[3], at[33]); MULADD(at[4], at[32]); MULADD(at[5], at[31]); MULADD(at[6], at[30]); MULADD(at[7], at[29]); MULADD(at[8], at[28]); MULADD(at[9], at[27]); MULADD(at[10], at[26]); MULADD(at[11], at[25]); MULADD(at[12], at[24]);
|
||||
COMBA_STORE(C->dp[12]);
|
||||
/* 13 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[37]); MULADD(at[1], at[36]); MULADD(at[2], at[35]); MULADD(at[3], at[34]); MULADD(at[4], at[33]); MULADD(at[5], at[32]); MULADD(at[6], at[31]); MULADD(at[7], at[30]); MULADD(at[8], at[29]); MULADD(at[9], at[28]); MULADD(at[10], at[27]); MULADD(at[11], at[26]); MULADD(at[12], at[25]); MULADD(at[13], at[24]);
|
||||
COMBA_STORE(C->dp[13]);
|
||||
/* 14 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[38]); MULADD(at[1], at[37]); MULADD(at[2], at[36]); MULADD(at[3], at[35]); MULADD(at[4], at[34]); MULADD(at[5], at[33]); MULADD(at[6], at[32]); MULADD(at[7], at[31]); MULADD(at[8], at[30]); MULADD(at[9], at[29]); MULADD(at[10], at[28]); MULADD(at[11], at[27]); MULADD(at[12], at[26]); MULADD(at[13], at[25]); MULADD(at[14], at[24]);
|
||||
COMBA_STORE(C->dp[14]);
|
||||
/* 15 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[39]); MULADD(at[1], at[38]); MULADD(at[2], at[37]); MULADD(at[3], at[36]); MULADD(at[4], at[35]); MULADD(at[5], at[34]); MULADD(at[6], at[33]); MULADD(at[7], at[32]); MULADD(at[8], at[31]); MULADD(at[9], at[30]); MULADD(at[10], at[29]); MULADD(at[11], at[28]); MULADD(at[12], at[27]); MULADD(at[13], at[26]); MULADD(at[14], at[25]); MULADD(at[15], at[24]);
|
||||
COMBA_STORE(C->dp[15]);
|
||||
/* 16 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[40]); MULADD(at[1], at[39]); MULADD(at[2], at[38]); MULADD(at[3], at[37]); MULADD(at[4], at[36]); MULADD(at[5], at[35]); MULADD(at[6], at[34]); MULADD(at[7], at[33]); MULADD(at[8], at[32]); MULADD(at[9], at[31]); MULADD(at[10], at[30]); MULADD(at[11], at[29]); MULADD(at[12], at[28]); MULADD(at[13], at[27]); MULADD(at[14], at[26]); MULADD(at[15], at[25]); MULADD(at[16], at[24]);
|
||||
COMBA_STORE(C->dp[16]);
|
||||
/* 17 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[41]); MULADD(at[1], at[40]); MULADD(at[2], at[39]); MULADD(at[3], at[38]); MULADD(at[4], at[37]); MULADD(at[5], at[36]); MULADD(at[6], at[35]); MULADD(at[7], at[34]); MULADD(at[8], at[33]); MULADD(at[9], at[32]); MULADD(at[10], at[31]); MULADD(at[11], at[30]); MULADD(at[12], at[29]); MULADD(at[13], at[28]); MULADD(at[14], at[27]); MULADD(at[15], at[26]); MULADD(at[16], at[25]); MULADD(at[17], at[24]);
|
||||
COMBA_STORE(C->dp[17]);
|
||||
/* 18 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[42]); MULADD(at[1], at[41]); MULADD(at[2], at[40]); MULADD(at[3], at[39]); MULADD(at[4], at[38]); MULADD(at[5], at[37]); MULADD(at[6], at[36]); MULADD(at[7], at[35]); MULADD(at[8], at[34]); MULADD(at[9], at[33]); MULADD(at[10], at[32]); MULADD(at[11], at[31]); MULADD(at[12], at[30]); MULADD(at[13], at[29]); MULADD(at[14], at[28]); MULADD(at[15], at[27]); MULADD(at[16], at[26]); MULADD(at[17], at[25]); MULADD(at[18], at[24]);
|
||||
COMBA_STORE(C->dp[18]);
|
||||
/* 19 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[43]); MULADD(at[1], at[42]); MULADD(at[2], at[41]); MULADD(at[3], at[40]); MULADD(at[4], at[39]); MULADD(at[5], at[38]); MULADD(at[6], at[37]); MULADD(at[7], at[36]); MULADD(at[8], at[35]); MULADD(at[9], at[34]); MULADD(at[10], at[33]); MULADD(at[11], at[32]); MULADD(at[12], at[31]); MULADD(at[13], at[30]); MULADD(at[14], at[29]); MULADD(at[15], at[28]); MULADD(at[16], at[27]); MULADD(at[17], at[26]); MULADD(at[18], at[25]); MULADD(at[19], at[24]);
|
||||
COMBA_STORE(C->dp[19]);
|
||||
/* 20 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[44]); MULADD(at[1], at[43]); MULADD(at[2], at[42]); MULADD(at[3], at[41]); MULADD(at[4], at[40]); MULADD(at[5], at[39]); MULADD(at[6], at[38]); MULADD(at[7], at[37]); MULADD(at[8], at[36]); MULADD(at[9], at[35]); MULADD(at[10], at[34]); MULADD(at[11], at[33]); MULADD(at[12], at[32]); MULADD(at[13], at[31]); MULADD(at[14], at[30]); MULADD(at[15], at[29]); MULADD(at[16], at[28]); MULADD(at[17], at[27]); MULADD(at[18], at[26]); MULADD(at[19], at[25]); MULADD(at[20], at[24]);
|
||||
COMBA_STORE(C->dp[20]);
|
||||
/* 21 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[45]); MULADD(at[1], at[44]); MULADD(at[2], at[43]); MULADD(at[3], at[42]); MULADD(at[4], at[41]); MULADD(at[5], at[40]); MULADD(at[6], at[39]); MULADD(at[7], at[38]); MULADD(at[8], at[37]); MULADD(at[9], at[36]); MULADD(at[10], at[35]); MULADD(at[11], at[34]); MULADD(at[12], at[33]); MULADD(at[13], at[32]); MULADD(at[14], at[31]); MULADD(at[15], at[30]); MULADD(at[16], at[29]); MULADD(at[17], at[28]); MULADD(at[18], at[27]); MULADD(at[19], at[26]); MULADD(at[20], at[25]); MULADD(at[21], at[24]);
|
||||
COMBA_STORE(C->dp[21]);
|
||||
/* 22 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[46]); MULADD(at[1], at[45]); MULADD(at[2], at[44]); MULADD(at[3], at[43]); MULADD(at[4], at[42]); MULADD(at[5], at[41]); MULADD(at[6], at[40]); MULADD(at[7], at[39]); MULADD(at[8], at[38]); MULADD(at[9], at[37]); MULADD(at[10], at[36]); MULADD(at[11], at[35]); MULADD(at[12], at[34]); MULADD(at[13], at[33]); MULADD(at[14], at[32]); MULADD(at[15], at[31]); MULADD(at[16], at[30]); MULADD(at[17], at[29]); MULADD(at[18], at[28]); MULADD(at[19], at[27]); MULADD(at[20], at[26]); MULADD(at[21], at[25]); MULADD(at[22], at[24]);
|
||||
COMBA_STORE(C->dp[22]);
|
||||
/* 23 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[47]); MULADD(at[1], at[46]); MULADD(at[2], at[45]); MULADD(at[3], at[44]); MULADD(at[4], at[43]); MULADD(at[5], at[42]); MULADD(at[6], at[41]); MULADD(at[7], at[40]); MULADD(at[8], at[39]); MULADD(at[9], at[38]); MULADD(at[10], at[37]); MULADD(at[11], at[36]); MULADD(at[12], at[35]); MULADD(at[13], at[34]); MULADD(at[14], at[33]); MULADD(at[15], at[32]); MULADD(at[16], at[31]); MULADD(at[17], at[30]); MULADD(at[18], at[29]); MULADD(at[19], at[28]); MULADD(at[20], at[27]); MULADD(at[21], at[26]); MULADD(at[22], at[25]); MULADD(at[23], at[24]);
|
||||
COMBA_STORE(C->dp[23]);
|
||||
/* 24 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[1], at[47]); MULADD(at[2], at[46]); MULADD(at[3], at[45]); MULADD(at[4], at[44]); MULADD(at[5], at[43]); MULADD(at[6], at[42]); MULADD(at[7], at[41]); MULADD(at[8], at[40]); MULADD(at[9], at[39]); MULADD(at[10], at[38]); MULADD(at[11], at[37]); MULADD(at[12], at[36]); MULADD(at[13], at[35]); MULADD(at[14], at[34]); MULADD(at[15], at[33]); MULADD(at[16], at[32]); MULADD(at[17], at[31]); MULADD(at[18], at[30]); MULADD(at[19], at[29]); MULADD(at[20], at[28]); MULADD(at[21], at[27]); MULADD(at[22], at[26]); MULADD(at[23], at[25]);
|
||||
COMBA_STORE(C->dp[24]);
|
||||
/* 25 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[2], at[47]); MULADD(at[3], at[46]); MULADD(at[4], at[45]); MULADD(at[5], at[44]); MULADD(at[6], at[43]); MULADD(at[7], at[42]); MULADD(at[8], at[41]); MULADD(at[9], at[40]); MULADD(at[10], at[39]); MULADD(at[11], at[38]); MULADD(at[12], at[37]); MULADD(at[13], at[36]); MULADD(at[14], at[35]); MULADD(at[15], at[34]); MULADD(at[16], at[33]); MULADD(at[17], at[32]); MULADD(at[18], at[31]); MULADD(at[19], at[30]); MULADD(at[20], at[29]); MULADD(at[21], at[28]); MULADD(at[22], at[27]); MULADD(at[23], at[26]);
|
||||
COMBA_STORE(C->dp[25]);
|
||||
/* 26 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[3], at[47]); MULADD(at[4], at[46]); MULADD(at[5], at[45]); MULADD(at[6], at[44]); MULADD(at[7], at[43]); MULADD(at[8], at[42]); MULADD(at[9], at[41]); MULADD(at[10], at[40]); MULADD(at[11], at[39]); MULADD(at[12], at[38]); MULADD(at[13], at[37]); MULADD(at[14], at[36]); MULADD(at[15], at[35]); MULADD(at[16], at[34]); MULADD(at[17], at[33]); MULADD(at[18], at[32]); MULADD(at[19], at[31]); MULADD(at[20], at[30]); MULADD(at[21], at[29]); MULADD(at[22], at[28]); MULADD(at[23], at[27]);
|
||||
COMBA_STORE(C->dp[26]);
|
||||
/* 27 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[4], at[47]); MULADD(at[5], at[46]); MULADD(at[6], at[45]); MULADD(at[7], at[44]); MULADD(at[8], at[43]); MULADD(at[9], at[42]); MULADD(at[10], at[41]); MULADD(at[11], at[40]); MULADD(at[12], at[39]); MULADD(at[13], at[38]); MULADD(at[14], at[37]); MULADD(at[15], at[36]); MULADD(at[16], at[35]); MULADD(at[17], at[34]); MULADD(at[18], at[33]); MULADD(at[19], at[32]); MULADD(at[20], at[31]); MULADD(at[21], at[30]); MULADD(at[22], at[29]); MULADD(at[23], at[28]);
|
||||
COMBA_STORE(C->dp[27]);
|
||||
/* 28 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[5], at[47]); MULADD(at[6], at[46]); MULADD(at[7], at[45]); MULADD(at[8], at[44]); MULADD(at[9], at[43]); MULADD(at[10], at[42]); MULADD(at[11], at[41]); MULADD(at[12], at[40]); MULADD(at[13], at[39]); MULADD(at[14], at[38]); MULADD(at[15], at[37]); MULADD(at[16], at[36]); MULADD(at[17], at[35]); MULADD(at[18], at[34]); MULADD(at[19], at[33]); MULADD(at[20], at[32]); MULADD(at[21], at[31]); MULADD(at[22], at[30]); MULADD(at[23], at[29]);
|
||||
COMBA_STORE(C->dp[28]);
|
||||
/* 29 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[6], at[47]); MULADD(at[7], at[46]); MULADD(at[8], at[45]); MULADD(at[9], at[44]); MULADD(at[10], at[43]); MULADD(at[11], at[42]); MULADD(at[12], at[41]); MULADD(at[13], at[40]); MULADD(at[14], at[39]); MULADD(at[15], at[38]); MULADD(at[16], at[37]); MULADD(at[17], at[36]); MULADD(at[18], at[35]); MULADD(at[19], at[34]); MULADD(at[20], at[33]); MULADD(at[21], at[32]); MULADD(at[22], at[31]); MULADD(at[23], at[30]);
|
||||
COMBA_STORE(C->dp[29]);
|
||||
/* 30 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[7], at[47]); MULADD(at[8], at[46]); MULADD(at[9], at[45]); MULADD(at[10], at[44]); MULADD(at[11], at[43]); MULADD(at[12], at[42]); MULADD(at[13], at[41]); MULADD(at[14], at[40]); MULADD(at[15], at[39]); MULADD(at[16], at[38]); MULADD(at[17], at[37]); MULADD(at[18], at[36]); MULADD(at[19], at[35]); MULADD(at[20], at[34]); MULADD(at[21], at[33]); MULADD(at[22], at[32]); MULADD(at[23], at[31]);
|
||||
COMBA_STORE(C->dp[30]);
|
||||
/* 31 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[8], at[47]); MULADD(at[9], at[46]); MULADD(at[10], at[45]); MULADD(at[11], at[44]); MULADD(at[12], at[43]); MULADD(at[13], at[42]); MULADD(at[14], at[41]); MULADD(at[15], at[40]); MULADD(at[16], at[39]); MULADD(at[17], at[38]); MULADD(at[18], at[37]); MULADD(at[19], at[36]); MULADD(at[20], at[35]); MULADD(at[21], at[34]); MULADD(at[22], at[33]); MULADD(at[23], at[32]);
|
||||
COMBA_STORE(C->dp[31]);
|
||||
/* 32 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[9], at[47]); MULADD(at[10], at[46]); MULADD(at[11], at[45]); MULADD(at[12], at[44]); MULADD(at[13], at[43]); MULADD(at[14], at[42]); MULADD(at[15], at[41]); MULADD(at[16], at[40]); MULADD(at[17], at[39]); MULADD(at[18], at[38]); MULADD(at[19], at[37]); MULADD(at[20], at[36]); MULADD(at[21], at[35]); MULADD(at[22], at[34]); MULADD(at[23], at[33]);
|
||||
COMBA_STORE(C->dp[32]);
|
||||
/* 33 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[10], at[47]); MULADD(at[11], at[46]); MULADD(at[12], at[45]); MULADD(at[13], at[44]); MULADD(at[14], at[43]); MULADD(at[15], at[42]); MULADD(at[16], at[41]); MULADD(at[17], at[40]); MULADD(at[18], at[39]); MULADD(at[19], at[38]); MULADD(at[20], at[37]); MULADD(at[21], at[36]); MULADD(at[22], at[35]); MULADD(at[23], at[34]);
|
||||
COMBA_STORE(C->dp[33]);
|
||||
/* 34 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[11], at[47]); MULADD(at[12], at[46]); MULADD(at[13], at[45]); MULADD(at[14], at[44]); MULADD(at[15], at[43]); MULADD(at[16], at[42]); MULADD(at[17], at[41]); MULADD(at[18], at[40]); MULADD(at[19], at[39]); MULADD(at[20], at[38]); MULADD(at[21], at[37]); MULADD(at[22], at[36]); MULADD(at[23], at[35]);
|
||||
COMBA_STORE(C->dp[34]);
|
||||
/* 35 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[12], at[47]); MULADD(at[13], at[46]); MULADD(at[14], at[45]); MULADD(at[15], at[44]); MULADD(at[16], at[43]); MULADD(at[17], at[42]); MULADD(at[18], at[41]); MULADD(at[19], at[40]); MULADD(at[20], at[39]); MULADD(at[21], at[38]); MULADD(at[22], at[37]); MULADD(at[23], at[36]);
|
||||
COMBA_STORE(C->dp[35]);
|
||||
/* 36 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[13], at[47]); MULADD(at[14], at[46]); MULADD(at[15], at[45]); MULADD(at[16], at[44]); MULADD(at[17], at[43]); MULADD(at[18], at[42]); MULADD(at[19], at[41]); MULADD(at[20], at[40]); MULADD(at[21], at[39]); MULADD(at[22], at[38]); MULADD(at[23], at[37]);
|
||||
COMBA_STORE(C->dp[36]);
|
||||
/* 37 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[14], at[47]); MULADD(at[15], at[46]); MULADD(at[16], at[45]); MULADD(at[17], at[44]); MULADD(at[18], at[43]); MULADD(at[19], at[42]); MULADD(at[20], at[41]); MULADD(at[21], at[40]); MULADD(at[22], at[39]); MULADD(at[23], at[38]);
|
||||
COMBA_STORE(C->dp[37]);
|
||||
/* 38 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[15], at[47]); MULADD(at[16], at[46]); MULADD(at[17], at[45]); MULADD(at[18], at[44]); MULADD(at[19], at[43]); MULADD(at[20], at[42]); MULADD(at[21], at[41]); MULADD(at[22], at[40]); MULADD(at[23], at[39]);
|
||||
COMBA_STORE(C->dp[38]);
|
||||
/* 39 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[16], at[47]); MULADD(at[17], at[46]); MULADD(at[18], at[45]); MULADD(at[19], at[44]); MULADD(at[20], at[43]); MULADD(at[21], at[42]); MULADD(at[22], at[41]); MULADD(at[23], at[40]);
|
||||
COMBA_STORE(C->dp[39]);
|
||||
/* 40 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[17], at[47]); MULADD(at[18], at[46]); MULADD(at[19], at[45]); MULADD(at[20], at[44]); MULADD(at[21], at[43]); MULADD(at[22], at[42]); MULADD(at[23], at[41]);
|
||||
COMBA_STORE(C->dp[40]);
|
||||
/* 41 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[18], at[47]); MULADD(at[19], at[46]); MULADD(at[20], at[45]); MULADD(at[21], at[44]); MULADD(at[22], at[43]); MULADD(at[23], at[42]);
|
||||
COMBA_STORE(C->dp[41]);
|
||||
/* 42 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[19], at[47]); MULADD(at[20], at[46]); MULADD(at[21], at[45]); MULADD(at[22], at[44]); MULADD(at[23], at[43]);
|
||||
COMBA_STORE(C->dp[42]);
|
||||
/* 43 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[20], at[47]); MULADD(at[21], at[46]); MULADD(at[22], at[45]); MULADD(at[23], at[44]);
|
||||
COMBA_STORE(C->dp[43]);
|
||||
/* 44 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[21], at[47]); MULADD(at[22], at[46]); MULADD(at[23], at[45]);
|
||||
COMBA_STORE(C->dp[44]);
|
||||
/* 45 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[22], at[47]); MULADD(at[23], at[46]);
|
||||
COMBA_STORE(C->dp[45]);
|
||||
/* 46 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[23], at[47]);
|
||||
COMBA_STORE(C->dp[46]);
|
||||
COMBA_STORE2(C->dp[47]);
|
||||
C->used = 48;
|
||||
C->sign = A->sign ^ B->sign;
|
||||
fp_clamp(C);
|
||||
COMBA_FINI;
|
||||
}
|
||||
#endif
|
||||
258
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/fp_mul_comba_28.i
Normal file
258
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/fp_mul_comba_28.i
Normal file
|
|
@ -0,0 +1,258 @@
|
|||
/* fp_mul_comba_28.i
|
||||
*
|
||||
* 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 TFM_MUL28
|
||||
void fp_mul_comba28(fp_int *A, fp_int *B, fp_int *C)
|
||||
{
|
||||
fp_digit c0, c1, c2, at[56];
|
||||
|
||||
memcpy(at, A->dp, 28 * sizeof(fp_digit));
|
||||
memcpy(at+28, B->dp, 28 * sizeof(fp_digit));
|
||||
COMBA_START;
|
||||
|
||||
COMBA_CLEAR;
|
||||
/* 0 */
|
||||
MULADD(at[0], at[28]);
|
||||
COMBA_STORE(C->dp[0]);
|
||||
/* 1 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[29]); MULADD(at[1], at[28]);
|
||||
COMBA_STORE(C->dp[1]);
|
||||
/* 2 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[30]); MULADD(at[1], at[29]); MULADD(at[2], at[28]);
|
||||
COMBA_STORE(C->dp[2]);
|
||||
/* 3 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[31]); MULADD(at[1], at[30]); MULADD(at[2], at[29]); MULADD(at[3], at[28]);
|
||||
COMBA_STORE(C->dp[3]);
|
||||
/* 4 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[32]); MULADD(at[1], at[31]); MULADD(at[2], at[30]); MULADD(at[3], at[29]); MULADD(at[4], at[28]);
|
||||
COMBA_STORE(C->dp[4]);
|
||||
/* 5 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[33]); MULADD(at[1], at[32]); MULADD(at[2], at[31]); MULADD(at[3], at[30]); MULADD(at[4], at[29]); MULADD(at[5], at[28]);
|
||||
COMBA_STORE(C->dp[5]);
|
||||
/* 6 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[34]); MULADD(at[1], at[33]); MULADD(at[2], at[32]); MULADD(at[3], at[31]); MULADD(at[4], at[30]); MULADD(at[5], at[29]); MULADD(at[6], at[28]);
|
||||
COMBA_STORE(C->dp[6]);
|
||||
/* 7 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[35]); MULADD(at[1], at[34]); MULADD(at[2], at[33]); MULADD(at[3], at[32]); MULADD(at[4], at[31]); MULADD(at[5], at[30]); MULADD(at[6], at[29]); MULADD(at[7], at[28]);
|
||||
COMBA_STORE(C->dp[7]);
|
||||
/* 8 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[36]); MULADD(at[1], at[35]); MULADD(at[2], at[34]); MULADD(at[3], at[33]); MULADD(at[4], at[32]); MULADD(at[5], at[31]); MULADD(at[6], at[30]); MULADD(at[7], at[29]); MULADD(at[8], at[28]);
|
||||
COMBA_STORE(C->dp[8]);
|
||||
/* 9 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[37]); MULADD(at[1], at[36]); MULADD(at[2], at[35]); MULADD(at[3], at[34]); MULADD(at[4], at[33]); MULADD(at[5], at[32]); MULADD(at[6], at[31]); MULADD(at[7], at[30]); MULADD(at[8], at[29]); MULADD(at[9], at[28]);
|
||||
COMBA_STORE(C->dp[9]);
|
||||
/* 10 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[38]); MULADD(at[1], at[37]); MULADD(at[2], at[36]); MULADD(at[3], at[35]); MULADD(at[4], at[34]); MULADD(at[5], at[33]); MULADD(at[6], at[32]); MULADD(at[7], at[31]); MULADD(at[8], at[30]); MULADD(at[9], at[29]); MULADD(at[10], at[28]);
|
||||
COMBA_STORE(C->dp[10]);
|
||||
/* 11 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[39]); MULADD(at[1], at[38]); MULADD(at[2], at[37]); MULADD(at[3], at[36]); MULADD(at[4], at[35]); MULADD(at[5], at[34]); MULADD(at[6], at[33]); MULADD(at[7], at[32]); MULADD(at[8], at[31]); MULADD(at[9], at[30]); MULADD(at[10], at[29]); MULADD(at[11], at[28]);
|
||||
COMBA_STORE(C->dp[11]);
|
||||
/* 12 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[40]); MULADD(at[1], at[39]); MULADD(at[2], at[38]); MULADD(at[3], at[37]); MULADD(at[4], at[36]); MULADD(at[5], at[35]); MULADD(at[6], at[34]); MULADD(at[7], at[33]); MULADD(at[8], at[32]); MULADD(at[9], at[31]); MULADD(at[10], at[30]); MULADD(at[11], at[29]); MULADD(at[12], at[28]);
|
||||
COMBA_STORE(C->dp[12]);
|
||||
/* 13 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[41]); MULADD(at[1], at[40]); MULADD(at[2], at[39]); MULADD(at[3], at[38]); MULADD(at[4], at[37]); MULADD(at[5], at[36]); MULADD(at[6], at[35]); MULADD(at[7], at[34]); MULADD(at[8], at[33]); MULADD(at[9], at[32]); MULADD(at[10], at[31]); MULADD(at[11], at[30]); MULADD(at[12], at[29]); MULADD(at[13], at[28]);
|
||||
COMBA_STORE(C->dp[13]);
|
||||
/* 14 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[42]); MULADD(at[1], at[41]); MULADD(at[2], at[40]); MULADD(at[3], at[39]); MULADD(at[4], at[38]); MULADD(at[5], at[37]); MULADD(at[6], at[36]); MULADD(at[7], at[35]); MULADD(at[8], at[34]); MULADD(at[9], at[33]); MULADD(at[10], at[32]); MULADD(at[11], at[31]); MULADD(at[12], at[30]); MULADD(at[13], at[29]); MULADD(at[14], at[28]);
|
||||
COMBA_STORE(C->dp[14]);
|
||||
/* 15 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[43]); MULADD(at[1], at[42]); MULADD(at[2], at[41]); MULADD(at[3], at[40]); MULADD(at[4], at[39]); MULADD(at[5], at[38]); MULADD(at[6], at[37]); MULADD(at[7], at[36]); MULADD(at[8], at[35]); MULADD(at[9], at[34]); MULADD(at[10], at[33]); MULADD(at[11], at[32]); MULADD(at[12], at[31]); MULADD(at[13], at[30]); MULADD(at[14], at[29]); MULADD(at[15], at[28]);
|
||||
COMBA_STORE(C->dp[15]);
|
||||
/* 16 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[44]); MULADD(at[1], at[43]); MULADD(at[2], at[42]); MULADD(at[3], at[41]); MULADD(at[4], at[40]); MULADD(at[5], at[39]); MULADD(at[6], at[38]); MULADD(at[7], at[37]); MULADD(at[8], at[36]); MULADD(at[9], at[35]); MULADD(at[10], at[34]); MULADD(at[11], at[33]); MULADD(at[12], at[32]); MULADD(at[13], at[31]); MULADD(at[14], at[30]); MULADD(at[15], at[29]); MULADD(at[16], at[28]);
|
||||
COMBA_STORE(C->dp[16]);
|
||||
/* 17 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[45]); MULADD(at[1], at[44]); MULADD(at[2], at[43]); MULADD(at[3], at[42]); MULADD(at[4], at[41]); MULADD(at[5], at[40]); MULADD(at[6], at[39]); MULADD(at[7], at[38]); MULADD(at[8], at[37]); MULADD(at[9], at[36]); MULADD(at[10], at[35]); MULADD(at[11], at[34]); MULADD(at[12], at[33]); MULADD(at[13], at[32]); MULADD(at[14], at[31]); MULADD(at[15], at[30]); MULADD(at[16], at[29]); MULADD(at[17], at[28]);
|
||||
COMBA_STORE(C->dp[17]);
|
||||
/* 18 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[46]); MULADD(at[1], at[45]); MULADD(at[2], at[44]); MULADD(at[3], at[43]); MULADD(at[4], at[42]); MULADD(at[5], at[41]); MULADD(at[6], at[40]); MULADD(at[7], at[39]); MULADD(at[8], at[38]); MULADD(at[9], at[37]); MULADD(at[10], at[36]); MULADD(at[11], at[35]); MULADD(at[12], at[34]); MULADD(at[13], at[33]); MULADD(at[14], at[32]); MULADD(at[15], at[31]); MULADD(at[16], at[30]); MULADD(at[17], at[29]); MULADD(at[18], at[28]);
|
||||
COMBA_STORE(C->dp[18]);
|
||||
/* 19 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[47]); MULADD(at[1], at[46]); MULADD(at[2], at[45]); MULADD(at[3], at[44]); MULADD(at[4], at[43]); MULADD(at[5], at[42]); MULADD(at[6], at[41]); MULADD(at[7], at[40]); MULADD(at[8], at[39]); MULADD(at[9], at[38]); MULADD(at[10], at[37]); MULADD(at[11], at[36]); MULADD(at[12], at[35]); MULADD(at[13], at[34]); MULADD(at[14], at[33]); MULADD(at[15], at[32]); MULADD(at[16], at[31]); MULADD(at[17], at[30]); MULADD(at[18], at[29]); MULADD(at[19], at[28]);
|
||||
COMBA_STORE(C->dp[19]);
|
||||
/* 20 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[48]); MULADD(at[1], at[47]); MULADD(at[2], at[46]); MULADD(at[3], at[45]); MULADD(at[4], at[44]); MULADD(at[5], at[43]); MULADD(at[6], at[42]); MULADD(at[7], at[41]); MULADD(at[8], at[40]); MULADD(at[9], at[39]); MULADD(at[10], at[38]); MULADD(at[11], at[37]); MULADD(at[12], at[36]); MULADD(at[13], at[35]); MULADD(at[14], at[34]); MULADD(at[15], at[33]); MULADD(at[16], at[32]); MULADD(at[17], at[31]); MULADD(at[18], at[30]); MULADD(at[19], at[29]); MULADD(at[20], at[28]);
|
||||
COMBA_STORE(C->dp[20]);
|
||||
/* 21 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[49]); MULADD(at[1], at[48]); MULADD(at[2], at[47]); MULADD(at[3], at[46]); MULADD(at[4], at[45]); MULADD(at[5], at[44]); MULADD(at[6], at[43]); MULADD(at[7], at[42]); MULADD(at[8], at[41]); MULADD(at[9], at[40]); MULADD(at[10], at[39]); MULADD(at[11], at[38]); MULADD(at[12], at[37]); MULADD(at[13], at[36]); MULADD(at[14], at[35]); MULADD(at[15], at[34]); MULADD(at[16], at[33]); MULADD(at[17], at[32]); MULADD(at[18], at[31]); MULADD(at[19], at[30]); MULADD(at[20], at[29]); MULADD(at[21], at[28]);
|
||||
COMBA_STORE(C->dp[21]);
|
||||
/* 22 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[50]); MULADD(at[1], at[49]); MULADD(at[2], at[48]); MULADD(at[3], at[47]); MULADD(at[4], at[46]); MULADD(at[5], at[45]); MULADD(at[6], at[44]); MULADD(at[7], at[43]); MULADD(at[8], at[42]); MULADD(at[9], at[41]); MULADD(at[10], at[40]); MULADD(at[11], at[39]); MULADD(at[12], at[38]); MULADD(at[13], at[37]); MULADD(at[14], at[36]); MULADD(at[15], at[35]); MULADD(at[16], at[34]); MULADD(at[17], at[33]); MULADD(at[18], at[32]); MULADD(at[19], at[31]); MULADD(at[20], at[30]); MULADD(at[21], at[29]); MULADD(at[22], at[28]);
|
||||
COMBA_STORE(C->dp[22]);
|
||||
/* 23 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[51]); MULADD(at[1], at[50]); MULADD(at[2], at[49]); MULADD(at[3], at[48]); MULADD(at[4], at[47]); MULADD(at[5], at[46]); MULADD(at[6], at[45]); MULADD(at[7], at[44]); MULADD(at[8], at[43]); MULADD(at[9], at[42]); MULADD(at[10], at[41]); MULADD(at[11], at[40]); MULADD(at[12], at[39]); MULADD(at[13], at[38]); MULADD(at[14], at[37]); MULADD(at[15], at[36]); MULADD(at[16], at[35]); MULADD(at[17], at[34]); MULADD(at[18], at[33]); MULADD(at[19], at[32]); MULADD(at[20], at[31]); MULADD(at[21], at[30]); MULADD(at[22], at[29]); MULADD(at[23], at[28]);
|
||||
COMBA_STORE(C->dp[23]);
|
||||
/* 24 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[52]); MULADD(at[1], at[51]); MULADD(at[2], at[50]); MULADD(at[3], at[49]); MULADD(at[4], at[48]); MULADD(at[5], at[47]); MULADD(at[6], at[46]); MULADD(at[7], at[45]); MULADD(at[8], at[44]); MULADD(at[9], at[43]); MULADD(at[10], at[42]); MULADD(at[11], at[41]); MULADD(at[12], at[40]); MULADD(at[13], at[39]); MULADD(at[14], at[38]); MULADD(at[15], at[37]); MULADD(at[16], at[36]); MULADD(at[17], at[35]); MULADD(at[18], at[34]); MULADD(at[19], at[33]); MULADD(at[20], at[32]); MULADD(at[21], at[31]); MULADD(at[22], at[30]); MULADD(at[23], at[29]); MULADD(at[24], at[28]);
|
||||
COMBA_STORE(C->dp[24]);
|
||||
/* 25 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[53]); MULADD(at[1], at[52]); MULADD(at[2], at[51]); MULADD(at[3], at[50]); MULADD(at[4], at[49]); MULADD(at[5], at[48]); MULADD(at[6], at[47]); MULADD(at[7], at[46]); MULADD(at[8], at[45]); MULADD(at[9], at[44]); MULADD(at[10], at[43]); MULADD(at[11], at[42]); MULADD(at[12], at[41]); MULADD(at[13], at[40]); MULADD(at[14], at[39]); MULADD(at[15], at[38]); MULADD(at[16], at[37]); MULADD(at[17], at[36]); MULADD(at[18], at[35]); MULADD(at[19], at[34]); MULADD(at[20], at[33]); MULADD(at[21], at[32]); MULADD(at[22], at[31]); MULADD(at[23], at[30]); MULADD(at[24], at[29]); MULADD(at[25], at[28]);
|
||||
COMBA_STORE(C->dp[25]);
|
||||
/* 26 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[54]); MULADD(at[1], at[53]); MULADD(at[2], at[52]); MULADD(at[3], at[51]); MULADD(at[4], at[50]); MULADD(at[5], at[49]); MULADD(at[6], at[48]); MULADD(at[7], at[47]); MULADD(at[8], at[46]); MULADD(at[9], at[45]); MULADD(at[10], at[44]); MULADD(at[11], at[43]); MULADD(at[12], at[42]); MULADD(at[13], at[41]); MULADD(at[14], at[40]); MULADD(at[15], at[39]); MULADD(at[16], at[38]); MULADD(at[17], at[37]); MULADD(at[18], at[36]); MULADD(at[19], at[35]); MULADD(at[20], at[34]); MULADD(at[21], at[33]); MULADD(at[22], at[32]); MULADD(at[23], at[31]); MULADD(at[24], at[30]); MULADD(at[25], at[29]); MULADD(at[26], at[28]);
|
||||
COMBA_STORE(C->dp[26]);
|
||||
/* 27 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[55]); MULADD(at[1], at[54]); MULADD(at[2], at[53]); MULADD(at[3], at[52]); MULADD(at[4], at[51]); MULADD(at[5], at[50]); MULADD(at[6], at[49]); MULADD(at[7], at[48]); MULADD(at[8], at[47]); MULADD(at[9], at[46]); MULADD(at[10], at[45]); MULADD(at[11], at[44]); MULADD(at[12], at[43]); MULADD(at[13], at[42]); MULADD(at[14], at[41]); MULADD(at[15], at[40]); MULADD(at[16], at[39]); MULADD(at[17], at[38]); MULADD(at[18], at[37]); MULADD(at[19], at[36]); MULADD(at[20], at[35]); MULADD(at[21], at[34]); MULADD(at[22], at[33]); MULADD(at[23], at[32]); MULADD(at[24], at[31]); MULADD(at[25], at[30]); MULADD(at[26], at[29]); MULADD(at[27], at[28]);
|
||||
COMBA_STORE(C->dp[27]);
|
||||
/* 28 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[1], at[55]); MULADD(at[2], at[54]); MULADD(at[3], at[53]); MULADD(at[4], at[52]); MULADD(at[5], at[51]); MULADD(at[6], at[50]); MULADD(at[7], at[49]); MULADD(at[8], at[48]); MULADD(at[9], at[47]); MULADD(at[10], at[46]); MULADD(at[11], at[45]); MULADD(at[12], at[44]); MULADD(at[13], at[43]); MULADD(at[14], at[42]); MULADD(at[15], at[41]); MULADD(at[16], at[40]); MULADD(at[17], at[39]); MULADD(at[18], at[38]); MULADD(at[19], at[37]); MULADD(at[20], at[36]); MULADD(at[21], at[35]); MULADD(at[22], at[34]); MULADD(at[23], at[33]); MULADD(at[24], at[32]); MULADD(at[25], at[31]); MULADD(at[26], at[30]); MULADD(at[27], at[29]);
|
||||
COMBA_STORE(C->dp[28]);
|
||||
/* 29 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[2], at[55]); MULADD(at[3], at[54]); MULADD(at[4], at[53]); MULADD(at[5], at[52]); MULADD(at[6], at[51]); MULADD(at[7], at[50]); MULADD(at[8], at[49]); MULADD(at[9], at[48]); MULADD(at[10], at[47]); MULADD(at[11], at[46]); MULADD(at[12], at[45]); MULADD(at[13], at[44]); MULADD(at[14], at[43]); MULADD(at[15], at[42]); MULADD(at[16], at[41]); MULADD(at[17], at[40]); MULADD(at[18], at[39]); MULADD(at[19], at[38]); MULADD(at[20], at[37]); MULADD(at[21], at[36]); MULADD(at[22], at[35]); MULADD(at[23], at[34]); MULADD(at[24], at[33]); MULADD(at[25], at[32]); MULADD(at[26], at[31]); MULADD(at[27], at[30]);
|
||||
COMBA_STORE(C->dp[29]);
|
||||
/* 30 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[3], at[55]); MULADD(at[4], at[54]); MULADD(at[5], at[53]); MULADD(at[6], at[52]); MULADD(at[7], at[51]); MULADD(at[8], at[50]); MULADD(at[9], at[49]); MULADD(at[10], at[48]); MULADD(at[11], at[47]); MULADD(at[12], at[46]); MULADD(at[13], at[45]); MULADD(at[14], at[44]); MULADD(at[15], at[43]); MULADD(at[16], at[42]); MULADD(at[17], at[41]); MULADD(at[18], at[40]); MULADD(at[19], at[39]); MULADD(at[20], at[38]); MULADD(at[21], at[37]); MULADD(at[22], at[36]); MULADD(at[23], at[35]); MULADD(at[24], at[34]); MULADD(at[25], at[33]); MULADD(at[26], at[32]); MULADD(at[27], at[31]);
|
||||
COMBA_STORE(C->dp[30]);
|
||||
/* 31 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[4], at[55]); MULADD(at[5], at[54]); MULADD(at[6], at[53]); MULADD(at[7], at[52]); MULADD(at[8], at[51]); MULADD(at[9], at[50]); MULADD(at[10], at[49]); MULADD(at[11], at[48]); MULADD(at[12], at[47]); MULADD(at[13], at[46]); MULADD(at[14], at[45]); MULADD(at[15], at[44]); MULADD(at[16], at[43]); MULADD(at[17], at[42]); MULADD(at[18], at[41]); MULADD(at[19], at[40]); MULADD(at[20], at[39]); MULADD(at[21], at[38]); MULADD(at[22], at[37]); MULADD(at[23], at[36]); MULADD(at[24], at[35]); MULADD(at[25], at[34]); MULADD(at[26], at[33]); MULADD(at[27], at[32]);
|
||||
COMBA_STORE(C->dp[31]);
|
||||
/* 32 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[5], at[55]); MULADD(at[6], at[54]); MULADD(at[7], at[53]); MULADD(at[8], at[52]); MULADD(at[9], at[51]); MULADD(at[10], at[50]); MULADD(at[11], at[49]); MULADD(at[12], at[48]); MULADD(at[13], at[47]); MULADD(at[14], at[46]); MULADD(at[15], at[45]); MULADD(at[16], at[44]); MULADD(at[17], at[43]); MULADD(at[18], at[42]); MULADD(at[19], at[41]); MULADD(at[20], at[40]); MULADD(at[21], at[39]); MULADD(at[22], at[38]); MULADD(at[23], at[37]); MULADD(at[24], at[36]); MULADD(at[25], at[35]); MULADD(at[26], at[34]); MULADD(at[27], at[33]);
|
||||
COMBA_STORE(C->dp[32]);
|
||||
/* 33 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[6], at[55]); MULADD(at[7], at[54]); MULADD(at[8], at[53]); MULADD(at[9], at[52]); MULADD(at[10], at[51]); MULADD(at[11], at[50]); MULADD(at[12], at[49]); MULADD(at[13], at[48]); MULADD(at[14], at[47]); MULADD(at[15], at[46]); MULADD(at[16], at[45]); MULADD(at[17], at[44]); MULADD(at[18], at[43]); MULADD(at[19], at[42]); MULADD(at[20], at[41]); MULADD(at[21], at[40]); MULADD(at[22], at[39]); MULADD(at[23], at[38]); MULADD(at[24], at[37]); MULADD(at[25], at[36]); MULADD(at[26], at[35]); MULADD(at[27], at[34]);
|
||||
COMBA_STORE(C->dp[33]);
|
||||
/* 34 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[7], at[55]); MULADD(at[8], at[54]); MULADD(at[9], at[53]); MULADD(at[10], at[52]); MULADD(at[11], at[51]); MULADD(at[12], at[50]); MULADD(at[13], at[49]); MULADD(at[14], at[48]); MULADD(at[15], at[47]); MULADD(at[16], at[46]); MULADD(at[17], at[45]); MULADD(at[18], at[44]); MULADD(at[19], at[43]); MULADD(at[20], at[42]); MULADD(at[21], at[41]); MULADD(at[22], at[40]); MULADD(at[23], at[39]); MULADD(at[24], at[38]); MULADD(at[25], at[37]); MULADD(at[26], at[36]); MULADD(at[27], at[35]);
|
||||
COMBA_STORE(C->dp[34]);
|
||||
/* 35 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[8], at[55]); MULADD(at[9], at[54]); MULADD(at[10], at[53]); MULADD(at[11], at[52]); MULADD(at[12], at[51]); MULADD(at[13], at[50]); MULADD(at[14], at[49]); MULADD(at[15], at[48]); MULADD(at[16], at[47]); MULADD(at[17], at[46]); MULADD(at[18], at[45]); MULADD(at[19], at[44]); MULADD(at[20], at[43]); MULADD(at[21], at[42]); MULADD(at[22], at[41]); MULADD(at[23], at[40]); MULADD(at[24], at[39]); MULADD(at[25], at[38]); MULADD(at[26], at[37]); MULADD(at[27], at[36]);
|
||||
COMBA_STORE(C->dp[35]);
|
||||
/* 36 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[9], at[55]); MULADD(at[10], at[54]); MULADD(at[11], at[53]); MULADD(at[12], at[52]); MULADD(at[13], at[51]); MULADD(at[14], at[50]); MULADD(at[15], at[49]); MULADD(at[16], at[48]); MULADD(at[17], at[47]); MULADD(at[18], at[46]); MULADD(at[19], at[45]); MULADD(at[20], at[44]); MULADD(at[21], at[43]); MULADD(at[22], at[42]); MULADD(at[23], at[41]); MULADD(at[24], at[40]); MULADD(at[25], at[39]); MULADD(at[26], at[38]); MULADD(at[27], at[37]);
|
||||
COMBA_STORE(C->dp[36]);
|
||||
/* 37 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[10], at[55]); MULADD(at[11], at[54]); MULADD(at[12], at[53]); MULADD(at[13], at[52]); MULADD(at[14], at[51]); MULADD(at[15], at[50]); MULADD(at[16], at[49]); MULADD(at[17], at[48]); MULADD(at[18], at[47]); MULADD(at[19], at[46]); MULADD(at[20], at[45]); MULADD(at[21], at[44]); MULADD(at[22], at[43]); MULADD(at[23], at[42]); MULADD(at[24], at[41]); MULADD(at[25], at[40]); MULADD(at[26], at[39]); MULADD(at[27], at[38]);
|
||||
COMBA_STORE(C->dp[37]);
|
||||
/* 38 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[11], at[55]); MULADD(at[12], at[54]); MULADD(at[13], at[53]); MULADD(at[14], at[52]); MULADD(at[15], at[51]); MULADD(at[16], at[50]); MULADD(at[17], at[49]); MULADD(at[18], at[48]); MULADD(at[19], at[47]); MULADD(at[20], at[46]); MULADD(at[21], at[45]); MULADD(at[22], at[44]); MULADD(at[23], at[43]); MULADD(at[24], at[42]); MULADD(at[25], at[41]); MULADD(at[26], at[40]); MULADD(at[27], at[39]);
|
||||
COMBA_STORE(C->dp[38]);
|
||||
/* 39 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[12], at[55]); MULADD(at[13], at[54]); MULADD(at[14], at[53]); MULADD(at[15], at[52]); MULADD(at[16], at[51]); MULADD(at[17], at[50]); MULADD(at[18], at[49]); MULADD(at[19], at[48]); MULADD(at[20], at[47]); MULADD(at[21], at[46]); MULADD(at[22], at[45]); MULADD(at[23], at[44]); MULADD(at[24], at[43]); MULADD(at[25], at[42]); MULADD(at[26], at[41]); MULADD(at[27], at[40]);
|
||||
COMBA_STORE(C->dp[39]);
|
||||
/* 40 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[13], at[55]); MULADD(at[14], at[54]); MULADD(at[15], at[53]); MULADD(at[16], at[52]); MULADD(at[17], at[51]); MULADD(at[18], at[50]); MULADD(at[19], at[49]); MULADD(at[20], at[48]); MULADD(at[21], at[47]); MULADD(at[22], at[46]); MULADD(at[23], at[45]); MULADD(at[24], at[44]); MULADD(at[25], at[43]); MULADD(at[26], at[42]); MULADD(at[27], at[41]);
|
||||
COMBA_STORE(C->dp[40]);
|
||||
/* 41 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[14], at[55]); MULADD(at[15], at[54]); MULADD(at[16], at[53]); MULADD(at[17], at[52]); MULADD(at[18], at[51]); MULADD(at[19], at[50]); MULADD(at[20], at[49]); MULADD(at[21], at[48]); MULADD(at[22], at[47]); MULADD(at[23], at[46]); MULADD(at[24], at[45]); MULADD(at[25], at[44]); MULADD(at[26], at[43]); MULADD(at[27], at[42]);
|
||||
COMBA_STORE(C->dp[41]);
|
||||
/* 42 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[15], at[55]); MULADD(at[16], at[54]); MULADD(at[17], at[53]); MULADD(at[18], at[52]); MULADD(at[19], at[51]); MULADD(at[20], at[50]); MULADD(at[21], at[49]); MULADD(at[22], at[48]); MULADD(at[23], at[47]); MULADD(at[24], at[46]); MULADD(at[25], at[45]); MULADD(at[26], at[44]); MULADD(at[27], at[43]);
|
||||
COMBA_STORE(C->dp[42]);
|
||||
/* 43 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[16], at[55]); MULADD(at[17], at[54]); MULADD(at[18], at[53]); MULADD(at[19], at[52]); MULADD(at[20], at[51]); MULADD(at[21], at[50]); MULADD(at[22], at[49]); MULADD(at[23], at[48]); MULADD(at[24], at[47]); MULADD(at[25], at[46]); MULADD(at[26], at[45]); MULADD(at[27], at[44]);
|
||||
COMBA_STORE(C->dp[43]);
|
||||
/* 44 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[17], at[55]); MULADD(at[18], at[54]); MULADD(at[19], at[53]); MULADD(at[20], at[52]); MULADD(at[21], at[51]); MULADD(at[22], at[50]); MULADD(at[23], at[49]); MULADD(at[24], at[48]); MULADD(at[25], at[47]); MULADD(at[26], at[46]); MULADD(at[27], at[45]);
|
||||
COMBA_STORE(C->dp[44]);
|
||||
/* 45 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[18], at[55]); MULADD(at[19], at[54]); MULADD(at[20], at[53]); MULADD(at[21], at[52]); MULADD(at[22], at[51]); MULADD(at[23], at[50]); MULADD(at[24], at[49]); MULADD(at[25], at[48]); MULADD(at[26], at[47]); MULADD(at[27], at[46]);
|
||||
COMBA_STORE(C->dp[45]);
|
||||
/* 46 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[19], at[55]); MULADD(at[20], at[54]); MULADD(at[21], at[53]); MULADD(at[22], at[52]); MULADD(at[23], at[51]); MULADD(at[24], at[50]); MULADD(at[25], at[49]); MULADD(at[26], at[48]); MULADD(at[27], at[47]);
|
||||
COMBA_STORE(C->dp[46]);
|
||||
/* 47 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[20], at[55]); MULADD(at[21], at[54]); MULADD(at[22], at[53]); MULADD(at[23], at[52]); MULADD(at[24], at[51]); MULADD(at[25], at[50]); MULADD(at[26], at[49]); MULADD(at[27], at[48]);
|
||||
COMBA_STORE(C->dp[47]);
|
||||
/* 48 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[21], at[55]); MULADD(at[22], at[54]); MULADD(at[23], at[53]); MULADD(at[24], at[52]); MULADD(at[25], at[51]); MULADD(at[26], at[50]); MULADD(at[27], at[49]);
|
||||
COMBA_STORE(C->dp[48]);
|
||||
/* 49 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[22], at[55]); MULADD(at[23], at[54]); MULADD(at[24], at[53]); MULADD(at[25], at[52]); MULADD(at[26], at[51]); MULADD(at[27], at[50]);
|
||||
COMBA_STORE(C->dp[49]);
|
||||
/* 50 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[23], at[55]); MULADD(at[24], at[54]); MULADD(at[25], at[53]); MULADD(at[26], at[52]); MULADD(at[27], at[51]);
|
||||
COMBA_STORE(C->dp[50]);
|
||||
/* 51 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[24], at[55]); MULADD(at[25], at[54]); MULADD(at[26], at[53]); MULADD(at[27], at[52]);
|
||||
COMBA_STORE(C->dp[51]);
|
||||
/* 52 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[25], at[55]); MULADD(at[26], at[54]); MULADD(at[27], at[53]);
|
||||
COMBA_STORE(C->dp[52]);
|
||||
/* 53 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[26], at[55]); MULADD(at[27], at[54]);
|
||||
COMBA_STORE(C->dp[53]);
|
||||
/* 54 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[27], at[55]);
|
||||
COMBA_STORE(C->dp[54]);
|
||||
COMBA_STORE2(C->dp[55]);
|
||||
C->used = 56;
|
||||
C->sign = A->sign ^ B->sign;
|
||||
fp_clamp(C);
|
||||
COMBA_FINI;
|
||||
}
|
||||
#endif
|
||||
58
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/fp_mul_comba_3.i
Normal file
58
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/fp_mul_comba_3.i
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
/* fp_mul_comba_3.i
|
||||
*
|
||||
* 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 TFM_MUL3
|
||||
void fp_mul_comba3(fp_int *A, fp_int *B, fp_int *C)
|
||||
{
|
||||
fp_digit c0, c1, c2, at[6];
|
||||
|
||||
memcpy(at, A->dp, 3 * sizeof(fp_digit));
|
||||
memcpy(at+3, B->dp, 3 * sizeof(fp_digit));
|
||||
COMBA_START;
|
||||
|
||||
COMBA_CLEAR;
|
||||
/* 0 */
|
||||
MULADD(at[0], at[3]);
|
||||
COMBA_STORE(C->dp[0]);
|
||||
/* 1 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[4]); MULADD(at[1], at[3]);
|
||||
COMBA_STORE(C->dp[1]);
|
||||
/* 2 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[5]); MULADD(at[1], at[4]); MULADD(at[2], at[3]);
|
||||
COMBA_STORE(C->dp[2]);
|
||||
/* 3 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[1], at[5]); MULADD(at[2], at[4]);
|
||||
COMBA_STORE(C->dp[3]);
|
||||
/* 4 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[2], at[5]);
|
||||
COMBA_STORE(C->dp[4]);
|
||||
COMBA_STORE2(C->dp[5]);
|
||||
C->used = 6;
|
||||
C->sign = A->sign ^ B->sign;
|
||||
fp_clamp(C);
|
||||
COMBA_FINI;
|
||||
}
|
||||
#endif
|
||||
304
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/fp_mul_comba_32.i
Normal file
304
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/fp_mul_comba_32.i
Normal file
|
|
@ -0,0 +1,304 @@
|
|||
/* fp_mul_comba_32.i
|
||||
*
|
||||
* 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 TFM_MUL32
|
||||
void fp_mul_comba32(fp_int *A, fp_int *B, fp_int *C)
|
||||
{
|
||||
fp_digit c0, c1, c2, at[64];
|
||||
int out_size;
|
||||
|
||||
out_size = A->used + B->used;
|
||||
memcpy(at, A->dp, 32 * sizeof(fp_digit));
|
||||
memcpy(at+32, B->dp, 32 * sizeof(fp_digit));
|
||||
COMBA_START;
|
||||
|
||||
COMBA_CLEAR;
|
||||
/* 0 */
|
||||
MULADD(at[0], at[32]);
|
||||
COMBA_STORE(C->dp[0]);
|
||||
/* 1 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[33]); MULADD(at[1], at[32]);
|
||||
COMBA_STORE(C->dp[1]);
|
||||
/* 2 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[34]); MULADD(at[1], at[33]); MULADD(at[2], at[32]);
|
||||
COMBA_STORE(C->dp[2]);
|
||||
/* 3 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[35]); MULADD(at[1], at[34]); MULADD(at[2], at[33]); MULADD(at[3], at[32]);
|
||||
COMBA_STORE(C->dp[3]);
|
||||
/* 4 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[36]); MULADD(at[1], at[35]); MULADD(at[2], at[34]); MULADD(at[3], at[33]); MULADD(at[4], at[32]);
|
||||
COMBA_STORE(C->dp[4]);
|
||||
/* 5 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[37]); MULADD(at[1], at[36]); MULADD(at[2], at[35]); MULADD(at[3], at[34]); MULADD(at[4], at[33]); MULADD(at[5], at[32]);
|
||||
COMBA_STORE(C->dp[5]);
|
||||
/* 6 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[38]); MULADD(at[1], at[37]); MULADD(at[2], at[36]); MULADD(at[3], at[35]); MULADD(at[4], at[34]); MULADD(at[5], at[33]); MULADD(at[6], at[32]);
|
||||
COMBA_STORE(C->dp[6]);
|
||||
/* 7 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[39]); MULADD(at[1], at[38]); MULADD(at[2], at[37]); MULADD(at[3], at[36]); MULADD(at[4], at[35]); MULADD(at[5], at[34]); MULADD(at[6], at[33]); MULADD(at[7], at[32]);
|
||||
COMBA_STORE(C->dp[7]);
|
||||
/* 8 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[40]); MULADD(at[1], at[39]); MULADD(at[2], at[38]); MULADD(at[3], at[37]); MULADD(at[4], at[36]); MULADD(at[5], at[35]); MULADD(at[6], at[34]); MULADD(at[7], at[33]); MULADD(at[8], at[32]);
|
||||
COMBA_STORE(C->dp[8]);
|
||||
/* 9 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[41]); MULADD(at[1], at[40]); MULADD(at[2], at[39]); MULADD(at[3], at[38]); MULADD(at[4], at[37]); MULADD(at[5], at[36]); MULADD(at[6], at[35]); MULADD(at[7], at[34]); MULADD(at[8], at[33]); MULADD(at[9], at[32]);
|
||||
COMBA_STORE(C->dp[9]);
|
||||
/* 10 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[42]); MULADD(at[1], at[41]); MULADD(at[2], at[40]); MULADD(at[3], at[39]); MULADD(at[4], at[38]); MULADD(at[5], at[37]); MULADD(at[6], at[36]); MULADD(at[7], at[35]); MULADD(at[8], at[34]); MULADD(at[9], at[33]); MULADD(at[10], at[32]);
|
||||
COMBA_STORE(C->dp[10]);
|
||||
/* 11 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[43]); MULADD(at[1], at[42]); MULADD(at[2], at[41]); MULADD(at[3], at[40]); MULADD(at[4], at[39]); MULADD(at[5], at[38]); MULADD(at[6], at[37]); MULADD(at[7], at[36]); MULADD(at[8], at[35]); MULADD(at[9], at[34]); MULADD(at[10], at[33]); MULADD(at[11], at[32]);
|
||||
COMBA_STORE(C->dp[11]);
|
||||
/* 12 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[44]); MULADD(at[1], at[43]); MULADD(at[2], at[42]); MULADD(at[3], at[41]); MULADD(at[4], at[40]); MULADD(at[5], at[39]); MULADD(at[6], at[38]); MULADD(at[7], at[37]); MULADD(at[8], at[36]); MULADD(at[9], at[35]); MULADD(at[10], at[34]); MULADD(at[11], at[33]); MULADD(at[12], at[32]);
|
||||
COMBA_STORE(C->dp[12]);
|
||||
/* 13 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[45]); MULADD(at[1], at[44]); MULADD(at[2], at[43]); MULADD(at[3], at[42]); MULADD(at[4], at[41]); MULADD(at[5], at[40]); MULADD(at[6], at[39]); MULADD(at[7], at[38]); MULADD(at[8], at[37]); MULADD(at[9], at[36]); MULADD(at[10], at[35]); MULADD(at[11], at[34]); MULADD(at[12], at[33]); MULADD(at[13], at[32]);
|
||||
COMBA_STORE(C->dp[13]);
|
||||
/* 14 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[46]); MULADD(at[1], at[45]); MULADD(at[2], at[44]); MULADD(at[3], at[43]); MULADD(at[4], at[42]); MULADD(at[5], at[41]); MULADD(at[6], at[40]); MULADD(at[7], at[39]); MULADD(at[8], at[38]); MULADD(at[9], at[37]); MULADD(at[10], at[36]); MULADD(at[11], at[35]); MULADD(at[12], at[34]); MULADD(at[13], at[33]); MULADD(at[14], at[32]);
|
||||
COMBA_STORE(C->dp[14]);
|
||||
/* 15 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[47]); MULADD(at[1], at[46]); MULADD(at[2], at[45]); MULADD(at[3], at[44]); MULADD(at[4], at[43]); MULADD(at[5], at[42]); MULADD(at[6], at[41]); MULADD(at[7], at[40]); MULADD(at[8], at[39]); MULADD(at[9], at[38]); MULADD(at[10], at[37]); MULADD(at[11], at[36]); MULADD(at[12], at[35]); MULADD(at[13], at[34]); MULADD(at[14], at[33]); MULADD(at[15], at[32]);
|
||||
COMBA_STORE(C->dp[15]);
|
||||
/* 16 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[48]); MULADD(at[1], at[47]); MULADD(at[2], at[46]); MULADD(at[3], at[45]); MULADD(at[4], at[44]); MULADD(at[5], at[43]); MULADD(at[6], at[42]); MULADD(at[7], at[41]); MULADD(at[8], at[40]); MULADD(at[9], at[39]); MULADD(at[10], at[38]); MULADD(at[11], at[37]); MULADD(at[12], at[36]); MULADD(at[13], at[35]); MULADD(at[14], at[34]); MULADD(at[15], at[33]); MULADD(at[16], at[32]);
|
||||
COMBA_STORE(C->dp[16]);
|
||||
/* 17 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[49]); MULADD(at[1], at[48]); MULADD(at[2], at[47]); MULADD(at[3], at[46]); MULADD(at[4], at[45]); MULADD(at[5], at[44]); MULADD(at[6], at[43]); MULADD(at[7], at[42]); MULADD(at[8], at[41]); MULADD(at[9], at[40]); MULADD(at[10], at[39]); MULADD(at[11], at[38]); MULADD(at[12], at[37]); MULADD(at[13], at[36]); MULADD(at[14], at[35]); MULADD(at[15], at[34]); MULADD(at[16], at[33]); MULADD(at[17], at[32]);
|
||||
COMBA_STORE(C->dp[17]);
|
||||
/* 18 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[50]); MULADD(at[1], at[49]); MULADD(at[2], at[48]); MULADD(at[3], at[47]); MULADD(at[4], at[46]); MULADD(at[5], at[45]); MULADD(at[6], at[44]); MULADD(at[7], at[43]); MULADD(at[8], at[42]); MULADD(at[9], at[41]); MULADD(at[10], at[40]); MULADD(at[11], at[39]); MULADD(at[12], at[38]); MULADD(at[13], at[37]); MULADD(at[14], at[36]); MULADD(at[15], at[35]); MULADD(at[16], at[34]); MULADD(at[17], at[33]); MULADD(at[18], at[32]);
|
||||
COMBA_STORE(C->dp[18]);
|
||||
/* 19 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[51]); MULADD(at[1], at[50]); MULADD(at[2], at[49]); MULADD(at[3], at[48]); MULADD(at[4], at[47]); MULADD(at[5], at[46]); MULADD(at[6], at[45]); MULADD(at[7], at[44]); MULADD(at[8], at[43]); MULADD(at[9], at[42]); MULADD(at[10], at[41]); MULADD(at[11], at[40]); MULADD(at[12], at[39]); MULADD(at[13], at[38]); MULADD(at[14], at[37]); MULADD(at[15], at[36]); MULADD(at[16], at[35]); MULADD(at[17], at[34]); MULADD(at[18], at[33]); MULADD(at[19], at[32]);
|
||||
COMBA_STORE(C->dp[19]);
|
||||
/* 20 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[52]); MULADD(at[1], at[51]); MULADD(at[2], at[50]); MULADD(at[3], at[49]); MULADD(at[4], at[48]); MULADD(at[5], at[47]); MULADD(at[6], at[46]); MULADD(at[7], at[45]); MULADD(at[8], at[44]); MULADD(at[9], at[43]); MULADD(at[10], at[42]); MULADD(at[11], at[41]); MULADD(at[12], at[40]); MULADD(at[13], at[39]); MULADD(at[14], at[38]); MULADD(at[15], at[37]); MULADD(at[16], at[36]); MULADD(at[17], at[35]); MULADD(at[18], at[34]); MULADD(at[19], at[33]); MULADD(at[20], at[32]);
|
||||
COMBA_STORE(C->dp[20]);
|
||||
/* 21 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[53]); MULADD(at[1], at[52]); MULADD(at[2], at[51]); MULADD(at[3], at[50]); MULADD(at[4], at[49]); MULADD(at[5], at[48]); MULADD(at[6], at[47]); MULADD(at[7], at[46]); MULADD(at[8], at[45]); MULADD(at[9], at[44]); MULADD(at[10], at[43]); MULADD(at[11], at[42]); MULADD(at[12], at[41]); MULADD(at[13], at[40]); MULADD(at[14], at[39]); MULADD(at[15], at[38]); MULADD(at[16], at[37]); MULADD(at[17], at[36]); MULADD(at[18], at[35]); MULADD(at[19], at[34]); MULADD(at[20], at[33]); MULADD(at[21], at[32]);
|
||||
COMBA_STORE(C->dp[21]);
|
||||
/* 22 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[54]); MULADD(at[1], at[53]); MULADD(at[2], at[52]); MULADD(at[3], at[51]); MULADD(at[4], at[50]); MULADD(at[5], at[49]); MULADD(at[6], at[48]); MULADD(at[7], at[47]); MULADD(at[8], at[46]); MULADD(at[9], at[45]); MULADD(at[10], at[44]); MULADD(at[11], at[43]); MULADD(at[12], at[42]); MULADD(at[13], at[41]); MULADD(at[14], at[40]); MULADD(at[15], at[39]); MULADD(at[16], at[38]); MULADD(at[17], at[37]); MULADD(at[18], at[36]); MULADD(at[19], at[35]); MULADD(at[20], at[34]); MULADD(at[21], at[33]); MULADD(at[22], at[32]);
|
||||
COMBA_STORE(C->dp[22]);
|
||||
/* 23 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[55]); MULADD(at[1], at[54]); MULADD(at[2], at[53]); MULADD(at[3], at[52]); MULADD(at[4], at[51]); MULADD(at[5], at[50]); MULADD(at[6], at[49]); MULADD(at[7], at[48]); MULADD(at[8], at[47]); MULADD(at[9], at[46]); MULADD(at[10], at[45]); MULADD(at[11], at[44]); MULADD(at[12], at[43]); MULADD(at[13], at[42]); MULADD(at[14], at[41]); MULADD(at[15], at[40]); MULADD(at[16], at[39]); MULADD(at[17], at[38]); MULADD(at[18], at[37]); MULADD(at[19], at[36]); MULADD(at[20], at[35]); MULADD(at[21], at[34]); MULADD(at[22], at[33]); MULADD(at[23], at[32]);
|
||||
COMBA_STORE(C->dp[23]);
|
||||
/* 24 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[56]); MULADD(at[1], at[55]); MULADD(at[2], at[54]); MULADD(at[3], at[53]); MULADD(at[4], at[52]); MULADD(at[5], at[51]); MULADD(at[6], at[50]); MULADD(at[7], at[49]); MULADD(at[8], at[48]); MULADD(at[9], at[47]); MULADD(at[10], at[46]); MULADD(at[11], at[45]); MULADD(at[12], at[44]); MULADD(at[13], at[43]); MULADD(at[14], at[42]); MULADD(at[15], at[41]); MULADD(at[16], at[40]); MULADD(at[17], at[39]); MULADD(at[18], at[38]); MULADD(at[19], at[37]); MULADD(at[20], at[36]); MULADD(at[21], at[35]); MULADD(at[22], at[34]); MULADD(at[23], at[33]); MULADD(at[24], at[32]);
|
||||
COMBA_STORE(C->dp[24]);
|
||||
/* 25 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[57]); MULADD(at[1], at[56]); MULADD(at[2], at[55]); MULADD(at[3], at[54]); MULADD(at[4], at[53]); MULADD(at[5], at[52]); MULADD(at[6], at[51]); MULADD(at[7], at[50]); MULADD(at[8], at[49]); MULADD(at[9], at[48]); MULADD(at[10], at[47]); MULADD(at[11], at[46]); MULADD(at[12], at[45]); MULADD(at[13], at[44]); MULADD(at[14], at[43]); MULADD(at[15], at[42]); MULADD(at[16], at[41]); MULADD(at[17], at[40]); MULADD(at[18], at[39]); MULADD(at[19], at[38]); MULADD(at[20], at[37]); MULADD(at[21], at[36]); MULADD(at[22], at[35]); MULADD(at[23], at[34]); MULADD(at[24], at[33]); MULADD(at[25], at[32]);
|
||||
COMBA_STORE(C->dp[25]);
|
||||
/* 26 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[58]); MULADD(at[1], at[57]); MULADD(at[2], at[56]); MULADD(at[3], at[55]); MULADD(at[4], at[54]); MULADD(at[5], at[53]); MULADD(at[6], at[52]); MULADD(at[7], at[51]); MULADD(at[8], at[50]); MULADD(at[9], at[49]); MULADD(at[10], at[48]); MULADD(at[11], at[47]); MULADD(at[12], at[46]); MULADD(at[13], at[45]); MULADD(at[14], at[44]); MULADD(at[15], at[43]); MULADD(at[16], at[42]); MULADD(at[17], at[41]); MULADD(at[18], at[40]); MULADD(at[19], at[39]); MULADD(at[20], at[38]); MULADD(at[21], at[37]); MULADD(at[22], at[36]); MULADD(at[23], at[35]); MULADD(at[24], at[34]); MULADD(at[25], at[33]); MULADD(at[26], at[32]);
|
||||
COMBA_STORE(C->dp[26]);
|
||||
/* 27 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[59]); MULADD(at[1], at[58]); MULADD(at[2], at[57]); MULADD(at[3], at[56]); MULADD(at[4], at[55]); MULADD(at[5], at[54]); MULADD(at[6], at[53]); MULADD(at[7], at[52]); MULADD(at[8], at[51]); MULADD(at[9], at[50]); MULADD(at[10], at[49]); MULADD(at[11], at[48]); MULADD(at[12], at[47]); MULADD(at[13], at[46]); MULADD(at[14], at[45]); MULADD(at[15], at[44]); MULADD(at[16], at[43]); MULADD(at[17], at[42]); MULADD(at[18], at[41]); MULADD(at[19], at[40]); MULADD(at[20], at[39]); MULADD(at[21], at[38]); MULADD(at[22], at[37]); MULADD(at[23], at[36]); MULADD(at[24], at[35]); MULADD(at[25], at[34]); MULADD(at[26], at[33]); MULADD(at[27], at[32]);
|
||||
COMBA_STORE(C->dp[27]);
|
||||
/* 28 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[60]); MULADD(at[1], at[59]); MULADD(at[2], at[58]); MULADD(at[3], at[57]); MULADD(at[4], at[56]); MULADD(at[5], at[55]); MULADD(at[6], at[54]); MULADD(at[7], at[53]); MULADD(at[8], at[52]); MULADD(at[9], at[51]); MULADD(at[10], at[50]); MULADD(at[11], at[49]); MULADD(at[12], at[48]); MULADD(at[13], at[47]); MULADD(at[14], at[46]); MULADD(at[15], at[45]); MULADD(at[16], at[44]); MULADD(at[17], at[43]); MULADD(at[18], at[42]); MULADD(at[19], at[41]); MULADD(at[20], at[40]); MULADD(at[21], at[39]); MULADD(at[22], at[38]); MULADD(at[23], at[37]); MULADD(at[24], at[36]); MULADD(at[25], at[35]); MULADD(at[26], at[34]); MULADD(at[27], at[33]); MULADD(at[28], at[32]);
|
||||
COMBA_STORE(C->dp[28]);
|
||||
/* 29 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[61]); MULADD(at[1], at[60]); MULADD(at[2], at[59]); MULADD(at[3], at[58]); MULADD(at[4], at[57]); MULADD(at[5], at[56]); MULADD(at[6], at[55]); MULADD(at[7], at[54]); MULADD(at[8], at[53]); MULADD(at[9], at[52]); MULADD(at[10], at[51]); MULADD(at[11], at[50]); MULADD(at[12], at[49]); MULADD(at[13], at[48]); MULADD(at[14], at[47]); MULADD(at[15], at[46]); MULADD(at[16], at[45]); MULADD(at[17], at[44]); MULADD(at[18], at[43]); MULADD(at[19], at[42]); MULADD(at[20], at[41]); MULADD(at[21], at[40]); MULADD(at[22], at[39]); MULADD(at[23], at[38]); MULADD(at[24], at[37]); MULADD(at[25], at[36]); MULADD(at[26], at[35]); MULADD(at[27], at[34]); MULADD(at[28], at[33]); MULADD(at[29], at[32]);
|
||||
COMBA_STORE(C->dp[29]);
|
||||
/* 30 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[62]); MULADD(at[1], at[61]); MULADD(at[2], at[60]); MULADD(at[3], at[59]); MULADD(at[4], at[58]); MULADD(at[5], at[57]); MULADD(at[6], at[56]); MULADD(at[7], at[55]); MULADD(at[8], at[54]); MULADD(at[9], at[53]); MULADD(at[10], at[52]); MULADD(at[11], at[51]); MULADD(at[12], at[50]); MULADD(at[13], at[49]); MULADD(at[14], at[48]); MULADD(at[15], at[47]); MULADD(at[16], at[46]); MULADD(at[17], at[45]); MULADD(at[18], at[44]); MULADD(at[19], at[43]); MULADD(at[20], at[42]); MULADD(at[21], at[41]); MULADD(at[22], at[40]); MULADD(at[23], at[39]); MULADD(at[24], at[38]); MULADD(at[25], at[37]); MULADD(at[26], at[36]); MULADD(at[27], at[35]); MULADD(at[28], at[34]); MULADD(at[29], at[33]); MULADD(at[30], at[32]);
|
||||
COMBA_STORE(C->dp[30]);
|
||||
/* 31 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[63]); MULADD(at[1], at[62]); MULADD(at[2], at[61]); MULADD(at[3], at[60]); MULADD(at[4], at[59]); MULADD(at[5], at[58]); MULADD(at[6], at[57]); MULADD(at[7], at[56]); MULADD(at[8], at[55]); MULADD(at[9], at[54]); MULADD(at[10], at[53]); MULADD(at[11], at[52]); MULADD(at[12], at[51]); MULADD(at[13], at[50]); MULADD(at[14], at[49]); MULADD(at[15], at[48]); MULADD(at[16], at[47]); MULADD(at[17], at[46]); MULADD(at[18], at[45]); MULADD(at[19], at[44]); MULADD(at[20], at[43]); MULADD(at[21], at[42]); MULADD(at[22], at[41]); MULADD(at[23], at[40]); MULADD(at[24], at[39]); MULADD(at[25], at[38]); MULADD(at[26], at[37]); MULADD(at[27], at[36]); MULADD(at[28], at[35]); MULADD(at[29], at[34]); MULADD(at[30], at[33]); MULADD(at[31], at[32]);
|
||||
COMBA_STORE(C->dp[31]);
|
||||
/* 32 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[1], at[63]); MULADD(at[2], at[62]); MULADD(at[3], at[61]); MULADD(at[4], at[60]); MULADD(at[5], at[59]); MULADD(at[6], at[58]); MULADD(at[7], at[57]); MULADD(at[8], at[56]); MULADD(at[9], at[55]); MULADD(at[10], at[54]); MULADD(at[11], at[53]); MULADD(at[12], at[52]); MULADD(at[13], at[51]); MULADD(at[14], at[50]); MULADD(at[15], at[49]); MULADD(at[16], at[48]); MULADD(at[17], at[47]); MULADD(at[18], at[46]); MULADD(at[19], at[45]); MULADD(at[20], at[44]); MULADD(at[21], at[43]); MULADD(at[22], at[42]); MULADD(at[23], at[41]); MULADD(at[24], at[40]); MULADD(at[25], at[39]); MULADD(at[26], at[38]); MULADD(at[27], at[37]); MULADD(at[28], at[36]); MULADD(at[29], at[35]); MULADD(at[30], at[34]); MULADD(at[31], at[33]);
|
||||
COMBA_STORE(C->dp[32]);
|
||||
/* 33 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[2], at[63]); MULADD(at[3], at[62]); MULADD(at[4], at[61]); MULADD(at[5], at[60]); MULADD(at[6], at[59]); MULADD(at[7], at[58]); MULADD(at[8], at[57]); MULADD(at[9], at[56]); MULADD(at[10], at[55]); MULADD(at[11], at[54]); MULADD(at[12], at[53]); MULADD(at[13], at[52]); MULADD(at[14], at[51]); MULADD(at[15], at[50]); MULADD(at[16], at[49]); MULADD(at[17], at[48]); MULADD(at[18], at[47]); MULADD(at[19], at[46]); MULADD(at[20], at[45]); MULADD(at[21], at[44]); MULADD(at[22], at[43]); MULADD(at[23], at[42]); MULADD(at[24], at[41]); MULADD(at[25], at[40]); MULADD(at[26], at[39]); MULADD(at[27], at[38]); MULADD(at[28], at[37]); MULADD(at[29], at[36]); MULADD(at[30], at[35]); MULADD(at[31], at[34]);
|
||||
COMBA_STORE(C->dp[33]);
|
||||
/* 34 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[3], at[63]); MULADD(at[4], at[62]); MULADD(at[5], at[61]); MULADD(at[6], at[60]); MULADD(at[7], at[59]); MULADD(at[8], at[58]); MULADD(at[9], at[57]); MULADD(at[10], at[56]); MULADD(at[11], at[55]); MULADD(at[12], at[54]); MULADD(at[13], at[53]); MULADD(at[14], at[52]); MULADD(at[15], at[51]); MULADD(at[16], at[50]); MULADD(at[17], at[49]); MULADD(at[18], at[48]); MULADD(at[19], at[47]); MULADD(at[20], at[46]); MULADD(at[21], at[45]); MULADD(at[22], at[44]); MULADD(at[23], at[43]); MULADD(at[24], at[42]); MULADD(at[25], at[41]); MULADD(at[26], at[40]); MULADD(at[27], at[39]); MULADD(at[28], at[38]); MULADD(at[29], at[37]); MULADD(at[30], at[36]); MULADD(at[31], at[35]);
|
||||
COMBA_STORE(C->dp[34]);
|
||||
/* 35 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[4], at[63]); MULADD(at[5], at[62]); MULADD(at[6], at[61]); MULADD(at[7], at[60]); MULADD(at[8], at[59]); MULADD(at[9], at[58]); MULADD(at[10], at[57]); MULADD(at[11], at[56]); MULADD(at[12], at[55]); MULADD(at[13], at[54]); MULADD(at[14], at[53]); MULADD(at[15], at[52]); MULADD(at[16], at[51]); MULADD(at[17], at[50]); MULADD(at[18], at[49]); MULADD(at[19], at[48]); MULADD(at[20], at[47]); MULADD(at[21], at[46]); MULADD(at[22], at[45]); MULADD(at[23], at[44]); MULADD(at[24], at[43]); MULADD(at[25], at[42]); MULADD(at[26], at[41]); MULADD(at[27], at[40]); MULADD(at[28], at[39]); MULADD(at[29], at[38]); MULADD(at[30], at[37]); MULADD(at[31], at[36]);
|
||||
COMBA_STORE(C->dp[35]);
|
||||
/* 36 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[5], at[63]); MULADD(at[6], at[62]); MULADD(at[7], at[61]); MULADD(at[8], at[60]); MULADD(at[9], at[59]); MULADD(at[10], at[58]); MULADD(at[11], at[57]); MULADD(at[12], at[56]); MULADD(at[13], at[55]); MULADD(at[14], at[54]); MULADD(at[15], at[53]); MULADD(at[16], at[52]); MULADD(at[17], at[51]); MULADD(at[18], at[50]); MULADD(at[19], at[49]); MULADD(at[20], at[48]); MULADD(at[21], at[47]); MULADD(at[22], at[46]); MULADD(at[23], at[45]); MULADD(at[24], at[44]); MULADD(at[25], at[43]); MULADD(at[26], at[42]); MULADD(at[27], at[41]); MULADD(at[28], at[40]); MULADD(at[29], at[39]); MULADD(at[30], at[38]); MULADD(at[31], at[37]);
|
||||
COMBA_STORE(C->dp[36]);
|
||||
/* 37 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[6], at[63]); MULADD(at[7], at[62]); MULADD(at[8], at[61]); MULADD(at[9], at[60]); MULADD(at[10], at[59]); MULADD(at[11], at[58]); MULADD(at[12], at[57]); MULADD(at[13], at[56]); MULADD(at[14], at[55]); MULADD(at[15], at[54]); MULADD(at[16], at[53]); MULADD(at[17], at[52]); MULADD(at[18], at[51]); MULADD(at[19], at[50]); MULADD(at[20], at[49]); MULADD(at[21], at[48]); MULADD(at[22], at[47]); MULADD(at[23], at[46]); MULADD(at[24], at[45]); MULADD(at[25], at[44]); MULADD(at[26], at[43]); MULADD(at[27], at[42]); MULADD(at[28], at[41]); MULADD(at[29], at[40]); MULADD(at[30], at[39]); MULADD(at[31], at[38]);
|
||||
COMBA_STORE(C->dp[37]);
|
||||
/* 38 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[7], at[63]); MULADD(at[8], at[62]); MULADD(at[9], at[61]); MULADD(at[10], at[60]); MULADD(at[11], at[59]); MULADD(at[12], at[58]); MULADD(at[13], at[57]); MULADD(at[14], at[56]); MULADD(at[15], at[55]); MULADD(at[16], at[54]); MULADD(at[17], at[53]); MULADD(at[18], at[52]); MULADD(at[19], at[51]); MULADD(at[20], at[50]); MULADD(at[21], at[49]); MULADD(at[22], at[48]); MULADD(at[23], at[47]); MULADD(at[24], at[46]); MULADD(at[25], at[45]); MULADD(at[26], at[44]); MULADD(at[27], at[43]); MULADD(at[28], at[42]); MULADD(at[29], at[41]); MULADD(at[30], at[40]); MULADD(at[31], at[39]);
|
||||
COMBA_STORE(C->dp[38]);
|
||||
|
||||
/* early out at 40 digits, 40*32==1280, or two 640 bit operands */
|
||||
if (out_size <= 40) { COMBA_STORE2(C->dp[39]); C->used = 40; C->sign = A->sign ^ B->sign; fp_clamp(C); COMBA_FINI; return; }
|
||||
|
||||
/* 39 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[8], at[63]); MULADD(at[9], at[62]); MULADD(at[10], at[61]); MULADD(at[11], at[60]); MULADD(at[12], at[59]); MULADD(at[13], at[58]); MULADD(at[14], at[57]); MULADD(at[15], at[56]); MULADD(at[16], at[55]); MULADD(at[17], at[54]); MULADD(at[18], at[53]); MULADD(at[19], at[52]); MULADD(at[20], at[51]); MULADD(at[21], at[50]); MULADD(at[22], at[49]); MULADD(at[23], at[48]); MULADD(at[24], at[47]); MULADD(at[25], at[46]); MULADD(at[26], at[45]); MULADD(at[27], at[44]); MULADD(at[28], at[43]); MULADD(at[29], at[42]); MULADD(at[30], at[41]); MULADD(at[31], at[40]);
|
||||
COMBA_STORE(C->dp[39]);
|
||||
/* 40 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[9], at[63]); MULADD(at[10], at[62]); MULADD(at[11], at[61]); MULADD(at[12], at[60]); MULADD(at[13], at[59]); MULADD(at[14], at[58]); MULADD(at[15], at[57]); MULADD(at[16], at[56]); MULADD(at[17], at[55]); MULADD(at[18], at[54]); MULADD(at[19], at[53]); MULADD(at[20], at[52]); MULADD(at[21], at[51]); MULADD(at[22], at[50]); MULADD(at[23], at[49]); MULADD(at[24], at[48]); MULADD(at[25], at[47]); MULADD(at[26], at[46]); MULADD(at[27], at[45]); MULADD(at[28], at[44]); MULADD(at[29], at[43]); MULADD(at[30], at[42]); MULADD(at[31], at[41]);
|
||||
COMBA_STORE(C->dp[40]);
|
||||
/* 41 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[10], at[63]); MULADD(at[11], at[62]); MULADD(at[12], at[61]); MULADD(at[13], at[60]); MULADD(at[14], at[59]); MULADD(at[15], at[58]); MULADD(at[16], at[57]); MULADD(at[17], at[56]); MULADD(at[18], at[55]); MULADD(at[19], at[54]); MULADD(at[20], at[53]); MULADD(at[21], at[52]); MULADD(at[22], at[51]); MULADD(at[23], at[50]); MULADD(at[24], at[49]); MULADD(at[25], at[48]); MULADD(at[26], at[47]); MULADD(at[27], at[46]); MULADD(at[28], at[45]); MULADD(at[29], at[44]); MULADD(at[30], at[43]); MULADD(at[31], at[42]);
|
||||
COMBA_STORE(C->dp[41]);
|
||||
/* 42 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[11], at[63]); MULADD(at[12], at[62]); MULADD(at[13], at[61]); MULADD(at[14], at[60]); MULADD(at[15], at[59]); MULADD(at[16], at[58]); MULADD(at[17], at[57]); MULADD(at[18], at[56]); MULADD(at[19], at[55]); MULADD(at[20], at[54]); MULADD(at[21], at[53]); MULADD(at[22], at[52]); MULADD(at[23], at[51]); MULADD(at[24], at[50]); MULADD(at[25], at[49]); MULADD(at[26], at[48]); MULADD(at[27], at[47]); MULADD(at[28], at[46]); MULADD(at[29], at[45]); MULADD(at[30], at[44]); MULADD(at[31], at[43]);
|
||||
COMBA_STORE(C->dp[42]);
|
||||
/* 43 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[12], at[63]); MULADD(at[13], at[62]); MULADD(at[14], at[61]); MULADD(at[15], at[60]); MULADD(at[16], at[59]); MULADD(at[17], at[58]); MULADD(at[18], at[57]); MULADD(at[19], at[56]); MULADD(at[20], at[55]); MULADD(at[21], at[54]); MULADD(at[22], at[53]); MULADD(at[23], at[52]); MULADD(at[24], at[51]); MULADD(at[25], at[50]); MULADD(at[26], at[49]); MULADD(at[27], at[48]); MULADD(at[28], at[47]); MULADD(at[29], at[46]); MULADD(at[30], at[45]); MULADD(at[31], at[44]);
|
||||
COMBA_STORE(C->dp[43]);
|
||||
/* 44 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[13], at[63]); MULADD(at[14], at[62]); MULADD(at[15], at[61]); MULADD(at[16], at[60]); MULADD(at[17], at[59]); MULADD(at[18], at[58]); MULADD(at[19], at[57]); MULADD(at[20], at[56]); MULADD(at[21], at[55]); MULADD(at[22], at[54]); MULADD(at[23], at[53]); MULADD(at[24], at[52]); MULADD(at[25], at[51]); MULADD(at[26], at[50]); MULADD(at[27], at[49]); MULADD(at[28], at[48]); MULADD(at[29], at[47]); MULADD(at[30], at[46]); MULADD(at[31], at[45]);
|
||||
COMBA_STORE(C->dp[44]);
|
||||
/* 45 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[14], at[63]); MULADD(at[15], at[62]); MULADD(at[16], at[61]); MULADD(at[17], at[60]); MULADD(at[18], at[59]); MULADD(at[19], at[58]); MULADD(at[20], at[57]); MULADD(at[21], at[56]); MULADD(at[22], at[55]); MULADD(at[23], at[54]); MULADD(at[24], at[53]); MULADD(at[25], at[52]); MULADD(at[26], at[51]); MULADD(at[27], at[50]); MULADD(at[28], at[49]); MULADD(at[29], at[48]); MULADD(at[30], at[47]); MULADD(at[31], at[46]);
|
||||
COMBA_STORE(C->dp[45]);
|
||||
/* 46 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[15], at[63]); MULADD(at[16], at[62]); MULADD(at[17], at[61]); MULADD(at[18], at[60]); MULADD(at[19], at[59]); MULADD(at[20], at[58]); MULADD(at[21], at[57]); MULADD(at[22], at[56]); MULADD(at[23], at[55]); MULADD(at[24], at[54]); MULADD(at[25], at[53]); MULADD(at[26], at[52]); MULADD(at[27], at[51]); MULADD(at[28], at[50]); MULADD(at[29], at[49]); MULADD(at[30], at[48]); MULADD(at[31], at[47]);
|
||||
COMBA_STORE(C->dp[46]);
|
||||
|
||||
/* early out at 48 digits, 48*32==1536, or two 768 bit operands */
|
||||
if (out_size <= 48) { COMBA_STORE2(C->dp[47]); C->used = 48; C->sign = A->sign ^ B->sign; fp_clamp(C); COMBA_FINI; return; }
|
||||
|
||||
/* 47 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[16], at[63]); MULADD(at[17], at[62]); MULADD(at[18], at[61]); MULADD(at[19], at[60]); MULADD(at[20], at[59]); MULADD(at[21], at[58]); MULADD(at[22], at[57]); MULADD(at[23], at[56]); MULADD(at[24], at[55]); MULADD(at[25], at[54]); MULADD(at[26], at[53]); MULADD(at[27], at[52]); MULADD(at[28], at[51]); MULADD(at[29], at[50]); MULADD(at[30], at[49]); MULADD(at[31], at[48]);
|
||||
COMBA_STORE(C->dp[47]);
|
||||
/* 48 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[17], at[63]); MULADD(at[18], at[62]); MULADD(at[19], at[61]); MULADD(at[20], at[60]); MULADD(at[21], at[59]); MULADD(at[22], at[58]); MULADD(at[23], at[57]); MULADD(at[24], at[56]); MULADD(at[25], at[55]); MULADD(at[26], at[54]); MULADD(at[27], at[53]); MULADD(at[28], at[52]); MULADD(at[29], at[51]); MULADD(at[30], at[50]); MULADD(at[31], at[49]);
|
||||
COMBA_STORE(C->dp[48]);
|
||||
/* 49 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[18], at[63]); MULADD(at[19], at[62]); MULADD(at[20], at[61]); MULADD(at[21], at[60]); MULADD(at[22], at[59]); MULADD(at[23], at[58]); MULADD(at[24], at[57]); MULADD(at[25], at[56]); MULADD(at[26], at[55]); MULADD(at[27], at[54]); MULADD(at[28], at[53]); MULADD(at[29], at[52]); MULADD(at[30], at[51]); MULADD(at[31], at[50]);
|
||||
COMBA_STORE(C->dp[49]);
|
||||
/* 50 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[19], at[63]); MULADD(at[20], at[62]); MULADD(at[21], at[61]); MULADD(at[22], at[60]); MULADD(at[23], at[59]); MULADD(at[24], at[58]); MULADD(at[25], at[57]); MULADD(at[26], at[56]); MULADD(at[27], at[55]); MULADD(at[28], at[54]); MULADD(at[29], at[53]); MULADD(at[30], at[52]); MULADD(at[31], at[51]);
|
||||
COMBA_STORE(C->dp[50]);
|
||||
/* 51 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[20], at[63]); MULADD(at[21], at[62]); MULADD(at[22], at[61]); MULADD(at[23], at[60]); MULADD(at[24], at[59]); MULADD(at[25], at[58]); MULADD(at[26], at[57]); MULADD(at[27], at[56]); MULADD(at[28], at[55]); MULADD(at[29], at[54]); MULADD(at[30], at[53]); MULADD(at[31], at[52]);
|
||||
COMBA_STORE(C->dp[51]);
|
||||
/* 52 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[21], at[63]); MULADD(at[22], at[62]); MULADD(at[23], at[61]); MULADD(at[24], at[60]); MULADD(at[25], at[59]); MULADD(at[26], at[58]); MULADD(at[27], at[57]); MULADD(at[28], at[56]); MULADD(at[29], at[55]); MULADD(at[30], at[54]); MULADD(at[31], at[53]);
|
||||
COMBA_STORE(C->dp[52]);
|
||||
/* 53 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[22], at[63]); MULADD(at[23], at[62]); MULADD(at[24], at[61]); MULADD(at[25], at[60]); MULADD(at[26], at[59]); MULADD(at[27], at[58]); MULADD(at[28], at[57]); MULADD(at[29], at[56]); MULADD(at[30], at[55]); MULADD(at[31], at[54]);
|
||||
COMBA_STORE(C->dp[53]);
|
||||
/* 54 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[23], at[63]); MULADD(at[24], at[62]); MULADD(at[25], at[61]); MULADD(at[26], at[60]); MULADD(at[27], at[59]); MULADD(at[28], at[58]); MULADD(at[29], at[57]); MULADD(at[30], at[56]); MULADD(at[31], at[55]);
|
||||
COMBA_STORE(C->dp[54]);
|
||||
|
||||
/* early out at 56 digits, 56*32==1792, or two 896 bit operands */
|
||||
if (out_size <= 56) { COMBA_STORE2(C->dp[55]); C->used = 56; C->sign = A->sign ^ B->sign; fp_clamp(C); COMBA_FINI; return; }
|
||||
|
||||
/* 55 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[24], at[63]); MULADD(at[25], at[62]); MULADD(at[26], at[61]); MULADD(at[27], at[60]); MULADD(at[28], at[59]); MULADD(at[29], at[58]); MULADD(at[30], at[57]); MULADD(at[31], at[56]);
|
||||
COMBA_STORE(C->dp[55]);
|
||||
/* 56 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[25], at[63]); MULADD(at[26], at[62]); MULADD(at[27], at[61]); MULADD(at[28], at[60]); MULADD(at[29], at[59]); MULADD(at[30], at[58]); MULADD(at[31], at[57]);
|
||||
COMBA_STORE(C->dp[56]);
|
||||
/* 57 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[26], at[63]); MULADD(at[27], at[62]); MULADD(at[28], at[61]); MULADD(at[29], at[60]); MULADD(at[30], at[59]); MULADD(at[31], at[58]);
|
||||
COMBA_STORE(C->dp[57]);
|
||||
/* 58 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[27], at[63]); MULADD(at[28], at[62]); MULADD(at[29], at[61]); MULADD(at[30], at[60]); MULADD(at[31], at[59]);
|
||||
COMBA_STORE(C->dp[58]);
|
||||
/* 59 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[28], at[63]); MULADD(at[29], at[62]); MULADD(at[30], at[61]); MULADD(at[31], at[60]);
|
||||
COMBA_STORE(C->dp[59]);
|
||||
/* 60 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[29], at[63]); MULADD(at[30], at[62]); MULADD(at[31], at[61]);
|
||||
COMBA_STORE(C->dp[60]);
|
||||
/* 61 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[30], at[63]); MULADD(at[31], at[62]);
|
||||
COMBA_STORE(C->dp[61]);
|
||||
/* 62 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[31], at[63]);
|
||||
COMBA_STORE(C->dp[62]);
|
||||
COMBA_STORE2(C->dp[63]);
|
||||
C->used = 64;
|
||||
C->sign = A->sign ^ B->sign;
|
||||
fp_clamp(C);
|
||||
COMBA_FINI;
|
||||
}
|
||||
#endif
|
||||
66
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/fp_mul_comba_4.i
Normal file
66
FreeRTOS-Plus/Source/WolfSSL/ctaocrypt/src/fp_mul_comba_4.i
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
/* fp_mul_comba_4.i
|
||||
*
|
||||
* 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 TFM_MUL4
|
||||
void fp_mul_comba4(fp_int *A, fp_int *B, fp_int *C)
|
||||
{
|
||||
fp_digit c0, c1, c2, at[8];
|
||||
|
||||
memcpy(at, A->dp, 4 * sizeof(fp_digit));
|
||||
memcpy(at+4, B->dp, 4 * sizeof(fp_digit));
|
||||
COMBA_START;
|
||||
|
||||
COMBA_CLEAR;
|
||||
/* 0 */
|
||||
MULADD(at[0], at[4]);
|
||||
COMBA_STORE(C->dp[0]);
|
||||
/* 1 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[5]); MULADD(at[1], at[4]);
|
||||
COMBA_STORE(C->dp[1]);
|
||||
/* 2 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[6]); MULADD(at[1], at[5]); MULADD(at[2], at[4]);
|
||||
COMBA_STORE(C->dp[2]);
|
||||
/* 3 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[0], at[7]); MULADD(at[1], at[6]); MULADD(at[2], at[5]); MULADD(at[3], at[4]);
|
||||
COMBA_STORE(C->dp[3]);
|
||||
/* 4 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[1], at[7]); MULADD(at[2], at[6]); MULADD(at[3], at[5]);
|
||||
COMBA_STORE(C->dp[4]);
|
||||
/* 5 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[2], at[7]); MULADD(at[3], at[6]);
|
||||
COMBA_STORE(C->dp[5]);
|
||||
/* 6 */
|
||||
COMBA_FORWARD;
|
||||
MULADD(at[3], at[7]);
|
||||
COMBA_STORE(C->dp[6]);
|
||||
COMBA_STORE2(C->dp[7]);
|
||||
C->used = 8;
|
||||
C->sign = A->sign ^ B->sign;
|
||||
fp_clamp(C);
|
||||
COMBA_FINI;
|
||||
}
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue